/* The milestone checklists (K3-M, spec 80 3.1-3.3, M4, M5). Site frame:
   site.css tokens, calm, no colour carries meaning (every answer state uses the
   same ink), nothing moves. The print rules make both printouts: the page
   itself (the blank checklist, or Ctrl+P) and the .ms-print summary. */
.ms-page { max-width: 1040px; margin: 0 auto; padding: 0 16px 96px; }
.ms-main { max-width: 720px; }
.ms-main h1 { margin: .25rem 0 .5rem; font-size: clamp(1.9rem, 7vw, 2.8rem); line-height: 1.1; }
.ms-main h2 { font-size: clamp(1.3rem, 5vw, 1.75rem); line-height: 1.2; overflow-wrap: anywhere; }
.ms-cdc-top, .ms-small, .ms-sources, .ms-credit { font-size: .88rem; color: var(--muted); }
.ms-lede { font-size: 1.1rem; }
.ms-crumb { padding-inline: 0; }
.ms-crumb a { min-height: 44px; display: inline-flex; align-items: center; }
.ms-guide-box, .ms-calc, .ms-guidance, .ms-result, .ms-quote { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 1rem 1.1rem; margin: 1rem 0; }
.ms-guide-privacy { border-top: 1px solid var(--line); padding-top: .6rem; margin-bottom: 0; font-size: .92rem; }
.ms-calc summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.ms-field { margin: .75rem 0; border: 0; padding: 0; }
.ms-field label, .ms-field legend { display: block; font-weight: 650; margin-bottom: .25rem; }
.ms-field input[type="date"], .ms-field select { min-height: 44px; font: inherit; padding: 0 .5rem; border: 1px solid var(--ink); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 100%; }
.ms-error { font-weight: 650; }
.ms-mode label, .ms-seg label { display: inline-flex; position: relative; margin: 0; }
.ms-mode, .ms-seg { display: flex; flex-wrap: wrap; gap: .5rem; }
.ms-mode input, .ms-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ms-mode span, .ms-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 .5rem; border: 1px solid var(--muted); border-radius: 10px; background: var(--surface); font-weight: 600; }
.ms-seg label { flex: 1 1 0; }
.ms-seg span { width: 100%; white-space: nowrap; }
.ms-mode span { text-align: center; }
.ms-mode input:checked + span, .ms-seg input:checked + span { border: 2px solid var(--ink); font-weight: 800; }
.ms-mode input:checked + span::before, .ms-seg input:checked + span::before { content: "\2713\00a0"; }
.ms-mode input:focus-visible + span, .ms-seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.ms-domain-head { display: flex; align-items: center; gap: .75rem; margin-top: 2rem; }
.ms-domain-head h2 { margin: 0; }
.ms-item { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: .9rem 0; break-inside: avoid; }
.ms-item legend { float: left; width: 100%; padding: 0; margin-bottom: .5rem; font-size: 1.02rem; }
.ms-item .ms-seg { clear: both; }
.ms-questions textarea { display: block; width: 100%; font: inherit; border: 1px solid var(--ink); border-radius: 8px; padding: .5rem; background: var(--surface); color: var(--ink); }
.ms-notes-label { display: block; font-weight: 650; margin-top: 1rem; }
.ms-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 56px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
html:has(.ms-bar) { scroll-padding-bottom: 72px; }
.ms-mention { white-space: nowrap; }
.ms-mention, .ms-primary, .ms-secondary, .ms-clear { min-height: 44px; padding: 0 1rem; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.ms-mention, .ms-primary { background: var(--ink); color: var(--surface); border: 2px solid var(--ink); }
.ms-secondary { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.ms-clear { background: none; border: 1px solid var(--muted); color: var(--ink); }
.ms-print-buttons { display: grid; gap: .5rem; }
.ms-print-buttons button { min-height: 56px; }
.ms-result h2:focus { outline: 3px solid var(--ink); outline-offset: 4px; }
.ms-age-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.ms-age-card { display: flex; flex-direction: column; min-height: 64px; justify-content: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ms-age-label { font-weight: 750; }
.ms-age-count { font-size: .9rem; color: var(--muted); }
.ms-neighbours ul, .ms-age-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding: 0; list-style: none; }
.ms-neighbours a, .ms-age-links a, .ms-on-cdc a { display: inline-flex; min-height: 44px; align-items: center; }
.ms-quote { margin-inline: 0; }
.ms-concerned-h { font-weight: 700; }
.ms-print { display: none; }
@media (max-width: 339px) { .ms-seg { flex-direction: column; } }
@page { size: auto; margin: 0.5in; }
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, footer, .skip-link, .ms-crumb, .ms-calc, .ms-bar, button, .ms-icon, .ms-neighbours, .ms-on-cdc, .ms-nojs, .ms-guide-box, .ms-after-two, .ms-result, .ms-clear-row, .ms-questions textarea, .ms-notes-label { display: none !important; }
  .ms-page { padding: 0; }
  .ms-main h1 { font-size: 14pt; }
  .ms-guidance, .ms-quote { border: 0; padding: 0; background: none; }
  .ms-seg span { border: 0; min-height: 0; padding: 0 1.2em 0 0; font-weight: 400; }
  .ms-seg span::before, .ms-seg input:checked + span::before { content: ""; display: inline-block; width: 10pt; height: 10pt; margin-right: 4pt; border: 1pt solid #000; }
  body:not(.ms-blank) .ms-seg input:checked + span::before { content: "\2713"; line-height: 10pt; text-align: center; }
  body:not(.ms-blank) .ms-seg input:checked + span { font-weight: 800; border: 0; }
  .ms-questions li::after { content: ""; display: block; height: 18pt; border-bottom: 1pt solid #000; }
  .ms-credit, .ms-print-credit { break-inside: avoid; font-size: 9pt; color: #000; }
  .ms-sources, .ms-small, .ms-cdc-top { color: #000; }
  a { color: #000; text-decoration: none; }
  body.ms-printing > *:not(.ms-print) { display: none !important; }
  body.ms-printing .ms-print { display: block; }
  .ms-print h1 { font-size: 14pt; margin: 0 0 4pt; }
  .ms-print h2 { font-size: 12pt; margin: 10pt 0 2pt; border-top: 1pt solid #000; padding-top: 4pt; }
  .ms-print h3 { font-size: 11pt; margin: 6pt 0 2pt; }
  .ms-print li { break-inside: avoid; }
  .ms-print-meta { display: flex; justify-content: space-between; gap: 1em; }
  .ms-print-small { font-size: 9pt; }
  .ms-rule { display: block; height: 16pt; border-bottom: 1pt solid #000; }
}
