/* ==========================================================================
   miegacentrs.lv · "Pacientiem" section · patient tools · v2 (after critique)
   One stylesheet for the hub, the prep page, the diary, the questionnaire
   engine and the CPAP letter. Loaded ONLY on the section's pages (in WP:
   wp_enqueue_style('mc-patient-tools', …/css/patient-tools.css, [], filemtime())).

   Rules (site design system, see U1-design-system.md, C1-design.md):
   - everything is scoped under .mc-pt (prefix mcp-), nothing global except
     the print block and the fixed bar offset on <body class="mcp-page">;
   - monochrome only: #000 #4b5563 #7b7b7b #374151 #d1d5db #e5e7eb #f3f4f6
     #f9fafb #fff. No colour for states: weight, size, black/grey contrast;
   - Helvetica Neue from the theme, weights 400 / 500 / 700 only;
   - frames are 1px (2px only for error states and the "partly filled" dot);
   - buttons are the site's text-only pills: no leading icons, no arrows
     (the round arrow is reserved for "learn more" on the site);
   - two-tone only on section h2; H1 of the hub hero and card titles solid;
   - audience 50-70+, mostly on a phone: body 17px, questions 19px, every
     tap target >= 48px (56px for answers), focus always visible, hover only
     under (hover:hover), and no sticky hover after a tap (hover:none).
   ========================================================================== */

.mc-pt{
  --mcp-ink:#000;
  --mcp-text2:#4b5563;
  --mcp-grey:#7b7b7b;
  --mcp-hover:#374151;
  --mcp-border:#d1d5db;
  --mcp-border-soft:#e5e7eb;
  --mcp-opt-border:#7b7b7b;      /* answer tiles: 4.2:1 on white (WCAG 1.4.11 needs 3:1; #d1d5db was 1.47:1) */
  --mcp-chip:#f3f4f6;
  --mcp-page:#f9fafb;
  --mcp-panel:#fff;
  --mcp-r:20px;
  --mcp-r-sm:16px;
  --mcp-r-opt:28px;              /* answer rows: a pill at 56px height, a soft rounded box when the text wraps */
  --mcp-tap:56px;
  --mcp-focus:0 0 0 3px #fff, 0 0 0 5px #000;
  font-size:17px;
  line-height:1.5;
  color:var(--mcp-ink);
  -webkit-text-size-adjust:100%;
}
@media (min-width:768px){ .mc-pt{font-size:18px} }

.mc-pt *, .mc-pt *::before, .mc-pt *::after{box-sizing:border-box}
.mc-pt p{margin:0 0 .9em}
.mc-pt p:last-child{margin-bottom:0}
.mc-pt a:not(.btn){color:inherit}
.mc-pt [hidden]{display:none!important}
.mcp-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* the tool pages keep the header static (smart sticky header is switched off there, C2 P1-1);
   anchors and focus jumps keep clear of the fixed bottom bar */
html.mcp-tool-html{scroll-padding-bottom:calc(var(--mcp-bar-h,0px) + var(--mcp-clear,0px) + 16px)}

/* main section rhythm from the theme (main section{margin-bottom:80/130px}) is too loose here */
main.content .mcp-sec{margin:0 0 40px}
@media (min-width:1024px){ main.content .mcp-sec{margin-bottom:64px} }

/* ---------- layout ---------- */
.mcp-wrap{max-width:760px;margin:0 auto}
.mcp-wrap--wide{max-width:1040px}
.mcp-mt{margin-top:22px}
.mcp-mt-s{margin-top:16px}
.mcp-mt-l{margin-top:32px}
.mcp-muted{color:var(--mcp-text2)}
.mcp-small{font-size:15px;line-height:1.45;color:var(--mcp-text2)}

/* ---------- top line: back link + language link ---------- */
.mcp-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;margin:4px 0 14px}
.mcp-back{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 4px 0 0;font-size:16px;font-weight:500;color:var(--mcp-text2);text-decoration:none}
.mcp-back svg{width:9px;height:16px;flex:0 0 auto}
.mcp-back:focus-visible{outline:2px solid #000;outline-offset:2px;border-radius:8px}
@media (hover:hover){ .mcp-back:hover{color:#000} }

/* language = a quiet text link to the other language ("Русский" / "Latviski"), 48px tall tap area
   (C1 #6: no 112x50 segment hanging on its own row; C2 P3: target >= 48px) */
.mcp-lang{display:inline-flex;align-items:center;gap:4px 16px;flex-wrap:wrap;justify-content:flex-end}
.mcp-lang a{display:inline-flex;align-items:center;min-height:48px;padding:0 2px;font-size:16px;font-weight:500;color:#000;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px;-webkit-tap-highlight-color:transparent}
.mcp-lang a:focus-visible{outline:2px solid #000;outline-offset:2px;border-radius:6px}
@media (hover:hover){ .mcp-lang a:hover{text-decoration-thickness:2px} }

/* ---------- page head ---------- */
.mcp-head{padding:0 0 8px}
.mcp-eyebrow{display:block;margin:0 0 10px;font-size:14px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--mcp-text2)}
/* H1 = the theme's h1 scale (clamp 2rem..3.5rem, lh 1.2, -.04em) */
.mc-pt .mcp-title{margin:0 0 14px;font-size:clamp(2rem,3.889vw,3.5rem);line-height:1.2;letter-spacing:-.04em;font-weight:700;color:#000}
.mc-pt .mcp-title span{color:var(--mcp-grey)}
.mcp-lead{max-width:40em;margin:0 0 12px;font-size:17px;line-height:1.55;color:var(--mcp-text2)}
@media (min-width:1024px){ .mcp-lead{font-size:20px} }
/* meta = one quiet grey line ("~15 min · 9 sadaļas · Saglabājas automātiski"), not SaaS tags (C1 #10) */
.mc-pt .mcp-meta{margin:0;font-size:16px;line-height:1.5;color:var(--mcp-text2)}
.mcp-howto{margin:0 0 10px}
.mcp-howto summary{display:inline-flex;align-items:center;min-height:48px;font-size:16px;font-weight:500;text-decoration:underline;text-underline-offset:3px;cursor:pointer;list-style:none}
.mcp-howto summary::-webkit-details-marker{display:none}
.mcp-howto summary:focus-visible{outline:2px solid #000;outline-offset:2px;border-radius:6px}
.mcp-howto[open] summary{margin-bottom:4px}

/* ---------- headings inside tools ---------- */
.mc-pt .mcp-h2{margin:0 0 12px;font-size:clamp(24px,6.4vw,34px);line-height:1.2;letter-spacing:-.04em;font-weight:700}
.mc-pt .mcp-h2 span{color:var(--mcp-grey)}
.mc-pt .mcp-h3{margin:0 0 8px;font-size:19px;line-height:1.3;font-weight:700;letter-spacing:-.01em}
/* card titles: solid, one step below the section h2 (C1 #7) */
.mc-pt .mcp-card-title{margin:0 0 12px;font-size:clamp(20px,5.4vw,26px);line-height:1.25;letter-spacing:-.03em;font-weight:700;color:#000}
.mc-pt .mcp-card-title span,.mc-pt .mcp-h3 span{color:inherit}

/* ---------- surfaces ---------- */
.mcp-card{background:#fff;border:1px solid var(--mcp-border);border-radius:var(--mcp-r);padding:22px 20px}
@media (min-width:768px){ .mcp-card{padding:32px} }
.mcp-card + .mcp-card{margin-top:16px}
.mcp-note{background:var(--mcp-chip);border-radius:var(--mcp-r-sm);padding:16px 18px;font-size:16px;line-height:1.5;color:#000}
.mcp-note strong{font-weight:700}
.mcp-callout{display:flex;gap:14px;align-items:flex-start;background:#fff;border:1px solid #000;border-radius:var(--mcp-r-sm);padding:16px 18px}
.mcp-callout p{font-size:16px}
.mcp-callout .mcp-callout-title{display:block;font-weight:700;margin:0 0 4px;font-size:17px}
.mcp-callout > div{flex:1 1 auto;min-width:0}
/* safety callout (PHQ-9 item 9): the one place that keeps a heavy 2px frame */
.mcp-callout--alert{border-width:2px;margin-top:14px}
.mcp-callout--alert p{font-weight:500}
.mcp-tip{display:flex;gap:10px;align-items:flex-start;margin:14px 0 0;font-size:15px;line-height:1.45;color:var(--mcp-text2)}
.mcp-tip .mcp-ico-circle{flex:0 0 24px;width:24px;height:24px;font-size:14px;background:var(--mcp-chip);color:#000}

.mcp-ico-circle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;border-radius:50%;background:#000;color:#fff;font-size:17px;font-weight:700;line-height:1}
.mcp-ico-circle--ghost{background:#fff;color:#000;border:2px solid #000}
.mcp-ico-circle svg{width:16px;height:16px}

/* ---------- buttons (site .btn: text only, weight 400; bigger, calmer sizes for tools) ---------- */
.mc-pt .btn{height:auto;min-height:52px;font-size:17px;font-weight:400;padding:12px 26px;white-space:normal;text-align:center;line-height:1.3}
.mc-pt .btn.mcp-btn-xl{min-height:60px;font-size:18px;padding:14px 28px}
.mc-pt .btn:focus-visible{outline:none;box-shadow:var(--mcp-focus)}
.mc-pt .btn[disabled],.mc-pt .btn[aria-disabled="true"]{opacity:.55;pointer-events:none}
.mc-pt .btn .mcp-spinner{margin-right:4px}
/* touch screens: no sticky :hover after a tap (STOP-Bang bug class, C1 #14) */
@media (hover:none){
  .mc-pt .btn-dark,.mcp-bar .btn-dark{--bs-btn-hover-bg:#000;--bs-btn-hover-border-color:#000;--bs-btn-hover-color:#fff}
  .mc-pt .btn-outline-dark,.mcp-bar .btn-outline-dark{--bs-btn-hover-bg:transparent;--bs-btn-hover-color:#000;--bs-btn-hover-border-color:#000}
}
.mcp-btns{display:flex;flex-direction:column;gap:12px}
.mcp-btns .btn{width:100%;justify-content:center}
@media (min-width:768px){
  /* site .buttons are inline >= 768: no 600-970px wide buttons on desktop (C1 #13) */
  .mcp-btns{flex-direction:row;flex-wrap:wrap;align-items:center}
  .mcp-btns .btn{width:auto;min-width:280px}
  .mcp-btns--stack{flex-direction:column;align-items:flex-start}
}
.mcp-linkbtn{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0;border:0;background:none;font:inherit;font-size:16px;font-weight:500;color:#000;text-decoration:underline;text-underline-offset:3px;cursor:pointer;text-align:left}
.mcp-linkbtn:focus-visible{outline:2px solid #000;outline-offset:3px;border-radius:6px}
.mcp-linkbtn--muted{color:var(--mcp-text2)}

/* ---------- action rows (hub) — the /card/ .mc-action pattern, shared ---------- */
.mcp-actions{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}
.mcp-action{
  position:relative;display:flex;align-items:center;gap:12px;min-height:84px;padding:16px 14px;
  background:#fff;border:1px solid var(--mcp-border);border-radius:var(--mcp-r);color:#000;text-decoration:none;
  transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease;-webkit-tap-highlight-color:transparent;touch-action:manipulation
}
@media (min-width:560px){ .mcp-action{gap:16px;padding:16px 18px} }
.mcp-action:active{transform:scale(.985)}
.mcp-action:focus-visible{outline:none;box-shadow:var(--mcp-focus)}
@media (hover:hover){ .mcp-action:hover{border-color:#000;box-shadow:0 4px 18px rgba(0,0,0,.06)} }
.mcp-action .mcp-num,.mcp-action .mcp-ico{
  flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:var(--mcp-chip);
  display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700
}
@media (min-width:560px){ .mcp-action .mcp-num,.mcp-action .mcp-ico{flex-basis:46px;width:46px;height:46px;font-size:19px} }
.mcp-action .mcp-ico svg{width:22px;height:22px}
.mcp-action .mcp-txt{flex:1 1 auto;min-width:0}
.mcp-action .mcp-label{display:block;font-size:18px;line-height:1.25;font-weight:700;letter-spacing:-.01em}
.mcp-action .mcp-hint{display:block;margin-top:4px;font-size:15px;line-height:1.35;color:var(--mcp-text2)}
.mcp-action .mcp-chev{flex:0 0 auto;width:9px;height:16px;opacity:.4}
.mcp-action .mcp-status{display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:3px 10px;border-radius:999px;border:1px solid #000;font-size:14px;font-weight:500}

/* ---------- hub ---------- */
/* hero = the theme's .s-hero-page (white panel, centred .hero-text); only the lead width is ours */
.mc-pt .s-hero-page .hero-text p{max-width:34em;margin:0 auto}
.mcp-hub-block{margin:0 0 40px}
@media (min-width:1024px){
  .mcp-hub-block{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:48px;align-items:start;margin-bottom:72px}
}
.mcp-hub-block .mcp-h2{margin-bottom:10px}
.mcp-hub-block .mcp-blocklead{color:var(--mcp-text2);margin:0 0 18px}
.mcp-after{margin-top:20px;font-size:16px;color:var(--mcp-text2)}
.mcp-after a{display:inline-block;padding:10px 0;margin:-10px 0;font-weight:500;color:#000}

/* ---------- prep (checklist, rules, address) ---------- */
.mcp-checklist{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.mcp-check{position:relative}
.mcp-check label{display:flex;align-items:center;gap:14px;min-height:var(--mcp-tap);padding:12px 18px;background:#fff;border:1px solid var(--mcp-opt-border);border-radius:var(--mcp-r-opt);cursor:pointer;font-size:18px;-webkit-tap-highlight-color:transparent}
.mcp-check .mcp-box{flex:0 0 28px;width:28px;height:28px;border:2px solid #000;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#fff}
.mcp-check .mcp-box svg{width:16px;height:16px;opacity:0}
.mcp-check input:checked + label .mcp-box{background:#000}
.mcp-check input:checked + label .mcp-box svg{opacity:1}
.mcp-check input:checked + label .mcp-check-txt{text-decoration:line-through;text-decoration-thickness:1px;color:var(--mcp-text2)}
.mcp-check input:focus-visible + label{box-shadow:var(--mcp-focus)}
.mcp-rules{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}
.mcp-rule{display:flex;gap:14px;align-items:flex-start;padding:18px;background:#fff;border:1px solid #000;border-radius:var(--mcp-r-sm);font-size:17px;font-weight:700;line-height:1.4}
.mcp-place{display:flex;flex-direction:column;gap:14px}
.mcp-place .mcp-addr{margin:0;font-size:20px;font-weight:700;line-height:1.35;letter-spacing:-.01em}
.mcp-place .mcp-addr small{display:block;font-size:17px;font-weight:400;color:var(--mcp-text2);letter-spacing:0;margin-top:4px}
.mcp-pills{display:flex;flex-wrap:wrap;gap:10px}
.mcp-pill{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 20px;border:1px solid #000;border-radius:999px;background:#fff;color:#000;font-size:16px;font-weight:500;text-decoration:none}
.mcp-pill:focus-visible{outline:none;box-shadow:var(--mcp-focus)}
@media (hover:hover){ .mcp-pill:hover{background:#000;color:#fff} }
.mcp-grid2{display:grid;gap:16px}
@media (min-width:1024px){ .mcp-grid2{grid-template-columns:1fr 1fr;gap:24px} }

/* ---------- questionnaire: section head ---------- */
.mcp-step-head{margin:0 0 22px}
.mcp-step-count{display:block;margin:0 0 8px;font-size:15px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--mcp-text2)}
.mcp-section-intro{margin:0 0 8px}

/* ---------- questions ---------- */
.mcp-qs{display:flex;flex-direction:column}
/* choice questions (fieldset): bold question + hairline between questions */
.mcp-q{margin:0;padding:22px 0;border:0;border-top:1px solid var(--mcp-border-soft);min-width:0}
.mcp-qs > .mcp-q:first-child{border-top:0}
.mcp-qs > .mcp-q:first-child{padding-top:4px}
/* legend floated like Bootstrap reboot does: a non-floated (rendered) legend sits above the fieldset padding and leaves a gap */
.mcp-q > legend{float:left;width:100%;margin:0;padding:0 0 12px;font-size:19px;line-height:1.35;font-weight:700;letter-spacing:-.01em;color:#000}
.mcp-q > legend + *{clear:left}
@media (min-width:768px){ .mcp-q > legend{font-size:20px} }
.mcp-q-num{display:block;margin:0 0 4px;font-size:14px;font-weight:500;color:var(--mcp-text2);letter-spacing:.02em}
/* "(obligāti)": quiet inline text, never a badge, never orphaned on its own line (C1 #5) */
.mcp-req{display:inline;margin-left:5px;font-size:15px;font-weight:400;letter-spacing:0;color:var(--mcp-text2);white-space:nowrap}
/* "Nav atbildes": shown next to unanswered questions when the patient came from the review screen (C2 P2-15) */
.mcp-noans{display:inline-block;margin-left:8px;padding:1px 10px;border-radius:999px;background:#000;color:#fff;font-size:14px;font-weight:500;letter-spacing:0;vertical-align:2px;white-space:nowrap}
.mcp-hint{margin:0 0 12px;font-size:16px;line-height:1.45;color:var(--mcp-text2)}
.mcp-q-note{padding:18px 0 4px;border-top:1px solid var(--mcp-border-soft)}
.mcp-q-note:first-child{border-top:0;padding-top:0}

/* text fields: plain label above the pill, like the site's contact form (C1 #3) */
.mcp-fields{display:flex;flex-direction:column;gap:18px;padding:4px 0 22px}
.mcp-field{min-width:0}
.mcp-field .mcp-q-label,.mcp-field > legend.mcp-q-label{display:block;width:100%;float:none;margin:0 0 8px;padding:0;font-size:17px;line-height:1.35;font-weight:500;letter-spacing:0;color:#000}
.mcp-field .mcp-hint{margin:-2px 0 10px;font-size:15px}
.mcp-field fieldset{border:0;margin:0;padding:0;min-width:0}
/* a choice question inside a field panel (gender in "Pacienta dati") reads like a field label */
.mcp-fields .mcp-q{padding:0;border:0}
.mcp-fields .mcp-q > legend{font-size:17px;font-weight:500;letter-spacing:0;padding-bottom:8px}
.mcp-fields--plain{padding:0}
.mcp-computed{margin:10px 0 0;font-size:16px;color:var(--mcp-text2)}
.mcp-computed b{color:#000;font-weight:700}

/* desktop: choice questions as white cards, every run of text fields as ONE white panel */
@media (min-width:768px){
  .mcp-qs{gap:14px}
  .mcp-q,.mcp-qs > .mcp-q:first-child{padding:26px 30px;background:#fff;border:1px solid var(--mcp-border);border-radius:var(--mcp-r)}
  .mcp-q-note,.mcp-q-note:first-child{border:0;padding:0}
  .mcp-fields{padding:32px;gap:22px 24px;background:#fff;border:1px solid var(--mcp-border);border-radius:var(--mcp-r)}
  .mcp-fields--grid{display:grid;grid-template-columns:1fr 1fr}
  .mcp-fields--grid .mcp-field--wide{grid-column:1 / -1}
  .mcp-fields .mcp-q,.mcp-fields .mcp-q:first-child{padding:0;background:none;border:0;border-radius:0}
  .mcp-fields--plain{padding:0;background:none;border:0;border-radius:0}
  .mcp-q--row{display:flow-root}
  .mcp-q--row > legend{float:left;width:calc(100% - 264px);margin:0;padding:12px 0 0}
  .mcp-q--row > legend + *{clear:none}
  .mcp-q--row .mcp-seg{float:right;width:240px;margin-top:0!important}
  .mcp-q--row .mcp-err,.mcp-q--row .mcp-hint,.mcp-q--row .mcp-callout{clear:both}
}

/* ---------- answer options (radio rows) ---------- */
.mcp-opts{display:flex;flex-direction:column;gap:10px;margin:0;padding:0}
.mcp-opt{position:relative;display:block;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.mcp-opt input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.mcp-opt-box{
  display:flex;align-items:center;gap:14px;min-height:var(--mcp-tap);padding:12px 20px 12px 16px;
  background:#fff;border:1px solid var(--mcp-opt-border);border-radius:var(--mcp-r-opt);
  font-size:17px;line-height:1.35;color:#000;transition:background .15s ease,border-color .15s ease,color .15s ease
}
.mcp-opt-ind{flex:0 0 24px;width:24px;height:24px;border-radius:50%;border:2px solid #000;background:#fff;position:relative}
.mcp-opt-box.has-num .mcp-opt-ind{display:none}
.mcp-opt-num{flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:var(--mcp-chip);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:17px}
.mcp-opt-txt{flex:1 1 auto;min-width:0}
@media (hover:hover){ .mcp-opt:hover .mcp-opt-box{border-color:#000} }
.mcp-opt input:focus-visible + .mcp-opt-box{box-shadow:var(--mcp-focus)}
.mcp-opt input:checked + .mcp-opt-box{background:#000;border-color:#000;color:#fff;font-weight:500}
.mcp-opt input:checked + .mcp-opt-box .mcp-opt-ind{border-color:#fff;background:#000}
.mcp-opt input:checked + .mcp-opt-box .mcp-opt-ind::after{content:"";position:absolute;inset:4px;border-radius:50%;background:#fff}
.mcp-opt input:checked + .mcp-opt-box .mcp-opt-num{background:#fff;color:#000}

/* scale questions on wider screens: options in one row (tiles = card radius) */
@media (min-width:768px){
  .mcp-opts--scale{display:grid;grid-template-columns:repeat(var(--n,4),minmax(0,1fr));gap:8px}
  .mcp-opts--scale .mcp-opt-box{flex-direction:column;align-items:flex-start;gap:8px;height:100%;padding:12px 14px;font-size:15px;border-radius:var(--mcp-r)}
  .mcp-opts--scale .mcp-opt-ind{display:none}
}

/* two-option segmented (Jā / Nē, Vīrietis / Sieviete): full pills like the site buttons */
.mcp-seg{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mcp-seg .mcp-opt-box{justify-content:center;text-align:center;font-weight:500;font-size:18px;border-radius:999px;padding:12px 16px}
.mcp-seg .mcp-opt-ind{display:none}

/* quick fill */
.mcp-quickfill{display:flex;justify-content:flex-start;margin:6px 0 0}
@media (min-width:768px){ .mcp-quickfill{margin-top:4px} }

/* ---------- text inputs (site pill fields, bigger) ---------- */
.mcp-input{
  display:block;width:100%;min-height:var(--mcp-tap);padding:12px 22px;margin:0;
  background:#fff;border:1px solid #000;border-radius:48px;color:#000;
  font:inherit;font-size:18px;line-height:1.3;-webkit-appearance:none;appearance:none
}
textarea.mcp-input{min-height:120px;border-radius:var(--mcp-r-sm);resize:vertical;padding:14px 18px}
.mcp-input::placeholder{color:var(--mcp-text2);opacity:1}
.mcp-input:focus{outline:none;box-shadow:var(--mcp-focus)}
input.mcp-input[type="time"],input.mcp-input[type="date"]{font-size:20px;font-weight:500;min-width:0}
input.mcp-input[type="time"]::-webkit-calendar-picker-indicator{opacity:.6}
.mcp-unit{position:relative;display:block}
.mcp-unit .mcp-input{padding-right:64px}
.mcp-unit .mcp-unit-txt{position:absolute;right:22px;top:50%;transform:translateY(-50%);font-size:17px;color:var(--mcp-text2);pointer-events:none}
.mcp-dmy{display:grid;grid-template-columns:minmax(0,76px) minmax(0,76px) minmax(0,108px);gap:10px}
.mcp-dmy label{display:block;margin:0 0 6px;font-size:15px;color:var(--mcp-text2)}
.mcp-dmy .mcp-input{padding:12px 8px;text-align:center}
.mcp-field-err .mcp-input,.mcp-input[aria-invalid="true"]{border-width:2px}
.mcp-err{display:flex;align-items:flex-start;gap:10px;margin:10px 0 0;font-size:16px;font-weight:700;color:#000}
.mcp-err::before{content:"!";flex:0 0 22px;width:22px;height:22px;border-radius:50%;background:#000;color:#fff;font-size:14px;line-height:22px;text-align:center;font-weight:700}
.mcp-err--inline{margin:0}

/* ---------- error summary / reminders ---------- */
.mcp-errsum{margin:0 0 20px;padding:18px;border:2px solid #000;border-radius:var(--mcp-r-sm);background:#fff}
.mcp-errsum strong{display:block;margin:0 0 6px}
.mcp-errsum ul{margin:0;padding-left:20px}
.mcp-errsum li{margin:0}
.mcp-errsum a{display:inline-block;padding:6px 0;font-weight:500}
.mcp-reminder{border-width:1px}

/* ---------- intro / resume ---------- */
.mcp-start{margin:20px 0 0}
.mcp-steps-ol{counter-reset:s;margin:0 0 22px;padding:0;list-style:none;display:flex;flex-direction:column;gap:14px}
.mcp-steps-ol li{counter-increment:s;position:relative;padding-left:46px;min-height:32px;font-size:17px;line-height:1.45}
.mcp-steps-ol li::before{content:counter(s);position:absolute;left:0;top:-2px;width:32px;height:32px;border-radius:50%;background:#000;color:#fff;font-weight:700;font-size:16px;display:flex;align-items:center;justify-content:center}
.mcp-toc{margin:18px 0 0;padding:0;list-style:none;border-top:1px solid var(--mcp-border-soft)}
.mcp-toc li{border-bottom:1px solid var(--mcp-border-soft)}
.mcp-toc .row{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;margin:0;padding:0;border:0;background:none;font:inherit;font-size:16px;color:#000;text-align:left}
.mcp-toc button.row{cursor:pointer}
.mcp-toc button.row:focus-visible{outline:2px solid #000;outline-offset:2px;border-radius:6px}
.mcp-toc button.row .t{text-decoration:underline;text-underline-offset:3px}
.mcp-toc .n{flex:0 0 28px;width:28px;height:28px;border-radius:50%;border:1px solid var(--mcp-border);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500}
.mcp-toc .done .n{background:#000;border-color:#000;color:#fff}
.mcp-toc .s{margin-left:auto;font-size:14px;color:var(--mcp-text2);white-space:nowrap}
.mcp-attrib{margin:14px 0 0;font-size:13px;color:var(--mcp-text2)}

/* ---------- review ---------- */
.mcp-review{margin:0;padding:0;list-style:none;border-top:1px solid var(--mcp-border-soft)}
.mcp-review li{display:flex;align-items:center;gap:14px;padding:12px 0;min-height:64px;border-bottom:1px solid var(--mcp-border-soft)}
.mcp-review .t{flex:1 1 auto;min-width:0}
.mcp-review .t b{display:block;font-size:17px;line-height:1.3}
.mcp-review .t span{display:block;font-size:15px;color:var(--mcp-text2)}
.mcp-review .t span.is-missing{color:#000;font-weight:700}
.mcp-review .mcp-linkbtn{flex:0 0 auto;min-width:56px;justify-content:flex-end}
.mcp-final{margin:0 0 28px}
.mcp-final .mcp-card-title{margin-bottom:6px}
.mcp-sendhelp{margin-top:18px;padding:20px;border-radius:var(--mcp-r-sm);background:var(--mcp-chip)}
.mcp-sendhelp ol{margin:10px 0 16px;padding-left:22px}
.mcp-sendhelp li{margin:0 0 8px}
.mcp-sendhelp .mcp-file{font-weight:700;overflow-wrap:anywhere}
.mcp-sendhelp .mcp-btns{margin-top:4px}
.mcp-done{margin-top:18px}
.mcp-status-line{display:block;min-height:28px;margin:12px 0 0;font-size:16px;font-weight:500;overflow-wrap:anywhere}
.mcp-status-line:empty{display:none}
.mcp-status-line a{display:inline-block;padding:12px 0;margin:-12px 0;font-weight:700}
.mcp-spinner{display:inline-block;vertical-align:-3px;margin-right:10px;width:18px;height:18px;border:2px solid var(--mcp-border);border-top-color:#000;border-radius:50%;animation:mcp-spin .8s linear infinite}
.btn-dark .mcp-spinner{border-color:rgba(255,255,255,.35);border-top-color:#fff}
@keyframes mcp-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){ .mcp-spinner{animation:none} }

/* ---------- privacy + delete ---------- */
.mcp-privacy{display:flex;flex-direction:column;gap:10px;margin:28px 0 0;padding:18px 0 0;border-top:1px solid var(--mcp-border)}
.mcp-privacy p{display:flex;gap:10px;align-items:flex-start;margin:0;font-size:15px;line-height:1.5;color:var(--mcp-text2)}
.mcp-privacy p svg{flex:0 0 18px;width:18px;height:18px;margin-top:2px}
.mcp-privacy p .mcp-gap{flex:0 0 18px;width:18px}
.mcp-privacy .mcp-linkbtn{align-self:flex-start}

/* ---------- fixed bottom action bar ---------- */
body.mcp-has-bar{padding-bottom:calc(var(--mcp-bar-h,132px) + var(--mcp-clear,0px))}
.mcp-bar{
  position:fixed;left:0;right:0;bottom:var(--mcp-clear,0px);z-index:90;
  background:#fff;border-top:1px solid var(--mcp-border-soft);box-shadow:0 -8px 28px rgba(0,0,0,.07);
  padding:10px 16px calc(12px + env(safe-area-inset-bottom,0px))
}
/* on-screen keyboard open (touch): the bar steps aside so it never covers the field (C2 P2-14) */
body.mcp-typing .mcp-bar{visibility:hidden}
.mcp-bar-in{max-width:760px;margin:0 auto}
.mcp-bar-meta{display:flex;align-items:center;gap:12px;margin:0 0 10px;font-size:14px;color:var(--mcp-text2);line-height:1.2}
.mcp-bar-meta b{color:#000;font-weight:700;font-size:15px;white-space:nowrap}
.mcp-track{flex:1 1 auto;height:8px;border-radius:999px;background:var(--mcp-chip);overflow:hidden}
.mcp-track i{display:block;height:100%;background:#000;border-radius:999px;transition:width .35s ease}
.mcp-saved{white-space:nowrap}
.mcp-saved::before{content:"✓ ";font-weight:700;color:#000}
.mcp-saved.is-pending::before{content:""}
.mcp-saved.is-off{color:#000;font-weight:700}
.mcp-saved.is-off::before{content:"! ";}
.mcp-bar-btns{display:flex;gap:10px;align-items:center}
.mc-pt .mcp-bar-btns .btn{min-height:54px;margin:0}
.mcp-bar-btns .mcp-bar-back{flex:0 0 auto;min-width:120px}
.mcp-bar-btns .mcp-bar-next{flex:1 1 auto;justify-content:center}
.mcp-bar-btns .mcp-bar-note{flex:1 1 auto;font-size:16px;font-weight:700}
.mc-pt .mcp-bar-btns .mcp-bar-note + .btn{flex:0 0 auto;padding:12px 18px}
.mcp-bar-btns .mcp-bar-note{min-width:0;line-height:1.25}
@media (min-width:768px){
  .mcp-bar-btns .mcp-bar-next{flex:0 1 340px;margin-left:auto}
}

/* ---------- confirm dialog + toast ---------- */
.mcp-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:flex-end;justify-content:center;background:rgba(0,0,0,.45);padding:16px}
@media (min-width:768px){ .mcp-modal{align-items:center} }
.mcp-modal-box{width:100%;max-width:480px;background:#fff;border-radius:var(--mcp-r);padding:24px 22px calc(20px + env(safe-area-inset-bottom,0px))}
.mcp-modal-box p{font-size:18px;font-weight:500;margin:0 0 18px}
.mcp-modal-box .mcp-btns{flex-direction:column;align-items:stretch}
.mcp-modal-box .mcp-btns .btn{width:100%;min-width:0}
.mcp-toast{position:fixed;left:50%;bottom:calc(var(--mcp-bar-h,0px) + var(--mcp-clear,0px) + 16px);transform:translateX(-50%);z-index:99990;max-width:calc(100% - 32px);padding:14px 22px;border-radius:999px;background:#000;color:#fff;font-size:16px;font-weight:500;box-shadow:0 8px 24px rgba(0,0,0,.2)}

/* ---------- diary ---------- */
.mcp-dprog{margin:18px 0 0;font-weight:700}
/* 14 days = 2 rows of 7 (weeks). The grid uses the card padding so tiles get ~42px on a 390 phone;
   on phones the tile shows only the day number (the date is in the day row) */
.mcp-dots{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:12px -8px 0;padding:0;list-style:none}
.mcp-dot{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:52px;border:1px solid var(--mcp-border);border-radius:14px;background:#fff;font:inherit;font-size:17px;font-weight:700;color:#000;cursor:pointer;line-height:1.1;padding:4px 0}
.mcp-dot small{display:none;font-size:13px;font-weight:400;color:var(--mcp-text2);margin-top:3px}
@media (min-width:768px){ .mcp-dots{gap:8px;margin:14px 0 0} .mcp-dot{font-size:16px;min-height:56px} .mcp-dot small{display:block} }
.mcp-dot.is-partial,.mcp-dot.is-check{border:2px solid #000}
.mcp-dot.is-done{background:#000;border-color:#000;color:#fff}
.mcp-dot.is-done small{color:#d1d5db}
.mcp-dot.is-current{box-shadow:0 0 0 2px #fff,0 0 0 4px #000}
.mcp-dot:focus-visible{outline:none;box-shadow:var(--mcp-focus)}
.mcp-dsetup{display:grid;grid-template-columns:1fr;gap:16px}
@media (min-width:768px){ .mcp-dsetup{grid-template-columns:1fr 1fr} }
.mcp-dsetup label{display:block;margin:0 0 8px;font-size:17px;font-weight:500;line-height:1.3}
.mcp-days{display:flex;flex-direction:column;gap:12px}
.mcp-day{background:#fff;border:1px solid var(--mcp-border);border-radius:var(--mcp-r);overflow:hidden;scroll-margin-top:16px}
.mcp-day.is-open{border-color:#000}
.mcp-day-head{display:flex;align-items:center;gap:14px;width:100%;min-height:72px;padding:14px 18px;border:0;background:none;font:inherit;text-align:left;color:#000;cursor:pointer}
.mcp-day-head:focus-visible{outline:none;box-shadow:inset 0 0 0 3px #000}
.mcp-day-head .t{flex:1 1 auto;min-width:0}
.mcp-day-head .t b{display:block;font-size:19px;line-height:1.25}
.mcp-day-head .t span{display:block;font-size:15px;color:var(--mcp-text2)}
.mcp-day-head .r{flex:0 0 auto;text-align:right;font-size:15px;font-weight:500}
.mcp-day-head .r.is-check{font-weight:700}
.mcp-day-head .mcp-chev{width:16px;height:9px;transition:transform .2s}
.mcp-day.is-open .mcp-day-head .mcp-chev{transform:rotate(180deg)}
.mcp-day-body{padding:4px 18px 20px;container-type:inline-size}
@media (min-width:768px){ .mcp-day-body{padding:4px 28px 28px} }
.mcp-dgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px}
.mcp-dgrid .mcp-wide{grid-column:1 / -1}
.mcp-dgrid > div{display:flex;flex-direction:column;justify-content:flex-end;min-width:0}
.mcp-dgrid > .mcp-wide-m{grid-column:1 / -1}
@media (min-width:768px){ .mcp-dgrid > .mcp-wide-m{grid-column:auto / span 2} }
.mcp-dgrid .mcp-flabel{display:block;margin:0 0 6px;font-size:16px;font-weight:500;line-height:1.3}
/* group titles in normal case, not a third uppercase style on the same screen (C1 #16) */
.mcp-dsub{grid-column:1 / -1;margin:12px 0 -6px;font-size:17px;font-weight:700;line-height:1.3;color:#000}
@media (min-width:768px){ .mcp-dgrid{grid-template-columns:repeat(4,1fr)} }
/* time fields: never clipped at 360px or with large system text (C2 P1-3) */
.mcp-dgrid input[type="time"]{padding:12px 10px;text-align:center;min-width:0}
@media (pointer:coarse){ .mcp-dgrid input[type="time"]::-webkit-calendar-picker-indicator{display:none} }
/* two time fields per row down to a ~240px card body (360px phone = 264px); one column only at large system text */
@container (max-width:239px){ .mcp-dgrid{grid-template-columns:1fr} }
.mcp-stepper{display:flex;align-items:center;gap:8px}
.mcp-stepper button{flex:0 0 52px;width:52px;height:52px;border-radius:50%;border:1px solid #000;background:#fff;font-size:24px;line-height:1;color:#000;cursor:pointer}
.mcp-stepper button:focus-visible{outline:none;box-shadow:var(--mcp-focus)}
.mcp-stepper .mcp-input{text-align:center;padding:12px 6px;min-width:0}
.mcp-quality{border:0;margin:0;padding:0;min-width:0}
.mcp-quality legend{display:block;float:none;width:100%;margin:0 0 8px;padding:0;font-size:16px;font-weight:500;line-height:1.3}
.mcp-chips{display:flex;gap:8px}
.mcp-chips .mcp-opt{flex:1 1 0}
.mcp-chips .mcp-opt-box{justify-content:center;padding:0;min-height:52px;border-radius:50%;aspect-ratio:1/1;max-width:56px;margin:0 auto;font-size:18px;font-weight:700}
.mcp-chips .mcp-opt-ind{display:none}
.mcp-scale-ends{display:flex;justify-content:space-between;gap:12px;margin:8px 0 0;font-size:14px;color:var(--mcp-text2)}
@media (min-width:768px){
  .mcp-chips{justify-content:flex-start;gap:12px}
  .mcp-chips .mcp-opt{flex:0 0 56px}
  .mcp-scale-ends{justify-content:flex-start;gap:24px}
}
.mcp-night{margin:18px 0 4px;padding:16px;border-radius:var(--mcp-r-sm);background:var(--mcp-page);border:1px solid var(--mcp-border-soft)}
.mcp-night-bar{position:relative;height:28px;border-radius:8px;background:#fff;border:1px solid var(--mcp-border);overflow:hidden}
.mcp-night-bar i{position:absolute;top:0;bottom:0}
.mcp-night-bar i.bed{background:repeating-linear-gradient(135deg,#d1d5db 0 4px,#fff 4px 7px)}
.mcp-night-bar i.sleep{background:#000;top:4px;bottom:4px;border-radius:4px}
.mcp-night-ticks{position:relative;height:22px;margin-top:4px;font-size:13px;color:var(--mcp-text2)}
.mcp-night-ticks span{position:absolute;transform:translateX(-50%)}
.mcp-night-sum{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:6px;font-size:16px}
.mcp-night-sum b{font-weight:700}
.mcp-legend{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:14px;color:var(--mcp-text2);margin-top:8px}
.mcp-legend i{display:inline-block;width:18px;height:12px;border-radius:3px;vertical-align:-1px;margin-right:6px}
.mcp-legend i.sleep{background:#000}
.mcp-legend i.bed{background:repeating-linear-gradient(135deg,#d1d5db 0 4px,#fff 4px 7px);border:1px solid #d1d5db}
.mcp-night-warn{margin-top:12px}
.mcp-night-warn .mcp-err{margin:0}
.mcp-night-warn .btn{margin-top:10px}
.mcp-copied{margin:0 0 6px;font-size:15px;font-weight:500}
.mcp-day-nav{display:flex;justify-content:space-between;gap:12px;margin-top:20px}
.mcp-day-nav .btn{flex:1 1 auto}
.mc-pt .mcp-day-nav .mcp-prev{flex:0 0 56px;width:56px;min-height:56px;padding:0;border-radius:50%;justify-content:center}
.mc-pt .mcp-day-nav .mcp-prev svg{width:12px;height:20px;display:block}
@media (min-width:768px){ .mcp-day-nav{justify-content:flex-start} .mcp-day-nav .btn{flex:0 0 auto;min-width:240px} }
.mcp-chart-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.mcp-chart{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:11px;min-width:640px}
.mcp-chart col.c-d{width:88px}
.mcp-chart col.c-t{width:58px}
.mcp-chart th,.mcp-chart td{border-right:1px solid var(--mcp-border-soft);border-bottom:1px solid var(--mcp-border-soft);height:30px;padding:0;text-align:center;font-weight:500}
/* head like the site's price table: black text on white, 1px black rule (C1 #18) */
.mcp-chart thead th{background:#fff;color:#000;font-weight:700;height:30px;border-bottom:1px solid #000}
.mcp-chart td.d,.mcp-chart th.d{text-align:left;padding:0 10px;white-space:nowrap;font-size:13px}
.mcp-chart td.tot{font-weight:700;font-size:13px}
.mcp-chart td.M{background:#000;color:#fff}
.mcp-chart td.NO{background:repeating-linear-gradient(135deg,#d1d5db 0 4px,#fff 4px 7px);color:#000}
.mcp-chart tbody tr:nth-child(even) td.d,.mcp-chart tbody tr:nth-child(even) td.tot{background:var(--mcp-page)}
.mcp-desktop-only{display:none}
@media (min-width:1024px){ .mcp-desktop-only{display:block} }

/* ---------- CPAP letter preview ---------- */
.mcp-letter{position:relative;background:#fff;border:1px solid var(--mcp-border);border-radius:6px;box-shadow:0 4px 18px rgba(0,0,0,.06);padding:26px 22px;font-size:15px;line-height:1.6;color:#000}
@media (min-width:768px){ .mcp-letter{padding:56px 64px;font-size:16px} }
.mcp-letter-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:16px;margin-bottom:22px;border-bottom:1px solid #000}
.mcp-letter-head img{width:110px;height:auto}
@media (min-width:768px){ .mcp-letter-head img{width:170px} }
.mcp-letter-head .meta{font-size:11px;line-height:1.5;text-align:right;color:var(--mcp-text2)}
@media (min-width:768px){ .mcp-letter-head .meta{font-size:12px} }
.mcp-letter .date{font-size:13px;color:var(--mcp-text2);margin:0 0 16px}
.mcp-letter h3{font-size:18px;font-weight:700;letter-spacing:.02em;margin:0 0 18px}
@media (min-width:768px){ .mcp-letter h3{font-size:22px} }
.mcp-letter p{margin:0 0 14px}
.mcp-letter .closing{margin-top:22px}
.mcp-letter .dev{background:var(--mcp-chip);border-radius:8px;padding:14px 16px;margin:16px 0}
.mcp-letter mark{background:none;color:#000;font-weight:700;border-bottom:2px solid #000;padding:0 1px}
.mcp-letter .el{margin-top:26px;padding:10px 12px;border:1px solid #000;font-size:10px;font-weight:700;text-align:center;letter-spacing:.03em}
@media (min-width:768px){ .mcp-letter .el{font-size:12px} }
.mcp-cpap-actions{margin:0 0 20px}

/* ---------- print: answer sheet only (fallback path; PDF is the main path) ---------- */
.mcp-print{display:none}
@media print{
  @page{size:A4;margin:14mm}
  body.mcp-printing{background:#fff!important;padding:0!important}
  body.mcp-printing header.header,
  body.mcp-printing footer.footer,
  body.mcp-printing .section-reviews,
  body.mcp-printing .mcp-wrap > *:not(.mcp-print),
  body.mcp-printing .mcp-bar,
  body.mcp-printing .mcp-modal,
  body.mcp-printing .mcp-toast,
  body.mcp-printing #cmplz-cookiebanner-container{display:none!important}
  body.mcp-printing main.content,body.mcp-printing main.content section,body.mcp-printing .container-fluid{margin:0!important;padding:0!important;max-width:none!important}
  body.mcp-printing .mcp-print{display:block!important;font-size:11pt;line-height:1.4;color:#000}
  .mcp-print img{width:120px;height:auto}
  .mcp-print .ph{display:flex;justify-content:space-between;border-bottom:1px solid #000;padding-bottom:8px;margin-bottom:12px;font-size:9pt;color:#333}
  .mcp-print .ph div{text-align:right}
  .mcp-print h1{font-size:16pt;margin:0 0 6px}
  .mcp-print h2{font-size:12pt;margin:14px 0 4px;page-break-after:avoid}
  .mcp-print table{width:100%;border-collapse:collapse}
  .mcp-print td{border-bottom:.5pt solid #bbb;padding:4px 0;vertical-align:top}
  .mcp-print td.a{width:42%;font-weight:700;padding-left:10px}
  .mcp-print td.n{color:#444}
  .mcp-print tr{page-break-inside:avoid}
  .mcp-print .sig{margin-top:28px}
}

/* ==========================================================================
   WordPress shell (MH 2026-10, LV only). Everything above = approved prototype v2, unchanged.
   ========================================================================== */
/* tool pages (questionnaire, diary, CPAP): slim footer without the newsletter form (C2 P2-10; prototype footer_slim) */
body.mcp-tool footer.footer .subscription{display:none!important}
/* hub / tool pages before the hub is published: empty top line keeps the approved spacing */
.mcp-topline:empty{display:block}
/* WordPress page password (CPAP for the reception): the section's field and button look */
.mcp-locked .post-password-form p{margin:0 0 16px;color:var(--mcp-text2)}
.mcp-locked .post-password-form > p:last-child{margin:0;display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.mcp-locked .post-password-form label{display:flex;flex-direction:column;gap:8px;flex:1 1 260px;max-width:420px;font-size:17px;font-weight:500;color:#000}
.mcp-locked .post-password-form input[type="password"]{display:block;width:100%;height:56px;padding:0 22px;font:inherit;font-size:17px;font-weight:400;color:#000;background:#fff;border:1px solid #000;border-radius:48px}
.mcp-locked .post-password-form input[type="password"]:focus-visible{outline:none;box-shadow:var(--mcp-focus)}
.mcp-locked .post-password-form input[type="submit"]{height:56px;padding:0 32px;font:inherit;font-size:17px;font-weight:400;color:#fff;background:#000;border:1px solid #000;border-radius:50px;cursor:pointer}
.mcp-locked .post-password-form input[type="submit"]:focus-visible{outline:none;box-shadow:var(--mcp-focus)}
@media (hover:hover){ .mcp-locked .post-password-form input[type="submit"]:hover{background:#262626} }
/* wrong password (WP 6.8+ core block above the form): framed and bold like the section's error summary (R2 #2) */
.mcp-locked .post-password-form-invalid-password p{display:block;margin:0 0 16px;padding:14px 18px;border:2px solid #000;border-radius:var(--mcp-r-sm);background:#fff;color:#000;font-weight:700}
.mcp-locked .mcp-locked-note{margin:20px 0 0}
.mcp-locked .mcp-locked-note a{color:#000;font-weight:500}
/* hub: CPAP block = two pills instead of a second copy of the contact rows (R2 #1) */
@media (min-width:768px){ .mcp-hub-block .mcp-pills--contact{padding-top:4px} }
