/* Mitigation Logbook component styles. Reads tokens.css custom properties only. */
.ml{font-family:var(--font-sans);font-size:18px;line-height:26px;color:var(--ink);background:var(--paper);-webkit-text-size-adjust:100%}
.ml *,.ml *::before,.ml *::after{box-sizing:border-box}
.ml a{color:var(--ink);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:2px}
.ml-page{max-width:var(--measure);margin:0 auto;padding:var(--space-6) var(--gutter) var(--space-16)}
.ml-page--board{max-width:var(--board-max)}
.ml-stack>*+*{margin-top:var(--space-4)}
.ml-kicker{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-muted)}
.ml-display{font:700 32px/36px var(--font-slab);margin:var(--space-1) 0 var(--space-3)}
.ml-head{font:700 24px/28px var(--font-slab);margin:var(--space-8) 0 var(--space-3)}
.ml-small{font-size:16px;line-height:22px;color:var(--ink-muted)}
.ml-mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums}

/* Banner: the demonstration line. One line, every page, never orange. */
.ml-banner{background:var(--paper-raised);border-bottom:1px solid var(--rule);padding:var(--space-2) var(--gutter);font-size:16px;line-height:22px;text-align:center;color:var(--ink)}

/* Masthead */
.ml-masthead{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);min-height:var(--tap);padding:0 var(--gutter);border-bottom:2px solid var(--rule-strong);background:var(--paper-raised)}
.ml-masthead__name{font:700 20px/26px var(--font-slab);text-decoration:none;color:var(--ink);white-space:nowrap}
.ml-masthead__name small{display:block;font:400 14px/18px var(--font-sans);color:var(--ink-muted)}
.ml-masthead__nav{display:flex;gap:var(--space-1);margin:0;padding:0;list-style:none}
.ml-masthead__nav a{display:inline-flex;align-items:center;min-height:var(--tap);padding:0 var(--space-3);font-weight:700}
.ml-masthead__nav a[aria-current]{background:var(--selected);box-shadow:inset 0 -3px 0 var(--ink)}

/* Buttons: 56 px, square, ink rule. Signal only for the one action that is due. */
.ml-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:var(--tap);min-width:var(--tap);padding:0 var(--space-6);border:2px solid var(--ink);border-radius:var(--radius-0);background:var(--paper-raised);color:var(--ink);font:700 18px/26px var(--font-sans);text-decoration:none;cursor:pointer;box-shadow:var(--shadow-none)}
.ml-btn--primary{background:var(--ink);color:var(--on-ink)}
.ml-btn--signal{background:var(--signal);color:var(--ink)}
.ml-btn--block{display:flex;width:100%}
.ml-btn[disabled],.ml-btn[aria-disabled="true"]{color:var(--ink-faint);border-color:var(--ink-faint);background:var(--paper-raised);cursor:not-allowed}
.ml-btn:focus-visible,.ml-input:focus-visible,.ml a:focus-visible,.ml-tab:focus-visible{outline:var(--focus-w) solid var(--focus);outline-offset:2px;border-radius:var(--radius-sm)}
.ml-actions{display:flex;flex-wrap:wrap;gap:var(--space-2)}

/* Fields */
.ml-field{display:block;margin:0 0 var(--space-4)}
.ml-field__label{display:block;font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;margin-bottom:var(--space-2)}
.ml-input{display:block;width:100%;min-height:var(--tap);padding:0 var(--space-4);border:2px solid var(--ink);border-radius:var(--radius-0);background:var(--paper-raised);color:var(--ink);font:400 18px/26px var(--font-sans);appearance:none;-webkit-appearance:none}
textarea.ml-input{padding:var(--space-3) var(--space-4);min-height:112px;resize:vertical}
.ml-input::placeholder{color:var(--ink-faint)}
.ml-select{background-image:linear-gradient(45deg,transparent 50%,var(--ink) 50%),linear-gradient(135deg,var(--ink) 50%,transparent 50%);background-position:calc(100% - 24px) 50%,calc(100% - 16px) 50%;background-size:8px 8px;background-repeat:no-repeat;padding-right:48px}
.ml-field__help{font-size:16px;line-height:22px;color:var(--ink-muted);margin-top:var(--space-2)}
.ml-check{display:flex;align-items:flex-start;gap:var(--space-3);min-height:var(--tap);padding:var(--space-2) 0;font-size:18px;line-height:26px}
.ml-check input{width:28px;height:28px;margin:0;flex:none;accent-color:var(--ink);border:2px solid var(--ink)}

/* Status: a word and a glyph, never a colored pill. */
.ml-status{display:inline-flex;align-items:center;gap:var(--space-2);font-weight:700;white-space:nowrap}
.ml-status svg{width:22px;height:22px;flex:none;display:block}
.ml-status--action{color:var(--signal-text)}
.ml-status--action svg .fill{fill:var(--signal)}
.ml-status--muted{color:var(--ink-muted)}

/* Entry: the board row, a ruled logbook line with the day in the margin. */
.ml-entries{list-style:none;margin:0;padding:0;border-top:2px solid var(--ink)}
.ml-entry{display:grid;grid-template-columns:var(--margin-col) 1fr;gap:0 var(--space-4);padding:var(--space-4) 0;border-bottom:1px solid var(--rule);min-height:var(--tap-row)}
.ml-entry__date{font-family:var(--font-mono);font-size:16px;line-height:22px;color:var(--ink-muted);font-variant-numeric:tabular-nums}
.ml-entry__date b{display:block;font-size:28px;line-height:32px;font-weight:500;color:var(--ink)}
.ml-entry--action .ml-entry__date::before{content:"";display:block;width:32px;height:8px;background:var(--signal);margin-bottom:var(--space-2)}
.ml-entry__title{font:700 20px/26px var(--font-slab);margin:0}
.ml-entry__meta{font-size:16px;line-height:22px;color:var(--ink-muted);margin:var(--space-1) 0 0}
.ml-entry__status{grid-column:2;margin-top:var(--space-2)}
.ml-entry__actions{grid-column:2;display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-3)}
@media (min-width:720px){.ml-entry{grid-template-columns:var(--margin-col) 1fr auto auto;align-items:center}.ml-entry__status{grid-column:auto;margin-top:0}.ml-entry__actions{grid-column:auto;margin-top:0;justify-content:flex-end}}

/* Readout: a large tabular number with its unit and its source. */
.ml-readout{display:flex;flex-direction:column;gap:2px;min-width:0}
.ml-readout__label{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-muted)}
.ml-readout__value{font-family:var(--font-mono);font-weight:500;font-size:40px;line-height:44px;font-variant-numeric:tabular-nums;color:var(--ink)}
.ml-readout__value small{font-family:var(--font-sans);font-size:18px;line-height:26px;font-weight:400;margin-left:var(--space-1)}
.ml-readout__source{font-size:16px;line-height:22px;color:var(--ink-muted)}
.ml-readout--sm .ml-readout__value{font-size:28px;line-height:32px}
.ml-readouts{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:var(--space-4) var(--space-6)}

/* Boxed section: 2 px rule, uppercase head, source line at the foot. */
.ml-box{border:2px solid var(--rule-strong);border-radius:var(--radius-0);background:var(--paper-raised);padding:var(--space-4);margin:0 0 var(--space-4);box-shadow:var(--shadow-none)}
.ml-box__head{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;margin:0 0 var(--space-3);padding-bottom:var(--space-2);border-bottom:2px solid var(--rule-strong)}
.ml-box__source{font-size:16px;line-height:22px;color:var(--ink-muted);margin:var(--space-3) 0 0;padding-top:var(--space-2);border-top:1px solid var(--rule)}
.ml-box--verdict .ml-box__head{font:700 24px/28px var(--font-slab);letter-spacing:0;text-transform:none}
.ml-split{display:grid;grid-template-columns:1fr;gap:var(--space-4)}
@media (min-width:640px){.ml-split{grid-template-columns:1fr 1fr}}

/* Points ledger: required, yours, difference; then the credited lines. */
.ml-ledger{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-4)}
.ml-ledger__lines{list-style:none;margin:var(--space-4) 0 0;padding:0;border-top:2px solid var(--rule-strong)}
.ml-ledger__lines li{display:flex;justify-content:space-between;gap:var(--space-4);padding:var(--space-2) 0;border-bottom:1px solid var(--rule);font-size:16px;line-height:22px}
.ml-ledger__pts{font-family:var(--font-mono);font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:500}

/* Species block: data rows, never pictures. */
.ml-species{list-style:none;margin:0;padding:0}
.ml-species li{display:flex;justify-content:space-between;gap:var(--space-4);padding:var(--space-2) 0;border-bottom:1px solid var(--rule)}
.ml-species__pula{font-family:var(--font-mono);white-space:nowrap}
.ml-species__none{color:var(--ink-muted)}

/* Message preview: the outbound text as it would be sent. No phone chrome. */
.ml-msg{border:2px solid var(--ink);background:var(--paper-raised);max-width:420px}
.ml-msg__from{display:flex;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-4);border-bottom:1px solid var(--rule);font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase}
.ml-msg__body{padding:var(--space-4);font-size:18px;line-height:26px;white-space:pre-wrap}
.ml-msg__meta{padding:0 var(--space-4) var(--space-3);font-family:var(--font-mono);font-size:16px;line-height:22px;color:var(--ink-muted)}

/* Timeline: elapsed time in the margin, verbatim messages quoted. */
.ml-timeline{list-style:none;margin:0;padding:0;border-top:2px solid var(--rule-strong)}
.ml-timeline li{display:grid;grid-template-columns:var(--margin-col) 1fr;gap:0 var(--space-4);padding:var(--space-3) 0;border-bottom:1px solid var(--rule);min-height:var(--tap-row)}
.ml-timeline__t{font-family:var(--font-mono);font-size:16px;line-height:22px;color:var(--ink-muted);font-variant-numeric:tabular-nums}
.ml-timeline__t b{display:block;font-weight:500;color:var(--ink)}
.ml-timeline__what{font-weight:700;margin:0}
.ml-timeline__when{font-family:var(--font-mono);font-size:16px;line-height:22px;color:var(--ink-muted);margin:0}
.ml-timeline__detail{margin:var(--space-1) 0 0}
.ml-timeline__quote{margin:var(--space-2) 0 0;padding:var(--space-3) var(--space-4);border:1px solid var(--rule);background:var(--paper);font-size:16px;line-height:22px}

/* A long unbroken run (the plan link in a quoted text) breaks inside its box, and grid
   children may shrink, so no page scrolls sideways at 390 px (Addendum 1, A0). */
.ml-msg__body,.ml-timeline__quote,.ml-timeline__detail,.ml-quote{overflow-wrap:anywhere}
.ml-timeline li>div,.ml-entry>div{min-width:0}

/* Stamp: outlined, ink, dated. Prints as drawn. */
.ml-stamp{display:inline-block;border:3px solid var(--stamp);border-radius:var(--radius-0);padding:var(--space-2) var(--space-4);color:var(--stamp);text-align:center;background:var(--paper-raised)}
.ml-stamp__word{display:block;font:700 22px/26px var(--font-sans);letter-spacing:.12em;text-transform:uppercase}
.ml-stamp__date{display:block;font-family:var(--font-mono);font-size:16px;line-height:22px;margin-top:2px}

/* Receipt sheet */
.ml-receipt{max-width:var(--measure);margin:0 auto;background:var(--paper-raised);border:2px solid var(--rule-strong);padding:var(--space-6)}
.ml-receipt__title{font:700 32px/36px var(--font-slab);margin:var(--space-1) 0 var(--space-4)}
.ml-receipt__id{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3) var(--space-4);margin:0;padding:var(--space-3) 0;border-top:2px solid var(--rule-strong);border-bottom:2px solid var(--rule-strong)}
.ml-receipt__id dt{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-muted)}
.ml-receipt__id dd{margin:0;font-weight:700}
.ml-receipt__stamp{margin:var(--space-6) 0}
.ml-receipt__foot{margin-top:var(--space-6);padding-top:var(--space-3);border-top:2px solid var(--rule-strong);font-family:var(--font-mono);font-size:16px;line-height:22px}
.ml-receipt__hash{display:block;word-break:break-all;margin:0 0 var(--space-2)}
.ml-receipt__foot .ml-kicker{font-family:var(--font-sans);display:block;margin-bottom:var(--space-1)}

/* Legend and stepper */
.ml-legend{display:grid;grid-template-columns:auto 1fr;gap:var(--space-2) var(--space-4);margin:0;font-size:16px;line-height:22px}
.ml-legend dt{font-weight:700;display:flex;align-items:center;gap:var(--space-2)}
.ml-legend dt svg{width:22px;height:22px}
.ml-legend dd{margin:0;color:var(--ink-muted)}
.ml-stepper{display:flex;list-style:none;margin:0 0 var(--space-6);padding:0;border:2px solid var(--rule-strong)}
.ml-stepper li{flex:1;display:flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:var(--tap);font-weight:700;border-right:2px solid var(--rule-strong)}
.ml-stepper li:last-child{border-right:0}
.ml-stepper li[aria-current]{background:var(--ink);color:var(--on-ink)}
.ml-stepper .n{font-family:var(--font-mono);font-weight:500}
.ml-tabs{display:flex;list-style:none;margin:0 0 var(--space-4);padding:0;border-bottom:2px solid var(--rule-strong)}
.ml-tab{display:inline-flex;align-items:center;min-height:var(--tap);padding:0 var(--space-4);font-weight:700;background:none;border:0;border-radius:0;color:var(--ink);cursor:pointer;font-family:inherit;font-size:18px}
.ml-tab[aria-selected="true"]{background:var(--selected);box-shadow:inset 0 -4px 0 var(--ink)}

/* Note: the quiet line between rules. */
.ml-note{padding:var(--space-2) 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);font-size:16px;line-height:22px;color:var(--ink-muted)}

@media print{
  .ml{background:#fff;color:#000}
  .ml-banner,.ml-masthead,.ml-btn,.ml-actions,.ml-stepper,.ml-tabs{display:none!important}
  .ml-receipt{border:2px solid #000;max-width:none;padding:0}
  .ml-box,.ml-receipt__id,.ml-receipt__foot,.ml-timeline,.ml-ledger__lines{border-color:#000}
  .ml-stamp{border-color:#000;color:#000}
  .ml-status--action,.ml-readout__value{color:#000}
  .ml-entry--action .ml-entry__date::before,.ml-status--action svg .fill{background:#000;fill:#000}
  .ml-timeline li,.ml-box{break-inside:avoid}
}

/* ------------------------------------------------------------------------
   Page layout. Everything above this line is the design-system component
   stylesheet, verbatim. Everything below reads the same tokens and adds only
   page structure: masthead menu, hero, counts grid, lists, disclosure rows,
   dialog, footer, and the print rules for the receipt.
   ------------------------------------------------------------------------ */

@media (min-width:640px){:root{--gutter:24px}}

html{background:var(--paper)}
body.ml{margin:0;min-height:100vh;font-variant-numeric:tabular-nums}
[hidden]{display:none!important}
:where(.ml) :where(h1,h2,h3,h4,p,ul,ol,dl,dd,figure,blockquote,fieldset){margin:0}
:where(.ml) :where(fieldset){border:0;padding:0;min-width:0}
.ml :focus-visible{outline:var(--focus-w) solid var(--focus);outline-offset:2px}
/* ".ml a" in the component sheet outranks single classes; links that are
   buttons or the masthead name keep their own color and no underline. */
.ml a.ml-btn,.ml a.ml-masthead__name,.ml a.ml-skip{text-decoration:none;color:var(--ink)}
.ml a.ml-btn--primary{color:var(--on-ink)}
.ml .ml-stepper a{display:flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:var(--tap);color:inherit;text-decoration:none}
.ml .ml-stepper a:not([href]){color:var(--ink-faint);cursor:default}
.ml .ml-stepper li[aria-current] a{color:var(--on-ink)}
.ml-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.ml-skip{position:absolute;left:var(--gutter);top:-200px;z-index:10;display:inline-flex;align-items:center;min-height:var(--tap);padding:0 var(--space-4);background:var(--paper-raised);border:2px solid var(--ink);font-weight:700}
.ml-skip:focus{top:var(--space-2)}
.ml-mono-data{font-family:var(--font-mono);font-weight:400;font-variant-numeric:tabular-nums}

/* Masthead: full nav from 720 px; "Cases" plus a Menu disclosure below. */
.ml-masthead{position:relative}
.ml .ml-masthead__name{display:inline-flex;flex-direction:column;justify-content:center;min-height:var(--tap)}
.ml-masthead__nav{align-items:center}
.ml-masthead__nav .ml-nav-wide{display:none}
.ml-menu{position:static}
.ml-menu>summary{display:inline-flex;align-items:center;min-height:var(--tap);padding:0 var(--space-3);font-weight:700;cursor:pointer;list-style:none;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:2px}
.ml-menu>summary::-webkit-details-marker{display:none}
.ml-menu[open]>summary{background:var(--selected);box-shadow:inset 0 -3px 0 var(--ink);text-decoration:none}
.ml-menu__panel{position:absolute;left:0;right:0;top:100%;z-index:5;margin:0;padding:0 var(--gutter);list-style:none;background:var(--paper-raised);border-bottom:2px solid var(--ink)}
.ml-menu__panel li{border-top:1px solid var(--rule)}
.ml-menu__panel a{display:flex;align-items:center;min-height:var(--tap);font-weight:700}
@media (min-width:720px){
  .ml-masthead__nav .ml-nav-wide{display:list-item}
  .ml-masthead__nav .ml-nav-menu{display:none}
}

/* Vertical rhythm for a page and its sections. */
.ml-flow{display:flex;flex-direction:column;gap:var(--space-4)}
.ml-flow--loose{gap:var(--space-6)}
@media (min-width:720px){.ml-page--board.ml-flow--loose{gap:var(--space-8)}}
.ml-flow>.ml-box,.ml-flow>.ml-head,.ml-flow>.ml-stepper,.ml-flow>.ml-tabs{margin:0}
.ml-intro{display:flex;flex-direction:column;gap:var(--space-2)}
.ml-intro .ml-display{margin:0}

/* Action rows: stacked full width on phones; inline from 720 px where marked. */
.ml-actions--stack{flex-direction:column}
.ml-actions--stack>.ml-btn{display:flex;width:100%}
@media (min-width:720px){
  .ml-actions--inline-wide{flex-direction:row}
  .ml-actions--inline-wide>.ml-btn{display:inline-flex;width:auto}
}

/* Board hero: one column on phones, two from 880 px. */
.ml-hero{display:grid;gap:var(--space-6)}
.ml-hero__lead{display:flex;flex-direction:column;gap:var(--space-3)}
.ml-hero__roles{display:flex;flex-direction:column;gap:var(--space-4)}
.ml-hero__roles .ml-box{margin:0}
@media (min-width:880px){.ml-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--space-8);align-items:start}}

.ml-cohort-head{display:flex;flex-direction:column;gap:var(--space-2);margin-bottom:var(--space-4)}
.ml-cohort-head .ml-head{margin:0}
.ml-head .ml-small{font-family:var(--font-sans);font-weight:400}
.ml-readouts--counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4) var(--space-6)}
@media (min-width:720px){.ml-readouts--counts{grid-template-columns:repeat(6,minmax(0,1fr))}}
.ml-section-label{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-muted);margin:0 0 var(--space-3)}
.ml-entry .ml-btn{min-width:var(--tap)}
.ml-entries-empty{padding:var(--space-4) 0;color:var(--ink-muted)}
.ml-entries-caption{margin:var(--space-4) 0}

/* Lists inside boxes: glyph rows and label/value rows. */
.ml-plainlist{list-style:none;margin:0;padding:0}
.ml-plainlist li{display:flex;gap:var(--space-3);align-items:flex-start;padding:var(--space-2) 0;border-bottom:1px solid var(--rule)}
.ml-plainlist li:last-child{border-bottom:0}
.ml-plainlist svg{width:22px;height:22px;flex:none;margin-top:2px}
.ml-plainlist li>span{min-width:0;overflow-wrap:anywhere}
.ml-plainlist--small li{font-size:16px;line-height:22px}
.ml-kv{list-style:none;margin:0;padding:0}
.ml-kv li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:var(--space-1) var(--space-4);padding:var(--space-2) 0;border-bottom:1px solid var(--rule);font-size:16px;line-height:22px}
.ml-kv li:last-child{border-bottom:0}
.ml-kv__value{font-family:var(--font-mono);font-weight:500;white-space:nowrap}
.ml-kv__model{flex-basis:100%;color:var(--ink-muted)}
.ml-box p+p,.ml-box p+ul,.ml-box ul+p,.ml-box ol+p,.ml-box p+ol{margin-top:var(--space-2)}
.ml-box .ml-small{color:var(--ink)}
.ml-box__source a{color:var(--ink-muted)}
.ml-box--verdict .ml-box__head{margin-bottom:var(--space-2)}
.ml-subhead{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;margin:var(--space-4) 0 var(--space-2)}

/* Identity grid for "This case". */
.ml-id{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3) var(--space-4);margin:0}
.ml-id dt{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-muted)}
.ml-id dd{margin:0;font-weight:700;overflow-wrap:anywhere}
.ml-id__wide{grid-column:1 / -1}

/* Disclosure rows: 56 px, ruled, no animation. */
.ml-details{margin:0}
.ml-details+.ml-details{margin-top:var(--space-2)}
.ml-disclosure{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);min-height:var(--tap);padding:0 var(--space-4);border:2px solid var(--ink);background:var(--paper-raised);font-weight:700;cursor:pointer;list-style:none}
.ml-disclosure::-webkit-details-marker{display:none}
.ml-disclosure__sign{font-family:var(--font-mono);font-weight:500}
.ml-details[open]>.ml-disclosure .ml-disclosure__sign{transform:rotate(45deg)}
.ml-details__body{border:2px solid var(--ink);border-top:0;background:var(--paper-raised);padding:var(--space-4)}
.ml-pre{margin:0;max-height:480px;overflow:auto;font-family:var(--font-mono);font-size:16px;line-height:22px;white-space:pre-wrap;overflow-wrap:anywhere}

/* Readout value sized for a date and time. */
.ml-readout .ml-readout__value--text{font-size:20px;line-height:26px}
.ml-timeline__quote{white-space:pre-wrap;overflow-wrap:anywhere}

/* Alerts and empty states. */
.ml-alert{border:2px solid var(--ink);background:var(--paper-raised);padding:var(--space-3) var(--space-4);font-weight:700}
.ml-gate{display:flex;flex-direction:column;gap:var(--space-4)}

/* Partner review dialog. */
.ml-dialog{width:min(560px,calc(100vw - 2 * var(--gutter)));max-height:calc(100vh - 2 * var(--gutter));overflow:auto;border:2px solid var(--ink);border-radius:var(--radius-0);padding:var(--space-6) var(--gutter);background:var(--paper-raised);color:var(--ink);box-shadow:var(--shadow-none)}
.ml-dialog::backdrop{background:rgba(20,18,16,.6)}
.ml-dialog .ml-head{margin:0 0 var(--space-3)}

/* Message preview from line and timeline quotes keep the reader's words. */
.ml-msg{max-width:none}
.ml-quote{margin:0;padding:var(--space-3) var(--space-4);border:1px solid var(--rule);background:var(--paper);font-size:16px;line-height:22px;white-space:pre-wrap;overflow-wrap:anywhere}

/* Footer: the project line, contact, legal links as tap rows. */
.ml-footer{border-top:2px solid var(--ink);background:var(--paper-raised)}
.ml-footer__inner{max-width:var(--board-max);margin:0 auto;padding:var(--space-4) var(--gutter) var(--space-8);font-size:16px;line-height:22px;color:var(--ink-muted)}
.ml-footer__links{display:flex;flex-wrap:wrap;gap:0 var(--space-4);list-style:none;margin:0 0 var(--space-3);padding:0}
.ml-footer__links{margin-left:calc(-1 * var(--space-2))}
.ml-footer__links a{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);min-width:var(--tap);padding:0 var(--space-2);font-weight:700;color:var(--ink)}
.ml-footer p{margin:var(--space-1) 0}
.ml-footer__contact a{display:inline-flex;align-items:center;min-height:var(--tap);color:var(--ink)}
.ml-pagefoot{border-top:1px solid var(--rule);padding-top:var(--space-3);font-size:16px;line-height:22px;color:var(--ink-muted)}

/* Text pages (About, How a cohort starts, consent, privacy, terms, Impressum). */
.ml-prose ol,.ml-prose ul{padding-left:var(--space-6)}
.ml-prose li+li{margin-top:var(--space-2)}
.ml-prose .ml-box p+p{margin-top:var(--space-3)}

/* Receipt sheet on phones: the 24 px padding is too much at 390 px. */
@media (max-width:639px){.ml-receipt{padding:var(--space-4)}.ml-receipt .ml-ledger{grid-template-columns:repeat(3,auto);justify-content:start;column-gap:var(--space-6)}}
.ml-receipt .ml-box{margin:0 0 var(--space-4)}
.ml-receipt .ml-split{margin-bottom:var(--space-4)}
.ml-receipt .ml-split .ml-box{margin:0}
.ml-receipt__id div{min-width:0}
.ml-receipt__id dd{overflow-wrap:anywhere}
.ml-receipt__foot p{margin:0;font-family:var(--font-sans)}

@media print{
  :root{--paper:#ffffff;--paper-raised:#ffffff;--ink:#000000;--ink-muted:#333333;--ink-faint:#666666;--on-ink:#ffffff;--rule:#999999;--signal:#000000;--signal-text:#000000;--selected:#dddddd;--focus:#000000}
  @page{size:letter;margin:0.6in}
  html,body.ml{background:#fff}
  .ml-noprint,.ml-note,.ml-footer,.ml-pagefoot,.ml-skip,.ml-details,.ml-dialog{display:none!important}
  .ml-page{max-width:none;padding:0}
  .ml-receipt{border:0}
  .ml-receipt__id,.ml-receipt__stamp,.ml-receipt__foot{break-inside:avoid}
  .ml-quote{background:#fff;border-color:#999}
  a{color:#000}
}

/* Applicator's plan page (/p/<token>): phone first; prints on one sheet.
   Print sizes are in points with a 9 pt floor, as the receipt PDF (spec 9). */
.ml-plan .ml-receipt__id{margin:0}
.ml-plan .ml-box__source{margin-top:var(--space-3)}
@media print{
  .ml-plan-page .ml-page{font-size:10pt;line-height:13pt}
  .ml-plan-page .ml-display{font-size:16pt;line-height:19pt;margin:0}
  .ml-plan-page .ml-intro p{margin:2pt 0 0}
  .ml-plan-page .ml-flow{gap:5pt}
  .ml-plan-page .ml-box{padding:4pt 8pt;margin:0;border-width:1px}
  .ml-plan-page .ml-box__head{font-size:9pt;line-height:12pt;margin-bottom:2pt}
  .ml-plan-page .ml-box--verdict .ml-box__head{font-size:11pt;line-height:13pt}
  .ml-plan-page .ml-readout__value{font-size:13pt;line-height:16pt}
  .ml-plan-page .ml-readout__label,.ml-plan-page .ml-readout__source{font-size:9pt;line-height:11pt}
  .ml-plan-page .ml-note{display:none!important}
  .ml-plan-page .ml-plainlist li,.ml-plan-page .ml-ledger__lines li{padding:1pt 0;font-size:9pt;line-height:12pt}
  .ml-plan-page .ml-plainlist svg{width:10pt;height:10pt}
  .ml-plan-page .ml-receipt__id{padding:4pt 0;gap:2pt 10pt}
  .ml-plan-page .ml-receipt__id dt{font-size:9pt;line-height:11pt}
  .ml-plan-page .ml-receipt__id dd{font-size:10pt;line-height:12pt}
  .ml-plan-page .ml-ledger__lines{margin-top:4pt}
  .ml-plan-page .ml-box__source{font-size:9pt;line-height:11pt;margin-top:2pt}
  @page{size:letter;margin:0.5in}
}

/* Board, entries first (layout fix 4 Oct): short hero, three-step strip,
   entries, then roles and counts in one row, legend behind a disclosure. */
.ml-hero--short{display:flex;flex-direction:column;gap:var(--space-4)}
.ml-hero--short .ml-display{margin:0}
.ml-hero__descriptor{margin:var(--space-2) 0 0;font-size:16px;line-height:22px;color:var(--ink-muted);max-width:68ch}
@media (min-width:1024px){
  .ml-hero--short{flex-direction:row;align-items:center;justify-content:space-between;gap:var(--space-6)}
  .ml-hero--short .ml-actions{flex:none}
}
.ml-steps__list{list-style:none;margin:0;padding:0;display:grid;gap:var(--space-3)}
.ml-steps__list li{display:flex;gap:var(--space-3);align-items:flex-start;font-size:16px;line-height:22px}
.ml-steps__list b{display:block}
.ml-steps__n{flex:none;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:2px solid var(--ink);font:500 16px/1 var(--font-mono)}
@media (min-width:880px){.ml-steps__list{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-6)}}
.ml-linkbtn{align-self:flex-start;min-height:var(--tap);padding:0;border:0;background:none;color:var(--ink);font:700 16px/22px var(--font-sans);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.ml-counts{margin:var(--space-3) 0 0}

/* L1, a desk uses its width (Addendum 1): from 960 px the plan, the confirm page and the
   receipt widen to board-max, and a result's or a record's boxes flow in two columns. A text
   column (intro, form, reply) keeps measure. Phones stay one column. */
.ml-grid2{display:flex;flex-direction:column;gap:var(--space-4)}
.ml-grid2>.ml-box,.ml-grid2>.ml-split,.ml-grid2>.ml-details{margin:0}
@media (min-width:960px){
  .ml-page--wide{max-width:var(--board-max)}
  .ml-page--wide .ml-measure{max-width:var(--measure);width:100%}
  .ml-grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--space-4) var(--space-6);align-items:start}
  .ml-grid2>*{min-width:0}
  .ml-grid2>.ml-grid2__span{grid-column:1 / -1}
  .ml-page--wide .ml-receipt{max-width:none}
  .ml-page--wide .ml-receipt__id{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* L3, folded boxes (Addendum 1): a boxed section may be a <details> whose summary is the box
   head plus a one-line summary. Closed, it is one row carrying both; open, it is the box as
   before, its source line inside. Which boxes open by default is set per box with data-open
   ("always", or "desk" from 960 px) by app.js. Printing opens every fold. */
details.ml-box{padding:0}
details.ml-box>summary.ml-box__head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-1) var(--space-3);align-items:center;min-height:var(--tap);margin:0;padding:var(--space-2) var(--space-4);border-bottom:0;cursor:pointer;list-style:none;text-transform:none;letter-spacing:0}
details.ml-box>summary.ml-box__head::-webkit-details-marker{display:none}
details.ml-box>summary .ml-box__name{font:700 14px/18px var(--font-sans);letter-spacing:.08em;text-transform:uppercase}
details.ml-box>summary .ml-box__sum{grid-column:1 / -1;min-width:0;font:400 16px/22px var(--font-sans);color:var(--ink)}
.ml-box__sign{font-family:var(--font-mono);font-weight:500;font-size:18px;line-height:22px}
details.ml-box>summary .ml-box__sign{grid-column:2;grid-row:1}
details.ml-box[open]>summary.ml-box__head{border-bottom:2px solid var(--rule-strong)}
details[open]>summary .ml-box__sign{transform:rotate(45deg)}
details.ml-box[open]>summary .ml-box__sum{display:none}
details.ml-box>.ml-box__body{padding:var(--space-3) var(--space-4) var(--space-4)}
details.ml-lines{margin:var(--space-4) 0 0;border-top:2px solid var(--rule-strong)}
details.ml-lines>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:var(--tap);font-size:16px;line-height:22px;font-weight:700;cursor:pointer;list-style:none}
details.ml-lines>summary::-webkit-details-marker{display:none}
details.ml-lines>.ml-ledger__lines{margin:0;border-top:1px solid var(--rule)}
@media print{.ml-box__sign{display:none}}

/* L4, timeline quotes fold to their first line (Addendum 1); "Full text" opens the message
   verbatim. The summary row is a control: 56 px, 48 px for a fine pointer at a desk. */
details.ml-fold{margin:var(--space-2) 0 0;min-width:0}
details.ml-fold>summary{display:flex;gap:var(--space-3);align-items:center;min-width:0;min-height:var(--tap);padding:0 var(--space-4);border:1px solid var(--rule);background:var(--paper);font-size:16px;line-height:22px;cursor:pointer;list-style:none}
details.ml-fold>summary::-webkit-details-marker{display:none}
.ml-fold__first{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ml-fold__more,.ml-fold__less{flex:none;margin-left:auto;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.ml-fold__less{display:none}
details.ml-fold[open]>summary .ml-fold__first,details.ml-fold[open]>summary .ml-fold__more{display:none}
details.ml-fold[open]>summary .ml-fold__less{display:inline}
details.ml-fold>.ml-timeline__quote{margin-top:0;border-top:0}
/* Timeline rows on a desk: what and when on one line (the addendum's prototype stylesheet). */
.ml-timeline__t{white-space:nowrap}
@media (min-width:960px){
  .ml-timeline li>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 var(--space-4);align-items:baseline}
  .ml-timeline__detail,.ml-timeline__quote,.ml-timeline details.ml-fold{grid-column:1 / -1}
}

/* L7, board entries (Addendum 1): on a phone the status word sits on the title line,
   right-aligned, and an entry shows one action (Review, Open case, Replan, Open receipt);
   from 720 px the second action returns and the row reads date, title and meta, status,
   actions. Title and meta are grid children so they never shrink below a word. */
.ml-entry{grid-template-areas:"d t s" "d m m" "d a a";grid-template-columns:var(--margin-col) minmax(0,1fr) auto;align-items:start}
.ml-entry__date{grid-area:d}
.ml-entry__title{grid-area:t;min-width:0;overflow-wrap:anywhere}
.ml-entry .ml-entry__status{grid-area:s;margin-top:0;justify-self:end}
.ml-entry__meta{grid-area:m;min-width:0}
.ml-entry .ml-entry__actions{grid-area:a;flex-direction:row}
.ml-entry__actions .ml-btn{display:inline-flex;width:auto}
@media (max-width:719px){.ml-entry__actions>:nth-child(n+2){display:none}}
@media (min-width:720px){
  .ml-entry{grid-template-areas:"d t s a" "d m s a";grid-template-columns:var(--margin-col) minmax(0,1fr) auto auto;align-items:center}
  .ml-entry .ml-entry__actions{margin-top:0;justify-content:flex-end}
}

/* L9, the confirm page at a desk (Addendum 1): "This case" in three columns; the activity
   takes two thirds of the row so what and when share a line, the demo clock the third. */
@media (min-width:960px){
  .ml-page--wide .ml-id--3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ml-page--wide .ml-id--3 .ml-id__wide{grid-column:auto}
  .ml-grid2--activity{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
}

/* L6, one honesty line (Addendum 1) in place of the two boxes: what the rules calculated
   and whether the model layer was on, ruled above and below. Same words. */
.ml-honesty{display:flex;flex-wrap:wrap;gap:var(--space-1) var(--space-4);margin:0;padding:var(--space-2) 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);font-size:16px;line-height:22px}
.ml-honesty b{font-weight:700}
.ml-receipt .ml-honesty{margin:0}
@media print{.ml-honesty{border-color:#999}}

/* L2, desk density (Addendum 1): a fine pointer at a desk gets 16 px text on 24 px lines,
   48 px controls and rows, and 12/16 px box padding. A coarse pointer (a phone in the field,
   a tablet) keeps 18 px text and 56 px controls everywhere. Headings, readouts, the stamp and
   the 16 px floor are unchanged. */
@media (min-width:960px) and (pointer:fine){
  .ml{font-size:16px;line-height:24px}
  .ml-btn{min-height:48px;min-width:48px;font-size:16px;line-height:24px}
  .ml-input,.ml-masthead,.ml .ml-masthead__name,.ml-masthead__nav a,.ml-menu>summary,.ml-tab,.ml-disclosure,.ml-stepper li,.ml .ml-stepper a,.ml-check,.ml-linkbtn,.ml-footer__links a,.ml-footer__contact a{min-height:48px}
  .ml-footer__links a{min-width:48px}
  .ml-entry{min-height:48px;padding:var(--space-3) 0}
  .ml-timeline li{min-height:48px;padding:var(--space-2) 0}
  .ml-box{padding:var(--space-3) var(--space-4)}
  .ml-ledger__lines li,.ml-kv li{padding:var(--space-1) 0}
  details.ml-box>summary.ml-box__head,details.ml-lines>summary,details.ml-fold>summary{min-height:48px}
  details.ml-box>.ml-box__body{padding:var(--space-3) var(--space-4)}
}

/* Partner screens on desktop: 16 px body, 48 px rows and buttons, for a fine
   pointer only (L2). Phones and coarse pointers keep the 56 px touch sizes;
   applicator screens are not affected. */
@media (min-width:1024px) and (pointer:fine){
  .ml-partner{font-size:16px;line-height:22px}
  .ml-partner .ml-page--board{max-width:1120px;padding-top:var(--space-4)}
  .ml-partner .ml-btn{min-height:48px;min-width:48px;padding:0 var(--space-4);font-size:16px;line-height:22px}
  .ml-partner .ml-entry .ml-btn{min-width:48px}
  .ml-partner .ml-linkbtn{min-height:48px}
  .ml-partner .ml-disclosure{min-height:48px}
  .ml-partner .ml-entry{min-height:48px;padding:var(--space-2) 0}
  .ml-partner .ml-entry__title{font-size:18px;line-height:22px}
  .ml-partner .ml-entry__date b{font-size:22px;line-height:26px}
  .ml-partner .ml-box{padding:var(--space-3) var(--space-4)}
  .ml-partner .ml-readout--sm .ml-readout__value{font-size:24px;line-height:28px}
  .ml-partner .ml-display{font-size:32px;line-height:38px}
}
