/* Moraph for Good: session kits, worksheets, handouts and the help directories (build/pages/sessions.py). */

/* Run sheet */
.ks-run{width:100%;border-collapse:collapse;font-size:.98rem;margin-top:1rem}
.ks-run th,.ks-run td{text-align:left;vertical-align:top;padding:1rem .8rem 1rem 0;border-bottom:1px solid var(--line)}
.ks-run thead th{font:500 .72rem/1.4 var(--f-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--muted);padding-top:0}
.ks-run tbody th{width:4rem;color:var(--sun-ink);font-weight:400}
.ks-run .ks-len{width:4.5rem;color:var(--muted);white-space:nowrap}
.ks-run td strong{display:block}
.ks-run td span{display:block;margin-top:.3rem}
.ks-run .ks-slides{font-size:.75rem;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}
.ks-run .ks-say{font-style:italic;color:var(--muted)}
.ks-steps{padding-left:1.3rem}
.ks-steps li{margin:.5rem 0}

/* Questions */
.ks-q{border-top:1px solid var(--line);padding:.9rem 0}
.ks-q:last-child{border-bottom:1px solid var(--line)}
.ks-q summary{cursor:pointer;font-weight:600}
.ks-q p{margin:.6rem 0 0}

/* Country blocks */
.ks-countries{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;margin-top:1.2rem}
@media (min-width:760px){.ks-countries{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ks-country .mono{margin:0 0 .6rem;letter-spacing:.08em;text-transform:uppercase;font-size:.75rem}
.ks-points{padding-left:1.1rem;margin:0}
.ks-points li{margin:.5rem 0;font-size:.95rem;overflow-wrap:anywhere}
.ks-country-foot{margin:1rem 0 0;line-height:2}
.print-only{display:none}
.ks-urgent{margin-bottom:2rem}
.ks-urgent ul{margin:.6rem 0 0;padding-left:1.2rem}

/* Help directories */
.hp-list{list-style:none;padding:0;margin:1rem 0 0}
.hp-list li{border-top:1px solid var(--line);padding:.9rem 0}
.hp-list li:last-child{border-bottom:1px solid var(--line)}
.hp-list span{display:block;margin-top:.25rem}
.hp-list .gd-url{font:400 .78rem/1.4 var(--f-mono);color:var(--muted);overflow-wrap:anywhere}
.hp-countries{list-style:none;padding:0;margin:1rem 0 0;display:grid;gap:.4rem}

/* Worksheets and handouts: a sheet of paper on screen, the page itself in print */
.sheet{max-width:52rem;margin:0 auto;background:var(--white);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:clamp(1.2rem,4vw,3rem);overflow-wrap:break-word}
.ws-head{border-bottom:2px solid var(--text);padding-bottom:1rem;margin-bottom:1.2rem}
.ws-head .mono{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;margin:0;overflow-wrap:anywhere}
.ws-head .h2,.ws-head .h2 em{margin:.4rem 0;color:var(--text)}
.ws-intro{font-size:1.02rem}
.ws-ex{margin-top:1.8rem;break-inside:avoid}
.ws-ex h3 .mono{display:inline-block;min-width:1.6rem;color:var(--sun-ink)}
.ws-lines span{display:block;height:2.1rem;border-bottom:1px solid var(--field-line)}
.ws-table{width:100%;border-collapse:collapse;margin-top:.6rem;font-size:.9rem}
.ws-table th{text-align:left;font-weight:600;border-bottom:2px solid var(--text);padding:.4rem .5rem .4rem 0}
.ws-table td{height:2.1rem;border-bottom:1px solid var(--field-line)}
.ws-check{list-style:none;padding:0}
.ws-check li{position:relative;padding:.35rem 0 .35rem 2rem}
.ws-check li::before{content:"";position:absolute;left:0;top:.5rem;width:1.1rem;height:1.1rem;border:1.5px solid var(--text);border-radius:3px}
.ws-foot{margin-top:2rem;border-top:1px solid var(--field-line);padding-top:.8rem;font-size:.8rem;color:var(--muted);overflow-wrap:anywhere}
.ho-grid{display:grid;gap:0 2rem}
@media (min-width:760px){.ho-grid{grid-template-columns:1fr 1fr}}
.ho-sec{break-inside:avoid}
.ho-sec ul,.ho-country ul{padding-left:1.1rem;margin:.4rem 0}
.ho-sec li,.ho-country li{margin:.35rem 0;font-size:.95rem}
.ho-country{margin-top:1.4rem;border:2px solid var(--text);border-radius:10px;padding:1rem 1.2rem;break-inside:avoid}
.ho-country h3{margin-top:0}
.ho-src{margin:.8rem 0 0;font-size:.9rem}
.ho-srcs li{font-size:.85rem}
.ho-srcs .mono{overflow-wrap:anywhere}
.ho-host{color:var(--muted)}
/* Addresses on a handout are links on screen, with a tap target of at least 24px; in print they read as plain text */
.ho-link{color:inherit;text-decoration-color:var(--sun-ink);text-underline-offset:3px;overflow-wrap:anywhere}
@media screen{.ho-link{display:inline-block;min-height:24px;padding:.2rem 0;line-height:1.4}}

@media print{
  @page{margin:12mm}
  .site-header,.site-footer,.skip,.no-print,.cta-band,.gd-aside,.print-btn{display:none!important}
  /* Handouts, worksheets and slides print their own header; the kit and help pages keep their title */
  main:has(.sheet,.deck) .page-hero{display:none!important}
  main:not(:has(.sheet,.deck)) .page-hero .crumbs,main:not(:has(.sheet,.deck)) .page-hero .btns{display:none!important}
  /* These lists already show each address under the link; don't print it a second time in brackets */
  .hp-list a::after,.ks-urgent a::after{content:none!important}
  body{background:#fff}
  .section{padding:0!important}
  .sheet{border:0;border-radius:0;padding:0;max-width:none}
  .ks-run tbody th{color:#000}
  .ks-q{break-inside:avoid}
  .sheet .ho-link{text-decoration:none!important;color:inherit!important}
  .print-only{display:block}
  /* Take-home handouts fit one sheet of US Letter and A4 (the longest country sections ran a few lines over): the sheet's
     own header replaces the site's print line, and the spacing tightens. Type sizes are unchanged; large print is not
     touched. Check: audit-data/scripts/handout-pages.mjs (Chromium PDF page count of every handout). */
  html:not(.print-large) body:has(.ho-grid)::before{display:none}
  html:not(.print-large) .ws-head:has(~ .ho-grid){padding-bottom:.6rem;margin-bottom:.8rem}
  html:not(.print-large) .ws-intro:has(~ .ho-grid){margin:0 0 .4rem}
  html:not(.print-large) .ho-sec h3,html:not(.print-large) .ho-country h3{margin-bottom:.2rem}
  html:not(.print-large) .ho-sec h3{margin-top:.8rem}
  html:not(.print-large) .ho-sec li,html:not(.print-large) .ho-country li{margin:.2rem 0;line-height:1.4}
  html:not(.print-large) .ho-country{margin-top:1rem;padding:.8rem 1rem}
  html:not(.print-large) .ho-country ~ .ws-foot{margin-top:1rem}
  html:not(.print-large) .ho-pub-more{display:none} /* "Publisher (Ministry …)": the bracketed part is left out on paper */
  /* Large print (the 'Print in large print' button): everything sized in rem grows with the root */
  html.print-large{font-size:16pt} /* rem-sized parts */
  html.print-large body{font-size:16pt} /* body text: 16pt, the usual minimum for large print */
  html.print-large .sheet{line-height:1.55}
  html.print-large .ws-head .h2{font-size:24pt} /* the sheet title stays larger than the 16pt body */
  html.print-large .ws-head .mono{overflow-wrap:normal;word-break:normal}
  .ks-print-title{font:500 .8rem/1.4 var(--f-mono);letter-spacing:.08em;text-transform:uppercase;border-bottom:2px solid #000;padding-bottom:.6rem}
}

/* Handout links on the kit page's night hero */
.ks-handouts{margin:1.2rem 0 0;color:var(--on-night-2);font-size:.95rem;line-height:1.9}
.ks-handouts a{color:var(--on-night);text-underline-offset:3px}
.ks-handouts a:hover{color:var(--sun-2)}
/* The handout's hero: a line for people reading their sheet on a phone */
.ho-phone{margin:1rem 0 0;color:var(--on-night-2);font-size:.95rem}
.ho-phone a{color:var(--on-night);text-underline-offset:3px}
.ho-phone a:hover{color:var(--sun-2)}

/* Changes to this kit (kit page) and the version line on handouts and worksheets */
.ks-history summary{cursor:pointer;font-weight:600}
.ks-history-list{list-style:none;padding:0;margin:.8rem 0 0}
.ks-history-list li{border-top:1px solid var(--line);padding:.6rem 0;overflow-wrap:anywhere}
.ks-history-list li:last-child{border-bottom:1px solid var(--line)}
.ks-history-list time{display:block;font-family:var(--f-mono);font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.ws-version{white-space:nowrap}
@media print{.ws-version{color:#000}}
