/* Series record (/commons/sessions/attendance) and Ask a place to host (/commons/ask-to-host). build/pages/hosttools.py.
   Builds on tools.css (form and preview layout) and announce.css (program lists, radios, saved-plan strip). */

.at-layout,.ah-layout{grid-template-columns:minmax(0,1fr)!important;max-width:920px;margin:0 auto}
.at-preview,.ah-preview{position:static!important;max-height:none!important;display:block!important}
.at-small{height:auto!important;min-height:44px;padding:.4rem 1.1rem!important;font-size:.9rem!important}
#at-status[data-kind="err"],#ah-status[data-kind="err"]{color:var(--err-ink);font-weight:500}
#at-status[data-kind="ok"],#ah-status[data-kind="ok"]{color:var(--text);font-weight:500}
.at-nojs,.ah-nojs{margin-bottom:1.5rem}
.at-page [hidden],.ah-page [hidden]{display:none!important}

/* ---------- Series record: the form ---------- */
.at-extras{display:grid;gap:.5rem}
.at-extra{align-items:flex-start;min-height:44px}
.at-extra .hint{display:block;margin-top:.15rem}
.at-rows{list-style:none;margin:1rem 0;padding:0;display:grid;gap:.8rem}
.at-fs{margin:0;padding:.9rem 1rem 1rem;border:1px solid var(--line);border-radius:14px;background:var(--paper);min-width:0}
.at-fs > legend{display:flex;gap:.6rem;align-items:baseline;padding:0 .3rem;font-weight:600;color:var(--text)}
.at-n{font:500 .74rem/1 var(--f-mono);letter-spacing:.08em;color:var(--sun-ink)}
.at-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(9rem,1fr));gap:.6rem 1rem}
.at-grid .field{margin:0;min-width:0}
.at-grid input,.at-grid select{width:100%;min-width:0;min-height:44px}
.at-f--kit{grid-column:span 2}
.at-f[hidden]{display:none!important}
.at-remove{margin-top:.7rem}
.at-err{margin:.25rem 0 0;font-size:.85rem}
.at-errsum{margin:0 0 1rem;padding:1rem 1.2rem;border:2px solid var(--err-ink);border-radius:14px;background:var(--paper)}
.at-errsum:focus{outline:3px solid var(--sun);outline-offset:2px}
.at-errsum p{margin:0 0 .4rem;color:var(--text)}
.at-errsum ul{margin:0;padding-left:1.2rem}
.at-errsum a{color:var(--err-ink);font-weight:500}
@media (max-width:520px){.at-f--kit{grid-column:1/-1}}

/* ---------- Series record: the sheet (preview, print and the blank record) ---------- */
.at-sheet,.ah-note{margin-top:1.2rem;padding:clamp(1rem,.6rem + 2vw,2rem);border:1px solid var(--line-2);border-radius:16px;background:var(--paper);color:var(--text);min-width:0}
.at-kicker{margin:0 0 .3rem;font:600 .72rem/1.2 var(--f-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.at-sheet-title{margin:0 0 .5rem;font:400 1.5rem/1.2 var(--f-display);overflow-wrap:anywhere}
.at-sheet-host{display:flex;align-items:baseline;gap:.5rem;margin:0 0 1rem;color:var(--body)}
.at-line,.ah-line{flex:1;min-width:6rem;min-height:1.4em;border-bottom:1px solid var(--line-2);overflow-wrap:anywhere;color:var(--text)}
.at-table-wrap{overflow-x:auto;max-width:100%}
.at-table{width:100%;min-width:38rem;border-collapse:collapse;font-size:.9rem}
.at-table th,.at-table td{padding:.45rem .5rem;border:1px solid var(--line-2);text-align:left;vertical-align:top;color:var(--body);overflow-wrap:break-word}
.at-table thead th{overflow-wrap:normal;hyphens:manual;font:600 .7rem/1.25 var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--text);background:var(--paper-3)}
.at-table tfoot th,.at-table tfoot td{font-weight:600;color:var(--text);background:var(--paper-3)}
.at-table [data-col="n"]{width:3.4rem;white-space:nowrap;overflow-wrap:normal}
.at-table [data-col="count"],.at-table [data-col="first"],.at-table [data-col="access"],.at-table [data-col="sheets"]{text-align:right}
.at-table thead [data-col="count"],.at-table thead [data-col="first"],.at-table thead [data-col="access"],.at-table thead [data-col="sheets"]{text-align:left}
.at-blank td{height:2.1rem}
.at-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:.6rem 1.2rem;margin:1rem 0 0}
.at-totals div{min-width:0}
.at-totals dt{font:600 .7rem/1.3 var(--f-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.at-totals dd{margin:.1rem 0 0;font-size:1.1rem;color:var(--text);overflow-wrap:anywhere}
.at-sheet-foot p{margin:1rem 0 0;font-size:.82rem;color:var(--muted)}
.at-sheet-foot p + p{margin-top:.3rem}

/* ---------- Ask a place to host ---------- */
.ah-prog{display:block!important;margin-top:1.3rem!important;padding:0!important;border:0;min-width:0}
.ah-prog > legend{float:left;width:100%;display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .7rem;margin:0 0 .6rem!important;padding:0 0 .4rem!important;border-bottom:1px solid var(--line);font-family:var(--f-display);font-weight:380;font-size:1.25rem;color:var(--text)}
.ah-prog > legend + *{clear:both}
.ah-kits{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr));gap:.4rem}
.ah-kit{display:flex;align-items:center;gap:.7rem;min-height:44px;padding:.35rem .8rem;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
.ah-kit:has(.ah-tick:checked){border-color:var(--sun);box-shadow:inset 3px 0 0 var(--sun)}
.ah-tick{flex:none;width:1.3rem;height:1.3rem;margin:0;accent-color:var(--ink-bg);cursor:pointer}
.ah-kit label{flex:1;min-width:0;padding:.45rem 0;font-weight:500;color:var(--text);cursor:pointer;overflow-wrap:anywhere}
.ah-note{font-size:.98rem;line-height:1.55}
.ah-note p{margin:0 0 .8rem;color:var(--body)}
.ah-to,.ah-from{display:flex;align-items:baseline;gap:.5rem}
.ah-subject{margin:.4rem 0 .9rem;font:400 1.45rem/1.25 var(--f-display);color:var(--text)}
.ah-h{font-weight:600;color:var(--text)!important;margin-bottom:.3rem!important}
.ah-note ul{margin:0 0 .9rem;padding-left:1.2rem}
.ah-note li{margin-bottom:.3rem;color:var(--body)}
.ah-note strong{color:var(--text)}
.ah-url{font-family:var(--f-mono);font-size:.88em;overflow-wrap:anywhere}
.ah-foot p{margin:1rem 0 0;padding-top:.6rem;border-top:1px solid var(--line);font-size:.82rem;color:var(--muted)}

@media print{
  @page{margin:12mm}
  body:has(.at-sheet)::before,body:has(.ah-note)::before{display:none!important}
  main:has(.at-sheet) > :not(.at-page),main:has(.ah-note) > :not(.ah-page),.at-form,.ah-form,.at-preview .ip-bar,.ah-preview .ip-bar,.at-errsum,.at-nojs,.ah-nojs,.ip-tip,.subscribe-band{display:none!important}
  .at-page,.ah-page{padding:0!important}
  .at-sheet,.ah-note{margin:0;padding:0;border:0;border-radius:0;background:#fff!important}
  .at-sheet *,.ah-note *{color:#000!important}
  .at-sheet{font-size:9pt}
  .at-sheet-title{font-size:16pt}
  .at-table-wrap{overflow:visible}
  .at-table{font-size:8.5pt;min-width:0}
  .at-table th,.at-table td{border-color:#000;padding:1.6mm 1.5mm}
  .at-table thead th,.at-table tfoot th,.at-table tfoot td{background:#eee!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .at-blank td{height:8.5mm}
  .at-line,.ah-line{border-color:#000}
  .at-totals dd{font-size:11pt}
  .at-sheet-foot p{font-size:7.5pt}
  .ah-note{font-size:9.5pt;line-height:1.38}
  .ah-note p{margin-bottom:2.2mm}
  .ah-note ul{margin-bottom:2.2mm}
  .ah-note li{margin-bottom:.8mm}
  .ah-subject{font-size:14pt;margin:2mm 0 3mm}
  .ah-foot p{font-size:7.5pt;border-color:#000}
  .ah-to{margin-bottom:3mm!important}
  .ah-from{margin-top:5mm!important}
}
.ah-form .an-sublegend{font:600 .95rem/1.4 var(--f-sans)!important;margin:0 0 .4rem!important;padding:0!important;color:var(--text)}
