/* Group D, the practitioner app (17 Oct 2026, UI/UX audit fixes). Linked only from p-*.html.
   Uses the shared tokens; adds no new colors. */

/* D-29: no animation in the app (design 5.1). The motion layer stays on the public site. */
body.app,body.app *,body.app *::before,body.app *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
html.js body.app .reveal,html.js body.app .reveal.is-in{opacity:1!important;transform:none!important}
body.app .btn:active{transform:none}

/* D-15: the rail in three labelled groups */
.rail-h{font-size:var(--fs-12);font-weight:500;letter-spacing:.06em;text-transform:uppercase;margin:var(--s3) 0 4px;padding:0 12px}
@media (min-width:960px){
  .app-rail{padding-top:var(--s3);padding-bottom:var(--s3)}
}
.rail-mobile-body .rail-h{padding:0 var(--s2);margin:var(--s2) 0 0}
.rail-mobile-body .rail-mobile-links{grid-template-columns:1fr 1fr}

/* D-12 client switcher removed at the v1 lock (18 Oct): the Clients page is the one list of clients */

/* D-16: phone bottom bar, "More" opens a sheet above the bar and keeps your place */
.more-sheet{display:none}
@media (max-width:959px){
  .more-sheet{position:fixed;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom));z-index:45;background:var(--surface);
    border-top:1px solid var(--line);box-shadow:0 -8px 24px rgba(26,26,26,.18);max-height:70vh;overflow-y:auto;padding:var(--s3) 12px var(--s4)}
  .more-sheet:not([hidden]){display:block}
  .more-sheet .rail-h{padding:0 var(--s2)}
  .more-sheet .rail-mobile-links{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:0;border:0}
  .more-sheet .rail-mobile-links a{min-height:48px;display:flex;align-items:center;padding:0 var(--s3);border-radius:var(--radius);color:var(--fg);text-decoration:none;font-weight:500;font-size:var(--fs-14);border:1px solid transparent}
  .more-sheet .rail-mobile-links a[aria-current="page"]{border-color:var(--line);background:var(--tint)}
  .bottom-bar .more-btn[data-current]{color:var(--link);background:var(--tint)}
  .bottom-bar .more-btn[aria-expanded="true"]{background:var(--tint)}
}

/* D-30: "interval not set" is an outline, never the lapse orange */
.notset{display:inline-block;border:1px dashed var(--fg);border-radius:3px;padding:0 6px;font-weight:500;white-space:nowrap;font-size:inherit}

/* D-19: point-in-time as a list of dated versions, announced as dates */
.asof-set{border:1px solid var(--line);border-radius:var(--radius);padding:var(--s3) var(--s4);margin:0;display:flex;flex-wrap:wrap;gap:var(--s2)}
.asof-set legend{font-size:var(--fs-14);font-weight:500;padding:0 4px}
.asof-set label{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:var(--radius);padding:6px 12px;min-height:44px;font-size:var(--fs-14);cursor:pointer}
.asof-set label:has(input:checked){border-color:var(--fg);outline:1px solid var(--fg)}
.asof-set .mono{font-size:var(--fs-14)}

/* workspace state review switch (before the handover, pending, claimed) */
.ws-switch{display:flex;flex-wrap:wrap;gap:4px var(--s3);padding-bottom:6px}
.ws-switch a{font-size:var(--fs-14);min-height:32px;display:inline-flex;align-items:center}
.ws-switch a[aria-current="true"]{font-weight:500;text-decoration-thickness:2px}
.proto .ws-switch{margin:0}

/* write controls locked while a handover is pending */
a[aria-disabled="true"]:not(.btn){cursor:not-allowed;text-decoration:none;opacity:.7}

/* drafts: typed, marked draft, never a record until the named person confirms */
.draft-card{border:1px dashed var(--fg);border-radius:var(--radius);padding:var(--s4);background:var(--surface)}
.draft-card .draft-head{display:flex;flex-wrap:wrap;gap:4px var(--s3);font-size:var(--fs-12);margin-bottom:var(--s2)}
.draft-card h3{font-size:var(--fs-18);margin:0 0 var(--s2)}
.draft-list{list-style:none;padding:0;margin:0;display:grid;gap:var(--s3)}
.draft-list li{margin:0}

/* six counts in three columns (D-40) */
@media (min-width:720px){.stat-row.stat-row--3{grid-template-columns:repeat(3,minmax(0,1fr))}}
.stat dd.stat-sub{font-family:var(--font-sans);font-size:var(--fs-14);margin-top:2px}
.stat dd a{text-decoration-thickness:1px}
.stat dd.stat-text{font-size:var(--fs-14);font-family:var(--font-sans)}

/* mapping and form errors */
.map-err{display:block;margin-top:4px}
.ack{border:1px solid var(--line);border-left:4px solid var(--c-refusal);border-radius:var(--radius);padding:var(--s3) var(--s4);background:var(--surface);display:grid;gap:var(--s2);margin-bottom:var(--s4)}
.ack p{margin:0}
.ack .chip-check{border-radius:var(--radius);white-space:normal;align-items:flex-start}
.ack .chip-check input{margin-top:3px;flex:none}
.auth-rec{font-size:var(--fs-14);border-left:3px solid var(--c-produced);padding:var(--s2) var(--s4);background:var(--surface);margin-bottom:var(--s4)}
.chip-check.block{border-radius:var(--radius);white-space:normal;align-items:flex-start;display:flex}
.chip-check.block input{margin-top:3px;flex:none}

/* a choice with consequences, written out */
.consequence{font-size:var(--fs-14);margin:4px 0 0}
fieldset.choice legend{font-weight:500;font-size:var(--fs-14);margin-bottom:6px}

/* queue filter line */
.queue-filter{font-size:var(--fs-14);margin:0 0 var(--s3)}

/* inline style replacements (X10) */
.mt-s{margin-top:var(--s3)}
.mt-m{margin-top:var(--s5)}
.mt-l{margin-top:var(--s6)}
.row-between{justify-content:space-between}
.h-flush{margin:0}
.measure{max-width:68ch}
.form-wide{max-width:640px}
.ws-detail .stat dd{font-size:var(--fs-18)}
.ws-detail .stat dd.stat-text{font-size:var(--fs-14)}

/* the vector is a picture of four positions; the words sit beside it */
.vector-words{font-size:var(--fs-14);margin-top:0}

/* dialogs used for drafts and practitioner actions */
dialog.decision .help{margin-top:4px}
dialog.decision fieldset.choice{margin-top:var(--s3)}
dialog.decision .code-input{max-width:200px;letter-spacing:.2em}
fieldset.bare{border:0;padding:0;margin:0;min-width:0}
fieldset.bare>*+*{margin-top:var(--s4)}
