/* The trainer's client card (#/client/<id>) and the sheets opened from it. Tokens only; type in rem.
   On a phone the identity column sits above the tabs; on a wide screen it stays beside them. */
.cc{display:flex;flex-direction:column;gap:12px;min-width:0}
.cc-side,.cc-main,.cc-panel{display:flex;flex-direction:column;gap:12px;min-width:0}
.cc-panel[hidden]{display:none}
@media (min-width: 900px){
  .shell.wide .cc{display:grid;grid-template-columns:340px minmax(0,1fr);gap:16px;align-items:start}
  .shell.wide .cc-side{position:sticky;top:0}
}

/* who he is */
.cc-id{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:12px}
.cc-id-t{min-width:0}
.cc-id-t h1{font-size:1.25rem;line-height:1.2;overflow-wrap:anywhere}
.cc-id-t .sub{overflow-wrap:anywhere}
.cc-id .cc-kpis{grid-column:1 / -1}
.cc-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:10px}
.cc-kpis > div{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:var(--r-sm);background:var(--tile-2);min-width:0}
.cc-kpis b{font-size:1rem;font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.cc-kpis b.num{font-size:1.2rem}
.cc-kpis span{font-size:.75rem;color:var(--ink-3)}
.sheet .cc-kpis > div{background:var(--tile-2)}

/* a tile that asks for attention (decoration colour as a line, never as text), and an informing one */
.cc-warn{box-shadow:inset 0 0 0 1.5px var(--decor);background:var(--decor-tint)}
.cc-warn > b{display:flex;align-items:center;gap:8px;font-size:.94rem}
.cc-warn > b svg{width:18px;height:18px;flex:none}
.cc-wash{background:var(--wash)}
.cc-wash h2{display:flex;align-items:center;gap:8px}
.cc-wash h2 svg{width:18px;height:18px}
.cc-lines{display:flex;flex-direction:column;gap:6px;font-size:.875rem}
.cc-lines small{color:var(--ink-3)}
.cc-danger h2{color:var(--danger)}
.cc-fail{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* the questionnaire, folded */
.cc-intake summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none}
.cc-intake summary::-webkit-details-marker{display:none}
.cc-intake summary > span{min-width:0}
.cc-intake summary svg{flex:none;transform:rotate(-90deg);transition:transform 160ms var(--ease-out)}
.cc-intake[open] summary svg{transform:rotate(90deg)}
.cc-intake[open] summary{margin-bottom:8px}
.cc-kvs{display:flex;flex-direction:column}
.cc-kvs .kv > span:first-child{color:var(--ink-2);font-size:.875rem;min-width:0}
.cc-kvs .kv > b{font-size:.9rem;font-weight:600;text-align:end;overflow-wrap:anywhere}
.cc-break{overflow-wrap:anywhere;word-break:break-all}

.cc-acts2,.cc-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.cc-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cc-two > :only-child{grid-column:1 / -1}
.cc-acts2 .btn.ghost{background:var(--tile)}
.cc-h3{margin-top:4px}
.cc-kind{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:14px;background:var(--tile-2)}
.cc-kind .cc-h3{margin:0}
.cc-days{display:flex;flex-direction:column;gap:8px}
.cc-tk{display:flex;flex-direction:column;gap:12px}
.cc-tk > .sub{margin:0}
.cc-wd{display:flex;flex-wrap:wrap;gap:8px}
.cc-wd .chip{min-width:44px;min-height:40px;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.cc-kind .input{background:var(--tile)}
.cc-tags{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.row.cc-nolead{grid-template-columns:minmax(0,1fr) auto auto auto}
.row.cc-nolead > small{font-size:.75rem;color:var(--ink-3)}
.row[aria-expanded] > .chev{transform:rotate(-90deg);transition:transform 160ms var(--ease-out)}
.row[aria-expanded="true"] > .chev{transform:rotate(90deg)}

/* photos the client shared */
.cc-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px}
.cc-photo{position:relative;aspect-ratio:3 / 4;border-radius:var(--r-sm);overflow:hidden;background:var(--tile-2);display:block;padding:0}
.cc-photo img{width:100%;height:100%;object-fit:cover;display:block}
.cc-photo span{position:absolute;inset-inline:0;bottom:0;padding:4px 6px;font-size:.6875rem;font-weight:600;background:var(--scrim);color:var(--on-accent);text-align:center}
.cc-photo.gone{display:grid;place-items:center}
.cc-photo.gone em{font-style:normal;font-size:.75rem;color:var(--ink-3);text-align:center;padding:0 6px}
.cc-photo:active{transform:scale(.97)}

/* the review document inside a sheet: its tiles take the sheet's second surface */
.cc-doc .tile{background:var(--tile-2)}
.cc-doc .hello h1{font-size:1.25rem}
.cc-flags{display:flex;flex-direction:column;gap:8px}

/* a programme, read-only */
.cc-pv-head{display:flex;flex-direction:column;gap:10px;position:sticky;top:0;z-index:2;background:var(--tile);padding-bottom:10px;box-shadow:0 1px 0 var(--line)}
.cc-pv-acts{display:flex;flex-wrap:wrap;gap:8px}
.cc-pv-acts .btn.sm{flex:1 1 auto}
.cc-box{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:var(--r-sm);background:var(--tile-2)}
.cc-box.warn{background:var(--decor-tint);box-shadow:inset 0 0 0 1.5px var(--decor)}
.cc-box .btn.sm{align-self:flex-start}
.cc-box .kv{padding-block:8px}
.cc-freq{display:flex;flex-direction:column;gap:10px;padding-block:4px 8px}
.cc-freq .chips,.field .chips{margin-inline:0;padding-inline:0;flex-wrap:wrap}
.cc-day{display:flex;flex-direction:column;gap:6px}
.cc-day-h{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px}
.cc-day-h b{font-size:1rem}
.cc-day-h small{font-size:.78rem;color:var(--ink-3)}
.cc-about summary{cursor:pointer;font-weight:600;font-size:.875rem;color:var(--secondary-text);padding-block:4px}
.cc-about p,.cc-about ul{font-size:.875rem;color:var(--ink-2);padding-inline-start:18px;margin-top:6px}
.cc-about p{padding-inline-start:0}

/* the diary */
.cc-days{display:flex;flex-direction:column}
.cc-dayrow + .cc-dayrow{border-top:1px solid var(--line)}
.cc-daybox{display:flex;flex-direction:column;gap:10px;padding:4px 2px 14px}
.cc-daybox[hidden]{display:none}
.cc-meal{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:var(--r-sm);background:var(--tile-2)}
.cc-meal-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.cc-meal-h small{font-size:.75rem;color:var(--ink-3)}
.cc-line{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-block:4px;font-size:.875rem}
.cc-line > span{min-width:0;display:flex;flex-direction:column;gap:1px}
.cc-line > span b{font-weight:600}
.cc-line small{font-size:.75rem;color:var(--ink-3)}
.cc-line .pill{font-size:.6875rem;padding:1px 8px}

/* habits and notes */
.cc-hab{display:flex;align-items:center;gap:10px;min-width:0}
.cc-hab > svg{width:20px;height:20px;flex:none;color:var(--secondary-text)}
.cc-del{color:var(--danger);flex:none}
.cc-del svg{width:18px;height:18px}
.cc-notes{display:flex;flex-direction:column;gap:8px}
.cc-note{padding:10px 12px;border-radius:var(--r-sm);background:var(--tile-2)}
.cc-note header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cc-note header small{font-size:.75rem;color:var(--ink-3)}
.cc-note p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem}

/* the temporary password, the health declaration, the delete sheet */
.cc-code{align-items:center;text-align:center}
.cc-code > b{font-size:1.875rem;font-weight:800;letter-spacing:.12em;font-variant-numeric:tabular-nums;user-select:all;-webkit-user-select:all}
.cc-parq{display:flex;flex-direction:column}
.cc-parq-q{display:flex;flex-direction:column;gap:4px;padding:10px 2px}
.cc-parq-q + .cc-parq-q{border-top:1px solid var(--line)}
.cc-parq-q p{font-size:.875rem}
.cc-parq-q b{color:var(--ink-3);display:inline-flex;align-items:center;gap:6px}
.cc-parq-q.yes{background:var(--decor-tint);box-shadow:inset 0 0 0 1.5px var(--decor);border-radius:var(--r-sm);padding-inline:10px;border-top:0}
.cc-parq-q.yes b{color:var(--ink)}
.cc-parq-q b svg{width:16px;height:16px}
.cc-list{padding-inline-start:20px;display:flex;flex-direction:column;gap:4px;font-size:.9rem}

@media (hover: hover) and (pointer: fine){
  .cc-acts2 .btn.ghost:hover{background:var(--wash)}
}
@media (prefers-reduced-motion: reduce){
  .cc-photo:active{transform:none}
  .cc-intake summary svg,.row[aria-expanded] > .chev{transition:none}
}
.cc-mass[hidden]{display:none}
.cc-mass-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.cc-mass-row.four{grid-template-columns:repeat(2,minmax(0,1fr))}
.cc-mass-chip{display:flex;flex-direction:column;align-items:center;gap:2px;height:auto;min-height:52px;padding:8px 4px;white-space:normal}
.cc-mass-chip small{font-size:.68rem;font-weight:500;opacity:.85}
.cc-prule{display:block;flex:none;height:auto}
.cc-prule[hidden]{display:none}
.cc-prule .textlink{display:inline-block;padding:0;margin-inline-start:8px}
