/* Capacity Companion — base styles. The values in :root are the CDL defaults; a pack's theme.json overrides them (served as /assets/theme.css). */
@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("/assets/fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }

:root {
  --navy: #1A2E4A;
  --navy-2: #2A4266;
  --gold: #C9A84C;
  --gold-ink: #8A6D1F;     /* gold dark enough for text on light backgrounds */
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --ink: #1A2E4A;
  --ink-2: #4A5A70;
  --line: #E3DFD5;
  --ok: #2F6B4F;
  --ok-bg: #E7F1EB;
  --err: #9B2C2C;
  --err-bg: #F8E8E6;
  --radius: 10px;
  --heading: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    /* shades used by individual components (1.2.0: named so a pack theme can change them) */
  --input-line: #C9C3B5;
  --info-bg: #EEF1F5;
  --info-line: #D9DFE8;
  --ok-line: #CFE3D7;
  --err-line: #EDCFCB;
  --tag-bg: #ECE8DE;
  --surface-muted: #FBFAF7;
  --accent-bg: #FBF6E8;
  --accent-line: #EADBB0;
  --example-bg: #FBF8EF;
  --note-bg: #F3F1EA;
  --entry-bg: #FDFCFA;
  --warn-bg: #FBF3E3;
  --warn: #7A5A12;
  --warn-line: #EAD8AE;
  --surface-2: #EEEAE1;
  --err-dark: #7d2222;
color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--body);
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3 { font-family: var(--heading); font-weight: 600; line-height: 1.25; margin: 0 0 .6rem; letter-spacing: -.005em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--gold-ink); }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: calc(.75rem + env(safe-area-inset-top)) 16px .75rem;
  background: var(--navy); color: #fff;
}
.brand { display: flex; align-items: baseline; gap: .5rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { font-family: var(--heading); font-weight: 600; letter-spacing: .14em; font-size: 1.05rem; }
.brand-mark::after { content: ""; display: inline-block; width: .35rem; height: .35rem; margin-left: .3rem;
  background: var(--gold); border-radius: 50%; vertical-align: .15em; }
.brand-sub { font-size: .8rem; opacity: .75; }
.nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.nav a { color: #fff; opacity: .8; text-decoration: none; }
.nav a:hover, .nav a.is-active { opacity: 1; box-shadow: inset 0 -2px 0 var(--gold); color: #fff; }
.nav .linklike { color: #fff; opacity: .8; }

/* layout */
.page { max-width: 34rem; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.page-wide { max-width: 64rem; }
.narrow { max-width: 30rem; margin-left: auto; margin-right: auto; }
.narrow-form { max-width: 26rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card { margin-top: 1rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.row-between h1 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
.stack .btn { margin-top: .5rem; align-self: flex-start; }
.inline { display: inline; }
.center { text-align: center; }
.mt { margin-top: 1rem; }

.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-ink); margin-bottom: .25rem; }
.greeting { font-size: 1.75rem; margin-bottom: 1.25rem; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }

/* forms */
label { font-weight: 600; font-size: .9rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--input-line); border-radius: 8px; padding: .65rem .75rem; width: 100%;
  min-height: 44px;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .15em; text-align: center; text-transform: uppercase; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; font: 600 .95rem var(--heading); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--info-bg); color: var(--navy); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); text-decoration: underline; cursor: pointer; min-height: 0; }
form.inline + form.inline { margin-left: .5rem; }

/* feedback */
.alert { padding: .65rem .85rem; border-radius: 8px; border: 1px solid transparent; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.alert-error { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.badge { display: inline-block; font: 600 .7rem var(--body); text-transform: uppercase; letter-spacing: .06em;
  padding: .15rem .45rem; border-radius: 99px; background: var(--tag-bg); color: var(--ink-2); vertical-align: middle; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

.code-card { border-color: var(--gold); }
.code-display { font-size: 2rem; letter-spacing: .2em; margin: .25rem 0 .75rem; color: var(--navy); }
.small-code { font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; }

/* tables and lists */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font: 600 .75rem var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); background: var(--surface-muted); }
.table tr:last-child td { border-bottom: 0; }
/* 1.10.27 (decision 101): earlier engagements' sessions in the same list */
.table tr.row-group td { background: var(--surface-muted); white-space: normal; }
.table tr.row-earlier td { color: var(--ink-2); }
.row-group-label { position: sticky; left: .9rem; max-width: calc(100vw - 5rem); }
.checks { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.checks li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks li span:last-child { text-align: right; color: var(--ink-2); overflow-wrap: anywhere; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: .5rem; }
.checks li.fail::before { content: "✕"; color: var(--err); }
.checks li { justify-content: flex-start; }
.checks li span:first-child { flex: 1; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; font-size: .92rem; }
.dl dt { color: var(--ink-2); }
.dl dd { margin: 0; }
.steps { padding-left: 1.25rem; margin: 0 0 .75rem; }
.steps li { margin-bottom: .4rem; }

.install-hint { background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.install-hint h2 { font-size: 1rem; }

/* ---------- worksheets ---------- */
.worksheet { max-width: 44rem; margin: 0 auto; }
.back { margin-bottom: .75rem; font-size: .92rem; }
.ws-header { margin-bottom: 1.5rem; }
.ws-header h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.ws-subtitle { font-style: italic; color: var(--ink-2); }
.ws-meta { margin-top: .25rem; }
.ws-intro, .ws-closing { margin: 1rem 0 1.5rem; }
.ws-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem; }
.ws-section-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-ink); margin-bottom: .5rem; }
.ws-section-intro { font-style: italic; color: var(--ink-2); font-size: .95rem; }
.italic { font-style: italic; }
.field { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.ws-section > .field:first-of-type, .ws-section-intro + .field, .entry .field:first-of-type { border-top: 0; margin-top: .25rem; padding-top: .25rem; }
.field[hidden] { display: none; }
label.q { display: flex; gap: .5rem; font-weight: 600; font-size: 1rem; line-height: 1.45; margin-bottom: .4rem; }
.q-num { color: var(--gold-ink); font-family: var(--heading); min-width: 1.4rem; }
.q-help p { font-size: .92rem; color: var(--ink-2); font-style: italic; margin-bottom: .4rem; }
.example { border-left: 3px solid var(--gold); background: var(--example-bg); padding: .5rem .75rem; margin: .25rem 0 .6rem; border-radius: 0 6px 6px 0; }
.example p { font-size: .9rem; font-style: italic; color: var(--ink-2); margin: 0 0 .3rem; }
.example p:last-child { margin-bottom: 0; }
textarea { font: inherit; line-height: 1.5; resize: vertical; min-height: 6rem; }
.answer { background: var(--surface-muted); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .8rem; }
.answer p:last-child { margin-bottom: 0; }
.answer-scale { font: 600 1.25rem var(--heading); }

.box { border-radius: var(--radius); padding: 1rem 1.15rem; margin: 1rem 0; }
.box-title { font-weight: 600; margin-bottom: .4rem; }
.box-note { background: var(--note-bg); border: 1px solid var(--line); }
.box-note p { font-size: .92rem; }
.box-steps { background: var(--note-bg); border: 1px solid var(--line); }
.box-closing { background: var(--info-bg); border: 1px solid var(--info-line); }
.box-closing p { font-size: .92rem; margin: 0; }
.box-reference { background: var(--accent-bg); border: 1px solid var(--accent-line); }
.box p:last-child { margin-bottom: 0; }

.sequence { list-style: none; padding: 0; margin: .5rem 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; counter-reset: none; }
.sequence li { flex: 1 1 8rem; background: var(--navy); color: #fff; border-radius: 8px; padding: .55rem .7rem; position: relative; }
.sequence-label { display: block; font: 600 .85rem var(--heading); }
.sequence-ref { display: block; font-size: .75rem; opacity: .75; }

.entry { border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; margin: .75rem 0; background: var(--entry-bg); }
.entry-title { font: 600 .9rem var(--heading); color: var(--navy); margin-bottom: .25rem; }
.ws-group > .btn { margin-top: .5rem; }

.choices { display: flex; flex-direction: column; gap: .35rem; }
.choice { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.choice input { width: auto; min-height: 0; }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.scale-step { position: relative; font-weight: 600; }
.scale-step input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.scale-step span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--input-line); border-radius: 8px; background: #fff; }
.scale-step input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.scale-step input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.scale-labels { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; color: var(--ink-2); margin-top: .35rem; }
.scale-labels span:last-child { text-align: right; }

.ws-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem;
  background: var(--bg); border-top: 1px solid var(--line); padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom)); margin-top: 1rem; z-index: 5; }
.ws-actions .save-state { margin-right: auto; }
.save-bad { color: var(--err); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.alert-info { background: var(--info-bg); color: var(--navy); border-color: var(--info-line); }
.alert p:last-child { margin: 0; }

/* client task list */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li + li { border-top: 1px solid var(--line); }
.task { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; padding: .7rem 0; text-decoration: none; color: var(--ink); }
.task:hover { color: var(--navy-2); }
.task-code { font: 600 .78rem var(--mono); color: var(--gold-ink); padding-top: .15rem; }
.task-title { font-weight: 600; }
.task-meta { grid-column: 2; }

/* coach */
.coach-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.btn-small { min-height: 36px; padding: .35rem .8rem; font-size: .85rem; }
.table-flush { margin-bottom: .5rem; }
.actions { text-align: right; }
.assign-form { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: end; }
.assign-form > div { display: flex; flex-direction: column; gap: .35rem; }
.assign-form .btn { justify-self: start; }
.checks li.detail { display: block; padding-top: 0; }
.checks li.detail::before { content: ""; }

/* ---------- key events ---------- */
.btn-wide { width: 100%; }
.stack-lg { display: flex; flex-direction: column; gap: 1.25rem; }
.field-plain { border: 0; padding: 0; margin: 0; }
.field-plain legend { padding: 0; margin-bottom: .5rem; font-weight: 600; }
.list-head { font: 600 .78rem var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 1.25rem 0 .25rem; }
.choices.chips { flex-direction: row; flex-wrap: wrap; gap: .45rem; }
.chips .choice { position: relative; }
.chips .choice input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chips .choice span { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem .9rem; border: 1px solid var(--input-line);
  border-radius: 999px; background: #fff; font-size: .95rem; line-height: 1.25; }
.chips .choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips .choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.chips-stakes .choice span { min-width: 3.25rem; justify-content: center; font-weight: 600; }
.event-form .ws-section { padding-top: .5rem; }
.event-form .field input[type=text], .event-form .field input:not([type]) { min-height: 40px; }
.predict-block { background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: .25rem 1rem 1rem; }
.predict-block .field:first-child { border-top: 0; }
.scale-compact { gap: 3px; }
.scale-compact .scale-step span { min-height: 40px; font-size: .9rem; }
.compare h2 { margin-bottom: .75rem; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.compare-table th, .compare-table td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { font: 600 .72rem var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.compare-table tbody th { font-weight: 600; width: 38%; }
.dl-stack { grid-template-columns: 1fr; gap: .1rem; }
.dl-stack dt { margin-top: .6rem; font-size: .85rem; }
.dl-stack dd { font-weight: 500; }
.table-events td.wrap { white-space: normal; min-width: 9rem; }
.table-events .notes-row td { white-space: normal; font-size: .85rem; color: var(--ink-2); background: var(--surface-muted); padding-top: .35rem; }
.chip-group-label { font: 600 .72rem var(--body); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); margin: .6rem 0 .3rem; }
.field.continues { border-top: 0; margin-top: .25rem; padding-top: 0; }
.own-head + div .chip-group-label { color: var(--gold-ink); }
.q.own-head { font-weight: 600; font-size: 1rem; margin-bottom: .1rem; }
.hint { background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 8px; padding: .5rem .75rem; margin-top: .5rem; }
.row-gap { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.toggle { display: flex; gap: .6rem; align-items: center; font-weight: 600; }
.toggle input { width: 1.25rem; height: 1.25rem; min-height: 0; }
.footer-links a { color: var(--ink-2); }

/* Step 5: reference card, checkpoints, coach prompts */
.checks li.empty::before { content: "–"; color: var(--ink-2); }
.ref-list { margin: 0; padding-left: 1.1rem; }
.ref-list li { margin: .3rem 0; }
.ref-part { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 1rem 0 .25rem; }
.ref-part:first-of-type { margin-top: .25rem; }
.checkpoint.is-current { border-left: 3px solid var(--ink); }
.checkpoint-signal { margin-top: .5rem; }
.checkpoint-row { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.checkpoint-row:last-child { border-bottom: 0; }
.checkpoint-row p { margin: .2rem 0; }
.prompt-list { list-style: none; margin: 0; padding: 0; }
.prompt-list li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.prompt-list li.is-closed { opacity: .6; }
.prompt-text { margin: 0 0 .2rem; font-weight: 600; }
.prompt-note { margin: .5rem 0; padding: .5rem .75rem; border-left: 3px solid var(--line); }
.prompt-note footer { margin-top: .25rem; }
.prompt-q { font-size: 1.35rem; line-height: 1.35; }
.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; }
[hidden] { display: none !important; }
.ref-intro ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.ref-intro li { margin: .35rem 0; }
.ref-stage { margin: 1.5rem 0 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.ref-title { margin: 0; font-size: 1.1rem; }
.ref-help summary { cursor: pointer; font-size: .9rem; color: var(--ink-2); }
.ref-help[open] summary { margin-bottom: .5rem; }
.dl-help { font-size: .9rem; }
.field-help { margin: -.2rem 0 .1rem; }
.compare { margin: .35rem 0 .6rem; padding: .5rem .75rem; border: 1px dashed var(--line); border-radius: 8px; background: rgba(255,255,255,.5); }
.compare summary { cursor: pointer; font-size: .9rem; color: var(--ink-2); }
.compare-q { margin: .4rem 0 .2rem; }

.filter-row { margin: 0 0 1rem; }
.filter-row select { width: auto; max-width: 100%; }
.inline-details[open] { max-width: 22rem; }
.inline-details summary { cursor: pointer; }
.coach-actions { white-space: normal; min-width: 11rem; }
.coach-actions > form, .coach-actions > details { display: block; margin: 0 0 .35rem; }
.coach-actions form.inline + form.inline { margin-left: 0; }
.cli-line { background: var(--surface-2); padding: .6rem .8rem; border-radius: 6px; font-size: .9rem; word-break: break-all; }

/* top bar actions: nav (coach), refresh; client nav as its own row */
.topbar-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.refresh-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; min-height: 0;
  padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.refresh-btn:hover, .refresh-btn:focus-visible { border-color: var(--gold); }
.refresh-btn.is-busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn.is-busy svg { animation: none; } }
.nav-client { flex-basis: 100%; gap: 1.25rem; padding-top: .25rem; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
.nav-client a { padding: .35rem 0; }
/* 1.10.29: five menu items (with Help) fit a phone of 360px and wider; smaller ones scroll the menu sideways */
@media (max-width: 420px) { .nav-client { gap: .8rem; font-size: .84rem; } }
.page-updated { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: .5rem 1rem; border-radius: 999px; font-size: .9rem; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.prose h2 { margin-top: 1.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 .75rem; }
.prose li { margin-bottom: .3rem; }
.mono-ish { font-family: var(--mono); font-size: .88rem; line-height: 1.45; }
.danger-zone { border-color: var(--err); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { background: var(--err-dark); color: #fff; }
.settings-name { font-family: var(--heading); font-weight: 600; font-size: 1.15rem; margin-bottom: .25rem; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: .2rem 0; }

/* 1.6.0 observations */
.obs-accordion summary { cursor: pointer; font-weight: 600; }
.obs-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.obs-list li { padding: .6rem 0; border-top: 1px solid var(--line); }
.obs-list li p { margin: .15rem 0; }
.prompt-edited { font-size: .85rem; }

/* 1.6.1: observation prompt in the assign form, on its own full-width row */
.assign-form .obs-field { grid-column: 1 / -1; margin: 0; padding: .9rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-muted); }
.assign-form .obs-field[hidden] { display: none; }
.assign-form .obs-field legend { padding: 0 .35rem; font-weight: 600; }
.assign-form .obs-field > p { margin: 0 0 .75rem; }
.obs-grid { display: grid; gap: .75rem 1rem; grid-template-columns: 7rem 1fr; align-items: start; }
.obs-grid > div { display: flex; flex-direction: column; gap: .35rem; }
.obs-grid p { margin: 0; }
.obs-days input { width: 100%; }
@media (max-width: 40rem) { .obs-grid { grid-template-columns: 1fr; } .obs-days { max-width: 8rem; } }

/* 1.6.2 System page: collapsible panels with a status sign */
.sys-summary { display: flex; align-items: center; gap: .5rem; }
.sys-summary p { margin: 0; }
.sys-panels { display: flex; flex-direction: column; gap: .6rem; }
.sys-panel { margin-bottom: 0; padding: 0; }
.sys-panel > summary { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.25rem; cursor: pointer; list-style: none; }
.sys-panel > summary::-webkit-details-marker { display: none; }
.sys-panel > summary::after { content: "▸"; margin-left: .25rem; color: var(--ink-2); transition: transform .15s; }
.sys-panel[open] > summary::after { transform: rotate(90deg); }
.sys-panel > summary h2 { margin: 0; font-size: 1.05rem; flex: 1; }
.sys-panel[open] > summary { border-bottom: 1px solid var(--line); }
.sys-panel > :not(summary) { margin-left: 1.25rem; margin-right: 1.25rem; }
.sys-panel > :last-child:not(summary) { margin-bottom: 1.1rem; }
.sys-panel > summary + * { margin-top: 1rem; }
.sys-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-weight: 700; font-size: .85rem; flex: none; }
.sys-icon.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.sys-icon.warn, .sys-summary .sys-icon { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.sys-icon.info { background: var(--navy); color: #fff; border: 1px solid var(--navy); font-style: italic; font-family: Georgia, serif; } /* 1.10.33 (decision 128); 1.10.35 (decision 132): filled navy, white i */
.sys-state.info { color: var(--navy); font-weight: 600; }
.alert-ok.sys-summary .sys-icon { background: var(--surface); color: var(--ok); border: 1px solid var(--ok-line); }
.sys-state { color: var(--ink-2); }
.needs-action .sys-state { color: var(--warn); font-weight: 600; }
.sys-summary { margin-bottom: .9rem; }
.sys-panel .mono { overflow-wrap: anywhere; }

/* 1.7.0 "Something new" and "needs your action" signs (decisions 32, 33). */
.new-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: .7rem; background: var(--navy); color: var(--surface); font-size: .8rem; font-weight: 700; line-height: 1; flex: none; vertical-align: middle; }
.new-tag { display: inline-block; padding: 0 .4rem; border-radius: .5rem; background: var(--navy); color: var(--surface); font-size: .75rem; font-weight: 600; vertical-align: middle; }
tr.is-new > td:first-child { box-shadow: inset 3px 0 0 var(--navy); }
.prompt-list li.is-new { border-left: 3px solid var(--navy); padding-left: .6rem; }
.client-panel > summary h2 { flex: 0 1 auto; }
.client-panel > summary .sys-state { margin-left: auto; text-align: right; }
.client-panel.has-new > summary .sys-state { color: var(--ink); }
.fold > summary { display: flex; align-items: center; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "▸"; margin-left: .5rem; color: var(--ink-2); transition: transform .15s; }
.fold[open] > summary::after { transform: rotate(90deg); }
.fold > summary h2 { margin: 0; flex: 1; font-size: 1.05rem; }
.fold[open] > summary { margin-bottom: .75rem; }
/* client side */
.sign { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; border-radius: .65rem; font-size: .75rem; font-weight: 700; line-height: 1; vertical-align: middle; margin-left: .35rem; }
.sign-action { background: var(--gold); color: var(--navy); }
.sign-new { background: var(--navy); color: var(--surface); }
.task.needs-action { border-left: 3px solid var(--gold); }
.task.is-new { border-left: 3px solid var(--navy); }
.task .item-sign { font-size: .75rem; font-weight: 600; color: var(--gold-ink); }
.task.is-new .item-sign { color: var(--navy); }
.nav-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); margin-left: .3rem; vertical-align: super; }
.task.needs-action, .task.is-new { padding-left: .6rem; }
.sign-legend { margin: -.25rem 0 .75rem; }
.sign-legend .sign { margin-left: 0; transform: scale(.85); }
.sign-legend .sign-dot { min-width: .8rem; width: .8rem; height: .8rem; padding: 0; border-radius: 50%; margin: 0 .1rem; transform: none; }

/* 1.9.0 sessions */
.session-edit:not([open]) { display: none; }
.session-edit { border-left: 3px solid var(--ink-2); padding-left: .9rem; }
.session-edit > summary { cursor: pointer; }
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem .9rem; align-items: end; }
.session-grid label { display: block; }
#sessions .actions details { text-align: left; }
#sessions td.actions { white-space: nowrap; padding-right: .9rem; }
#sessions .table td.wrap { white-space: normal; min-width: 9rem; }
.table td.wrap { white-space: normal; min-width: 9rem; } /* 1.10.4: wrapping cells in every table (ICF log, import preview) */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
/* 1.10.0: pre-session brief, ICF release, sessions that did not take place */
.brief { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; margin-bottom: .8rem; }
.brief summary { cursor: pointer; }
.brief-list { margin: .4rem 0 0; padding-left: 1.1rem; }
.brief-list li { margin: .15rem 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0; }
.inline-form label { margin: 0; }
.inline-form select { width: auto; }
td s, .task-title s, h1 s { color: var(--ink-2); }
.inline-form form.inline + form.inline { margin-left: 0; }
/* 1.10.1: ICF log page */
.icf-totals { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: .6rem; }
.icf-totals > div { display: flex; flex-direction: column; }
.icf-members > td { background: var(--surface-muted); }
.icf-member { margin: .4rem 0 .4rem 1rem; }
.icf-member > summary { cursor: pointer; }
.icf-num { font-family: var(--heading); font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.input-short { max-width: 14rem; }
/* 1.10.2: the last session's note in the brief */
.brief-note { background: var(--info-bg); border: 1px solid var(--info-line); border-radius: var(--radius); padding: .5rem .7rem; margin: .5rem 0; }
.brief-note p { margin: .2rem 0; }
.brief-note-none { margin: .4rem 0; }
.brief-note summary { cursor: pointer; }

/* 1.10.7: reference card entries open in place on the coach's client page */
.checks li.has-entry > details { flex: 1; min-width: 0; }
.ref-entry > summary { display: flex; gap: 1rem; cursor: pointer; list-style: none; }
.ref-entry > summary::-webkit-details-marker { display: none; }
.ref-entry > summary > span:first-child { flex: 1; }
.ref-entry > summary > span:first-child::after { content: " ▸"; color: var(--ink-2); }
.ref-entry[open] > summary > span:first-child::after { content: " ▾"; }
.ref-entry > summary > span:last-child { text-align: right; color: var(--ink-2); }
.ref-entry-body { padding: .5rem 0 .25rem; font-size: .95rem; }
.ref-entry-body p, .ref-entry-body ul { margin: .25rem 0; }
/* 1.10.7: submitted worksheets on the coach's reference card page */
.ref-worksheets { margin: .25rem 0 .5rem; }
.ref-ws { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .75rem; margin: .4rem 0; }
.ref-ws > summary { cursor: pointer; font-size: .9rem; }
.ref-ws-body { margin-top: .5rem; max-height: 60vh; overflow: auto; }
.ref-ws-body .worksheet h1 { font-size: 1.2rem; }
.checks .ref-entry-body li { display: list-item; border: 0; padding: .1rem 0; }
.checks .ref-entry-body li::before { content: none; }
.checks .ref-entry-body ul.ref-list { list-style: disc; padding-left: 1.25rem; }

/* 1.10.8: session page and practitioner guides */
.guide-h { margin: 1rem 0 .4rem; }
.guide-p { margin: .35rem 0; }
.guide-list { margin: .25rem 0 .5rem; padding-left: 1.25rem; }
.guide-table td { white-space: normal; vertical-align: top; min-width: 6rem; }
.guide-table td > *:first-child { margin-top: 0; }
.frame .guide-table tr:first-child td { font-weight: 600; background: var(--surface-muted); }
.guide-index { margin: 0; padding-left: 1.25rem; }
.guide-index li { margin: .2rem 0; }
.frame-part { border-top: 1px solid var(--line); padding: .5rem 0; }
.frame-part > summary { cursor: pointer; font-weight: 600; }
.frame-sub > summary { cursor: pointer; font-size: .9rem; }
.note-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.note-large { min-height: 24rem; font-size: 1rem; line-height: 1.5; }
.note-hints { border-left: 3px solid var(--line); padding-left: .75rem; max-height: 40rem; overflow: auto; }
.note-hints .guide-table td { min-width: 0; }
.tool-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .25rem .75rem; margin-top: .5rem; }
@media (max-width: 760px) { .note-grid { grid-template-columns: 1fr; } .note-hints { border-left: 0; padding-left: 0; max-height: none; } }
.assign-form .assign-guide { grid-column: 1 / -1; grid-row: 2; margin: -.25rem 0 0; } /* 1.10.9: the guide link in its own row, fields stay aligned */
/* 1.10.9 (Jan, 15 Oct 2026): the client pages use more of a laptop screen; phones are unchanged.
   Text stays at a readable line length (about 85–90 characters). */
@media (min-width: 900px) {
  .area-client .page { max-width: 60rem; }
  .area-client .narrow { max-width: 46rem; }
  .area-client .worksheet { max-width: 50rem; }
}

/* 1.10.10 (decision 74.3): the coach's "Settings" menu (System, Coaches, Security, Sign out). */
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; color: #fff; opacity: .8; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: " \25BE"; font-size: .8em; }
.nav-menu > summary:hover, .nav-menu > summary.is-active, .nav-menu[open] > summary { opacity: 1; box-shadow: inset 0 -2px 0 var(--gold); }
.nav-menu-list { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 20; min-width: 11rem; display: flex; flex-direction: column; gap: .15rem;
  background: var(--navy, #1A2E4A); border-radius: .5rem; padding: .5rem .25rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.nav-menu-list a, .nav-menu-list .linklike { display: block; padding: .45rem .75rem; opacity: .85; text-decoration: none; text-align: left; width: 100%; }
.nav-menu-list a:hover, .nav-menu-list a.is-active, .nav-menu-list .linklike:hover { opacity: 1; box-shadow: none; background: rgba(255, 255, 255, .1); border-radius: .35rem; }
.nav-menu-list form.inline { display: block; margin: 0; }
/* 1.15.2 (decision 177): a menu in the left part of the bar (CRM) opens to the right; no list is wider than the screen
   (app.js shifts an open list that would still reach past an edge). */
.nav-menu-start > .nav-menu-list { right: auto; left: 0; }
.nav-menu-list { max-width: calc(100vw - 1rem); }
/* 1.10.10 (decision 75): the "Past – update status" tag opens the session's edit form. */
a.new-tag, a.new-tag:hover { color: var(--surface); text-decoration: none; }
/* 1.10.11 (decision 78): single note hints to insert or drag into the note. */
.hint-points { list-style: none; margin: .25rem 0 .5rem; padding: 0; }
.hint-point { padding: .35rem .4rem; border-bottom: 1px solid var(--line); cursor: grab; }
.hint-point:hover { background: rgba(0, 0, 0, .03); }
.hint-label { font-weight: 600; display: block; }
.hint-insert { margin-left: .25rem; }
/* 1.10.11 (decision 79): contact details form. */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.profile-grid .profile-wide { grid-column: 1 / -1; }

/* 1.10.13 (decision 82): practitioner guides filled in as forms */
.guide-form .form-area { display: block; width: 100%; min-height: 5.5rem; margin-top: .4rem; font-size: .95rem; }
.guide-form .form-blank { display: inline-block; width: 9rem; max-width: 100%; min-height: 0; padding: .2rem .45rem; margin: .1rem .25rem; font-size: .95rem; vertical-align: middle; }
.guide-form .form-blank.form-wide { display: block; width: 100%; margin: .35rem 0 0; }
.guide-form .form-opt { display: inline-flex; align-items: center; gap: .45rem; margin: .15rem 1.1rem .15rem 0; cursor: pointer; font: inherit; vertical-align: middle; }
.guide-form .form-opt .form-box { flex: none; width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: 0; }
.guide-form .form-opt span:empty { display: none; }
.guide-form .form-blank { vertical-align: baseline; }
.guide-form .form-below td { background: var(--surface-muted); }
.guide-form .form-options p { display: inline-block; margin: .2rem 1.25rem .2rem 0; }
.guide-form .form-options p:first-child { display: block; margin-right: 0; }
.guide-form .form-auto { display: inline-block; font-weight: 600; color: var(--ink); background: var(--surface-muted); border-radius: 4px; padding: 0 .35rem; }
div.form-auto { display: block; margin-top: .35rem; }
.form-beside-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.form-beside { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.form-beside .dl { grid-template-columns: 1fr; gap: .15rem; }
.form-beside .dl dd { margin-bottom: .5rem; }
@media (max-width: 900px) { .form-beside-grid { grid-template-columns: minmax(0, 1fr); } .form-beside { position: static; max-height: none; } }
.forms-list li { margin: .25rem 0; }
/* 1.10.13: wide guide tables scroll inside the card on a phone instead of widening the page (also the read-only guides) */
.guide { min-width: 0; }
.guide .guide-table-wrap { max-width: 100%; overflow-x: auto; }
.source-line { overflow-wrap: anywhere; } /* long document file names on a phone */
.guide-form .form-break { display: block; height: .35rem; }
.guide-form .form-blank.form-blank-long { width: 24rem; }
.guide-form .form-area.form-area-short { min-height: 2.6rem; }
.guide-table td.guide-spacer { min-width: 0; width: 1rem; padding: 0; }
/* 1.10.14: on a phone, form tables keep readable columns and scroll sideways inside the card */
@media (max-width: 600px) { .guide-form .guide-table td { min-width: 11rem; } .guide-form .guide-table td.guide-spacer { min-width: 0; } .guide-form .form-below td { min-width: 0; } }
/* 1.10.16 (decision 86 B): worksheets and tools of other layers, in a closed list */
.assign-form > .assign-more { grid-column: 1 / -1; grid-row: 3; margin: -.25rem 0 0; }
.assign-more summary { cursor: pointer; color: var(--muted, #666); }
.assign-more select { display: block; margin-top: .35rem; width: 100%; max-width: 28rem; }
.tools-more { margin-top: .5rem; }

/* 1.10.18 (decision 88): anchor choices on the assign form (Mid-Engagement Review, Completion) */
.assign-form .anchor-choices { grid-column: 1 / -1; margin: 0; padding: .9rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-muted); }
.assign-form .anchor-choices[hidden] { display: none; }
.assign-form .anchor-choices legend { padding: 0 .35rem; font-weight: 600; }
.anchor-choices select { display: block; width: 100%; max-width: 28rem; margin-bottom: .6rem; }
.anchor-choices .anchor-group > p { margin: .25rem 0 .35rem; }
/* 1.10.23 (decision 94): plugin fill offer and read-only notes in guide forms */
.fill-offer { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.fill-offer p { margin: 0; }
.form-note { border-left: 3px solid var(--accent-line); background: var(--accent-bg); padding: .5rem .75rem; margin: .75rem 0; }
/* 1.10.26 (ELI Interpreter 1.3.0, step P4): documents shown as pages (the ELI client report, the progress chart).
   Generic "doc-" classes, so a plugin can lay out a document without inline styles (the CSP allows none). */
.doc-report { width: 100%; max-width: 46rem; min-width: 0; margin: 0 auto; color: #2F2F2F; overflow-wrap: break-word; }
.doc-report .table-wrap, .doc-progress .table-wrap { max-width: 100%; overflow-x: auto; }
.doc-progress { width: 100%; min-width: 0; }
.doc-page { padding: 1.25rem 0 .5rem; border-top: 1px solid var(--line); margin-top: 1.25rem; }
.doc-cover { text-align: center; padding: 1.5rem 0 1rem; border-top: 6px solid #1F3864; border-bottom: 2px solid #B8973E; }
.doc-logo { display: block; width: min(16rem, 80%); height: auto; margin: 1rem auto 1.5rem; }
.doc-cover-title { font-family: var(--heading); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #1F3864; font-size: 1.35rem; margin: 0 0 .25rem; }
.doc-cover-sub { color: #B8973E; font-style: italic; margin: 0 0 1.5rem; }
.doc-cover-prep { display: inline-block; background: #E8EDF5; border-top: 1px solid #B8973E; border-bottom: 1px solid #B8973E; padding: .2rem 2rem; color: #888; font-size: .85rem; margin: 0; }
.doc-cover-name { font-family: var(--heading); font-weight: 700; color: #1F3864; font-size: 1.5rem; margin: .75rem 0 1.25rem; }
.doc-cover-line { color: #888; font-style: italic; font-size: .85rem; margin: 0; }
.doc-h { font-family: var(--heading); text-transform: uppercase; letter-spacing: .03em; color: #1F3864; font-size: 1.15rem; border-bottom: 2px solid #B8973E; padding-bottom: .3rem; margin: .5rem 0 1rem; }
.doc-label { background: #1F3864; color: #fff; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; font-weight: 700; padding: .35rem .6rem; margin: 1.25rem 0 .6rem; }
.doc-p { line-height: 1.6; margin: 0 0 .75rem; }
.doc-center { text-align: center; }
.doc-b { font-weight: 700; }
.doc-i { font-style: italic; }
.doc-big { font-size: 1.25rem; }
.doc-small { font-size: .85rem; }
.doc-c-navy { color: #1F3864; } .doc-c-gold { color: #8A6D1F; } .doc-c-danger { color: #C00000; } .doc-c-warn { color: #C55A11; }
.doc-c-safe { color: #375623; } .doc-c-muted { color: #6B6B6B; } .doc-c-gold-light { color: #F5EDD6; } .doc-c-white { color: #fff; }
.doc-rule { border: 0; border-top: 1px solid #B8973E; margin: 1.25rem 0; }
.doc-box { background: #E8EDF5; border: 1px solid #1F3864; border-left-width: 5px; padding: .75rem 1rem; margin: 0 0 1rem; }
.doc-box-gold { background: #F5EDD6; border-color: #B8973E; }
.doc-box p { margin: 0 0 .45rem; line-height: 1.55; }
.doc-box-title { font-weight: 700; color: #1F3864; }
.doc-strip { border-left-width: 1px; }
.doc-chart { margin: .75rem 0 1rem; }
.doc-chart img { display: block; width: 100%; height: auto; }
.doc-metrics th { color: #1F3864; }
.doc-badges, .doc-cols, .doc-profile-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; margin: 0 0 1rem; }
.doc-badge { background: #E8EDF5; padding: .75rem 1rem; }
.doc-badge p { margin: 0 0 .35rem; }
.doc-badge-primary { background: #1F3864; color: #F5EDD6; }
.doc-badge-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8A6D1F; margin: 0 0 .25rem; }
.doc-badge-primary .doc-badge-label { color: #C9A84C; }
.doc-badge-name { font-weight: 700; color: #1F3864; font-size: 1.05rem; }
.doc-badge-primary .doc-badge-name { color: #fff; }
.doc-banner { background: #1F3864; color: #F5EDD6; padding: 1rem 1.1rem; margin: 0 0 1rem; }
.doc-banner p { margin: 0 0 .3rem; }
.doc-banner .doc-badge-label { color: #C9A84C; }
.doc-banner-name { font-family: var(--heading); font-weight: 700; font-size: 1.3rem; color: #fff; }
.doc-banner-light { background: #E8EDF5; color: #2F2F2F; }
.doc-banner-light .doc-badge-label, .doc-banner-light .doc-banner-name { color: #1F3864; }
.doc-col { padding: .75rem 1rem; background: #E8EDF5; border-left: 4px solid #1F3864; }
.doc-col-gold { background: #F5EDD6; border-left-color: #B8973E; }
.doc-col-gold .doc-box-title { color: #C55A11; }
.doc-col p { margin: 0 0 .35rem; }
.doc-kci { margin: 0 0 1rem; }
.doc-kci dt { margin-top: .75rem; }
.doc-kci dd { margin: .2rem 0 0; line-height: 1.55; }
.doc-progress-head { border-bottom: 2px solid #B8973E; margin-bottom: 1rem; }
.doc-progress-head p { margin: 0 0 .25rem; }
.doc-timeline { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; margin: 0 0 1rem; }
.doc-timeline li { background: #E8EDF5; border-radius: 999px; padding: .2rem .75rem; font-size: .85rem; }
.doc-svg { display: block; width: 100%; height: auto; }
.doc-kci-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; margin: 0 0 1rem; }
.doc-kci-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem; background: var(--surface); }
.doc-kci-value { font-size: 1.4rem; font-weight: 700; color: #1F3864; margin: .1rem 0 .4rem; }
.doc-profile-badge { display: inline-block; background: #1F3864; color: #fff; border-radius: 4px; padding: .1rem .45rem; font-size: .8rem; }
.doc-session-block { margin: 0 0 1rem; }
.doc-progress-foot { border-top: 1px solid var(--line); padding-top: .5rem; margin-top: 1rem; }
@media (max-width: 600px) { .doc-badges, .doc-cols, .doc-profile-pair, .doc-kci-grid { grid-template-columns: minmax(0, 1fr); } }
.doc-metrics td, .doc-metrics th, .doc-levels td, .doc-levels th { white-space: normal; }
.doc-levels th, .doc-levels td:nth-child(3) { white-space: nowrap; }
/* 1.10.26: a visually hidden header inside a scrolling table stays inside it (it widened the page on a phone) */
.table-wrap { position: relative; }
/* 1.10.30 (decision 118): start time as an hour and a minute list */
.time-pair { display: flex; align-items: center; gap: .3rem; }
.time-pair select { width: auto; min-width: 4.2rem; }
.series-list { list-style: none; margin: 0; padding: 0; }
.series-list li { padding: .55rem 0; border-bottom: 1px solid var(--line, #e6e1d6); }
.series-list li:last-child { border-bottom: 0; }
.series-list li.is-skipped { color: var(--ink-2); }
/* 1.10.31 (decision 119): the session form — date, start and repeat first; rule settings folded */
.session-grid input, .session-grid select { min-width: 0; max-width: 100%; }
.session-when { grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) minmax(120px, 1fr); }
.session-rules > summary { cursor: pointer; font-weight: 600; }
.session-rules > summary .muted { font-weight: 400; }
@media (max-width: 640px) {
  .session-when { grid-template-columns: 1fr 1fr; }
  .session-when .f-date { grid-column: 1 / -1; }
}
/* 1.10.32 (decision 122): the folded rule settings — checkboxes on one line, the two lists side by side below */
.rules-checks { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.rules-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; max-width: 40rem; }
.rules-lists select { width: 100%; }
@media (max-width: 640px) {
  .rules-lists { grid-template-columns: 1fr; }
}
/* 1.10.32 (decision 123): profile image or initials */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; object-fit: cover;
  background: var(--tag-bg); color: var(--ink-2); font-family: var(--heading); font-weight: 600; vertical-align: middle; overflow: hidden; }
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-md { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar-row { display: flex; align-items: center; gap: 1rem; }
.avatar-row h1 { margin: 0; }
.name-cell { display: flex; align-items: center; gap: .6rem; }
.photo-form input[type=file] { max-width: 30rem; }
.photo-edit { margin-bottom: 1rem; }
/* 1.10.34 (decision 130a): the coach's image next to "From your coach" */
.coach-heading { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
/* 1.10.35 (decision 131): the coach's answer to a request */
.request-answer fieldset { border: 0; padding: 0; margin: 0; }
.request-answer textarea { width: 100%; }
/* 1.10.36 (decision 134): the coach's profile page */
.coach-link { display: inline-flex; border-radius: 50%; }
.coach-public h1 { margin: 0; }
.coach-about { white-space: normal; line-height: 1.55; }
.coach-public .dl { margin-top: 1.25rem; }

/* 1.10.37 (decision 136): the client guide on the Help page */
.guide-title { margin-top: 2rem; }
.guide-toc { margin: .5rem 0 0; }
.guide-toc a { text-decoration: none; }
.guide-section .prose h3 { font-size: 1rem; margin: 1.1rem 0 .4rem; }
.guide-shot { margin: .75rem auto 1rem; text-align: center; }
.guide-shot img { display: block; margin: 0 auto; max-width: min(100%, 22rem); height: auto; border: 1px solid var(--line, #d9dde3); border-radius: 12px; }

/* 1.10.38 (decision 138): the client's Help menu. The client menu scrolls sideways on narrow phones (overflow-x),
   which would clip a dropdown; its list is placed fixed below the "Help" label by app.js. */
.nav-menu-client > .nav-menu-list { position: fixed; top: auto; right: 1rem; }
.nav-client .nav-menu > summary { padding: .35rem 0; }
@media (max-width: 380px) { .nav-client { gap: .5rem; } .nav-client .nav-menu > summary::after { font-size: .7em; } }

/* 1.11.0 (R3): messages — a letter box, newest at the bottom */
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg { padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 .7rem; max-width: 92%; }
.msg-theirs { background: var(--surface); margin-right: auto; }
.msg-mine { background: var(--example-bg); margin-left: auto; }
.msg.is-new { border-color: var(--gold); }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.msg-author { display: inline-flex; align-items: center; gap: .4rem; color: inherit; text-decoration: none; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.msg-body a { overflow-wrap: anywhere; }
.msg-deleted { font-style: italic; }
.msg-status { margin: .35rem 0 0; text-align: right; }
.msg-actions { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .3rem; }
.msg-actions details { flex: 1 1 100%; }
.msg-line { margin: 0; font-weight: 600; }
.msg-safety { margin: 0; }
.msg-about p { margin: .5rem 0 0; }
.msg-earlier summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.nav-count { display: inline-block; min-width: 1.2rem; padding: 0 .3rem; margin-left: .25rem; border-radius: .6rem; background: var(--gold);
  color: var(--navy); font: 600 .72rem/1.2rem var(--heading); text-align: center; vertical-align: .1em; }
.msg-overview .task-code { padding-top: 0; }
.input-days { width: 5rem; }
.msg-earlier-one { border-top: 1px solid var(--line); padding: .6rem 0; }
.msg-earlier-one > summary { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; cursor: pointer; }
.msg-earlier-one .msg-list { margin-top: .6rem; }
/* 1.11.1: reminder times (number, unit, "before" on one line) */
.reminder-row { display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap; }
.reminder-row input { width: 5rem; flex: none; }
.reminder-row select { width: auto; flex: none; }
.session-reminders fieldset { border: 0; padding: 0; margin: 0; }

/* 1.11.2 (decision 147): first and last name side by side */
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.name-fields > div { display: flex; flex-direction: column; gap: .25rem; }
@media (max-width: 480px) { .name-fields { grid-template-columns: 1fr; } }

/* 1.11.2 (decision 148): the email template editor */
.md-toolbar { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.md-toolbar .md-sep { width: .6rem; }
.md-toolbar .mono { font-size: .75rem; }
.email-preview { width: 100%; height: 420px; border: 1px solid #e3dfd5; border-radius: 8px; background: #fff; }
.email-logo-preview { max-width: 100%; height: auto; }

/* 1.11.3 (decision 149, F4): placeholders as small links below the formatting buttons */
.md-placeholders { display: flex; flex-wrap: wrap; gap: .15rem .6rem; align-items: baseline; }
.ph-link { background: none; border: 0; padding: 0; color: #2a4266; text-decoration: underline; cursor: pointer; font-size: .78rem; }
.ph-link:hover, .ph-link:focus { color: #1a2e4a; }
.ph-link.ph-empty { color: var(--ink-2); text-decoration: line-through; } /* 1.12.3: stays empty in this email */
.tpl-fold > summary h2 .muted { font-weight: normal; }

/* 1.12.0 (spec 8a): a clashing session in the series preview */
.series-list .clash { margin-top: .5rem; padding: .5rem .75rem; border-left: 3px solid var(--warn, #b7791f); background: rgba(183, 121, 31, .06); }
.series-list .clash ul { margin: 0 0 .5rem 1rem; padding: 0; }
.series-list .clash fieldset { border: 0; padding: 0; margin: 0; flex-wrap: wrap; align-items: center; }

/* 1.12.0: names typed by people outside the practice may have no spaces */
.wrap-any { overflow-wrap: anywhere; }

/* 1.12.2: booking settings (day headline, two ranges below) and the address with its fixed beginning */
.day-hours h3 { font-size: 1rem; margin: .9rem 0 .35rem; }
.day-ranges { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.prefix-input { display: flex; align-items: center; gap: .35rem; }
.prefix-input .prefix { white-space: nowrap; color: var(--ink-2); font-size: .95rem; }
.prefix-input input { flex: 1; min-width: 0; }
/* 1.12.2: month calendar of free days (booking pages) */
.month-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.month-head h2 { margin: 0; font-size: 1.15rem; }
.month-head a, .month-head .off { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; text-decoration: none; font-size: 1.3rem; }
.month-head .off { color: var(--line); }
.month-cal { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
.month-cal th { font-size: .8rem; font-weight: 600; color: var(--ink-2); padding: .25rem 0; }
.month-cal td { padding: 3px 0; }
.month-cal td a, .month-cal td span { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; max-width: 100%; border-radius: 999px; }
.month-cal td a { background: var(--accent-bg); color: var(--navy); font-weight: 700; text-decoration: none; border: 1px solid var(--accent-line); }
.month-cal td a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.month-cal td span { color: var(--ink-2); opacity: .55; }
.month-legend { font-size: .85rem; color: var(--ink-2); margin: .5rem 0 0; }

/* 1.12.3 (decision 165): the booking widget (a page in a frame on the coach's website) and the two booking steps */
.page-embed { max-width: none; padding: 1rem 12px 1.25rem; }
body.embed { background: var(--bg); }
.bk-step { animation: bk-fade-in .35s ease-out both; }
@keyframes bk-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bk-step { animation: none; } }
.bk-chosen { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; justify-content: space-between; }
.bk-chosen strong { font-family: var(--heading); }
.bk-next { display: flex; justify-content: flex-end; }
.widget-colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem .9rem; }
.widget-colours label { display: flex; flex-direction: column; gap: .2rem; font-weight: 400; }
.widget-colours input[type="color"] { width: 100%; min-height: 40px; padding: 2px; }
.snippet { width: 100%; font-family: var(--mono); font-size: .78rem; }

/* 1.13.0 (CRM-1): contacts, companies, follow-ups */
.crm-tabs { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line); }
.crm-tabs a { padding: .4rem 0; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.crm-tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.crm-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .75rem; }
.crm-filter input { flex: 1 1 14rem; min-width: 0; }
.crm-filter select { width: auto; }
.crm-row { gap: .35rem 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.crm-row > span:first-child { flex: 1 1 16rem; min-width: 0; }
.crm-form { gap: .5rem; }
.crm-form > input:not([type="checkbox"]), .crm-form > select { width: auto; flex: 1 1 10rem; min-width: 0; }
.crm-form > input[type="date"], .crm-form > input[type="time"] { flex: 0 1 10rem; }
.crm-form > input.input-narrow { flex: 0 0 5rem; }
.crm-row:last-of-type { border-bottom: 0; }
.crm-head { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.25rem 0 .5rem; }
.tag { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--tag-bg); color: var(--ink); font-size: .8rem; text-decoration: none; }
.tag-free { background: var(--info-bg); }
.stack-tight { display: flex; flex-direction: column; gap: .2rem; }
.grow { flex: 1 1 12rem; min-width: 0; }
.input-narrow { width: 5rem; }
.crm-timeline { list-style: none; margin: .75rem 0 0; padding: 0; }
.crm-timeline li { border-left: 2px solid var(--line); padding: 0 0 .6rem .8rem; }
.crm-timeline li.crm-auto { border-left-color: var(--gold); }
.crm-timeline p { margin: 0 0 .2rem; }
.crm-summary { white-space: normal; overflow-wrap: anywhere; }
.crm-changes td { vertical-align: top; }

/* 1.14.0 (CRM-2): the envelope for messages at the right end of the coach menu; the pipeline */
.nav-icon { display: inline-flex; align-items: center; gap: .15rem; }
.nav-icon svg { display: block; }
.nowrap { white-space: nowrap; }
h2.h3 { font-size: 1.05rem; }

/* 1.15.0 (CRM-3, 12.4): the board — columns side by side, scrolling sideways on narrow screens */
.crm-board { display: flex; gap: .75rem; overflow-x: auto; align-items: flex-start; padding-bottom: .5rem; }
.crm-col { flex: 0 0 15rem; background: var(--bg-2, rgba(0,0,0,.03)); border: 1px solid var(--line); border-radius: .5rem; padding: .5rem; min-height: 6rem; }
.crm-col.is-over { outline: 2px dashed var(--gold); }
.crm-card { background: var(--card, #fff); border: 1px solid var(--line); border-radius: .4rem; padding: .5rem; margin: 0 0 .5rem; cursor: grab; }
.crm-card p { margin: 0 0 .25rem; }
.crm-card.is-dragging { opacity: .5; }

/* 1.16.0 (decision 178): the coach's Home — panels in a grid (one column on a phone). */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; align-items: start; }
.dash-panel { margin: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.dash-head h2 { margin: 0 0 .5rem; }
.dash-list { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-direction: column; gap: .3rem; }
.dash-list .dash-day { margin-top: .4rem; }
.dash-list .dash-day:first-child { margin-top: 0; }

/* 1.17.0 (decision 179): System and My settings — an overview with groups, each group on its own page. */
.settings-overview { display: flex; flex-direction: column; gap: 1rem; }
.settings-overview > h1, .settings-overview > p { margin: 0; }
.settings-status { display: flex; flex-direction: column; gap: .4rem; margin: 0; }
.settings-status.is-attention { border-color: var(--warn-line); }
.settings-status-head { margin: 0; display: flex; align-items: center; gap: .6rem; }
.settings-todo { margin: 0; padding-left: 1.6rem; display: flex; flex-direction: column; gap: .3rem; }
.settings-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; flex: none; background: var(--ok, #2F855A); }
.settings-dot.attention { background: #C05621; } /* lighter than the green: told apart by lightness too */
.settings-dot.info { background: var(--info, #2B6CB0); }
.settings-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.settings-tile { display: flex; flex-direction: column; gap: .5rem; margin: 0; text-decoration: none; color: inherit; min-height: 8rem; }
.settings-tile:hover, .settings-tile:focus-visible { border-color: var(--ink-2); }
.settings-tile-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.settings-tile-title { font-weight: 600; font-size: 1.05rem; }
.settings-badge { align-self: flex-start; margin-top: auto; font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .15rem .6rem; background: var(--ok-bg, #E3F1E6); color: var(--ok, #1E5B2E); }
.settings-badge.attention { background: var(--warn-bg); color: var(--warn); }
.settings-badge.info { background: var(--info-bg, #E3ECF7); color: var(--info, #1D4A7A); }
.settings-layout { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.settings-nav { flex: 1 1 14rem; max-width: 18rem; display: flex; flex-direction: column; gap: .15rem; padding: .5rem; margin: 0; }
.settings-nav a { text-decoration: none; color: inherit; border-radius: .4rem; padding: .55rem .75rem; }
.settings-nav .settings-back { color: var(--ink-2); font-size: .9rem; }
.settings-nav-item { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.settings-nav-item:hover { background: var(--surface-2, rgba(0, 0, 0, .04)); }
.settings-nav-item.is-current { background: var(--surface-2, rgba(0, 0, 0, .06)); font-weight: 600; }
.settings-main { flex: 999 1 36rem; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.settings-main > .card, .settings-main > form.card, .settings-main > details.card { margin: 0; }
.settings-crumb { margin: 0; font-size: .85rem; color: var(--ink-2); }
.settings-main > h1 { margin: 0; }
@media (max-width: 760px) { .settings-nav { max-width: none; } }
/* 1.21.0 (decision 185 (4)): PDFs with a session's notes */
.file-list { list-style: none; padding: 0; margin: .4rem 0; }
.file-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line, #E5E1D8); }
/* 1.21.0 (decision 185 (2)): the coach's calendar */
.cal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.cal-views { display: flex; gap: .25rem; }
.cal-views a { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.cal-views a.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.cal-label { margin-left: .4rem; }
.cal-month { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: .6rem; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head > div { padding: .35rem; font-size: .8rem; text-align: center; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 4.2rem; padding: .3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .2rem; }
.cal-row .cal-day:nth-child(7) { border-right: 0; }
.cal-day:hover, .cal-day:focus { background: var(--surface-muted); }
.cal-out { opacity: .45; }
.cal-today .cal-num, .cal-wday.cal-today .cal-wtitle { font-weight: 700; text-decoration: underline; }
.cal-dot { align-self: flex-start; min-width: 1.4rem; padding: 0 .35rem; border-radius: 1rem; background: var(--ink); color: var(--surface); font-size: .75rem; text-align: center; }
.cal-busy-mark { font-size: .7rem; color: var(--ink-2); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.cal-wday { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; min-width: 0; }
.cal-wtitle { font-size: .9rem; margin: 0 0 .4rem; }
.cal-list { list-style: none; padding: 0; margin: 0; }
.cal-list li { padding: .25rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.cal-list li:last-child { border-bottom: 0; }
.cal-busy, .cal-busy a { color: var(--ink-2); }
.cal-held { opacity: .7; }
.cal-dayl summary { cursor: pointer; }
.cal-details { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; margin: .5rem 0 .3rem 1rem; }
.cal-details dd { margin: 0; }
.cal-details .cal-open { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .cal-week { grid-template-columns: 1fr; }
  .cal-day { min-height: 3rem; }
}
