/* Clinicians, rebuilt in the family design (docs/design/FAMILY.md). views/clinicians.js draws it.
   One loud thing: the portraits. A person is a quiet tile (a large round portrait, the name, the specialty,
   one real line, one button), never a box inside a box. An editorial account wears its label and no seal;
   a record nobody has claimed is drawn with a dashed edge and initials.
   Tokens only (family.css). */

#main-content > [data-viewpanel="clinicians"] { max-width: 1120px !important; margin-left: auto; margin-right: auto; }

.cl { display: flex; flex-direction: column; gap: 22px; padding-bottom: 48px; color: var(--color-foreground); }
:where(.cl) :where(h1, p, ul) { margin: 0; }
.cl ul { padding: 0; list-style: none; }

/* ── head: the title, one line, the invitation ── */
.cl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.cl-head h1 { font-size: 32px; font-weight: 600; letter-spacing: -.022em; line-height: 1.1; }
.cl-head p { margin-top: 8px; max-width: 60ch; font-size: 15px; line-height: 1.5; color: var(--color-muted-foreground); text-wrap: pretty; }
.cl-pill, .cl-btn { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--frost-strong); box-shadow: var(--frost-rim); font-weight: 600; color: var(--color-foreground); white-space: nowrap; transition: border-color .16s var(--ease-out), color .16s var(--ease-out), box-shadow .32s var(--ease-out); }
.cl-pill { height: 44px; padding: 0 18px 0 16px; font-size: 14px; }
.cl-pill i { font-size: 16px; color: var(--color-muted-foreground); transition: color .16s var(--ease-out); }
.cl-btn { height: 36px; padding: 0 16px; font-size: 13.5px; }
.cl-btn i { font-size: 14px; }
.cl-pill:hover, .cl-btn:hover { border-color: var(--oryn-border-hover); color: var(--color-brand-ink); box-shadow: var(--frost-rim), var(--frost-shadow); }
.cl-pill:hover i { color: var(--color-brand-ink); }

/* ── the search field and the segments ── */
.cl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.cl-search { display: flex; flex: 1 1 280px; align-items: center; gap: 12px; max-width: 420px; height: 46px; padding: 0 18px; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--frost-strong); box-shadow: var(--frost-rim), var(--frost-shadow); cursor: text; transition: border-color .22s var(--ease-out), box-shadow .32s var(--ease-out); }
.cl-search > i { flex: none; font-size: 18px; color: var(--color-muted-foreground); }
.cl-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; -webkit-appearance: none; appearance: none; background: transparent; font-size: 15px; color: var(--color-foreground); }
.cl-search input::placeholder { color: var(--color-muted-foreground); }
.cl-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.cl-search:focus-within { border-color: color-mix(in srgb, var(--color-brand) 70%, transparent); box-shadow: var(--frost-rim), 0 0 0 4px var(--brand-soft); }
.cl-seg { position: relative; display: inline-flex; max-width: 100%; padding: 4px; overflow-x: auto; border: 1px solid var(--frost-line); border-radius: 999px; background: var(--color-muted); scrollbar-width: none; }
.cl-seg::-webkit-scrollbar { display: none; }
.cl-seg[hidden] { display: none; }
.cl-seg button { position: relative; z-index: 1; display: inline-flex; flex: none; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--color-muted-foreground); white-space: nowrap; transition: color .2s var(--ease-out); }
.cl-seg button:hover, .cl-seg button[aria-pressed="true"] { color: var(--color-foreground); }
.cl-seg small { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-muted-foreground); }
.cl-seg button[aria-pressed="true"] small { color: var(--color-brand-ink); }
.cl-seg__thumb { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--color-card); box-shadow: var(--frost-rim), var(--frost-shadow); transition: transform .34s var(--ease-out), width .34s var(--ease-out); }
.cl-note { margin-top: -8px; font-size: 13px; color: var(--color-muted-foreground); }
.cl-note[hidden] { display: none; }

/* ── people ── */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.cl-tile { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: center; padding: 28px 18px 20px; border: 1px solid var(--frost-line); border-radius: 24px; background: var(--frost); box-shadow: var(--frost-rim), var(--frost-shadow); text-align: center; cursor: pointer; transition: border-color .18s var(--ease-out), box-shadow .32s var(--ease-out), translate .42s var(--frost-ease); }
@media (hover: hover) {
  .cl-tile:hover { border-color: var(--oryn-border-hover); box-shadow: var(--frost-rim), var(--frost-shadow-up); translate: 0 -2px; }
  .cl-tile:hover .cl-name { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-foreground) 30%, transparent); text-underline-offset: 3px; }
}
.cl-face { display: block; flex: none; width: 88px; height: 88px; border-radius: 50%; }
.cl-face > *, .cl-pic { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.cl-ini { font-size: 28px; letter-spacing: -.01em; }
.cl-face--none { display: grid; place-items: center; border: 1px dashed var(--oryn-border-hover); background: var(--color-muted); font-size: 26px; font-weight: 600; color: var(--color-muted-foreground); }
.cl-who { display: inline-flex; max-width: 100%; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; border-radius: 8px; }
.cl-name { overflow: hidden; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.cl-seal { flex: none; font-size: 16px; color: var(--color-brand); }
.cl-spec { max-width: 100%; margin-top: 4px; overflow: hidden; font-size: 13.5px; line-height: 22px; color: var(--oryn-text-2); text-overflow: ellipsis; white-space: nowrap; }
.cl-tag { display: inline-flex; align-items: center; height: 22px; margin-top: 4px; padding: 0 10px; border-radius: 999px; background: var(--frost-well); font-size: 12px; font-weight: 550; color: var(--oryn-text-2); white-space: nowrap; }
.cl-fact { margin-top: 6px; font-size: 12.5px; color: var(--color-muted-foreground); }
.cl-act { display: block; margin-top: auto; padding-top: 18px; }
/* Invite stands where Follow stands, at the same size */
.cl-act .cl-btn { height: 44px; min-width: 106px; }
/* a record nobody has claimed: there is no account behind it yet, and the tile says so by its edge */
.cl-tile--away { border-style: dashed; border-color: var(--oryn-border-hover); background: transparent; box-shadow: none; }

/* ── more, the saved invitation notes, the empty page ── */
.cl-more { display: flex; justify-content: center; margin-top: 20px; }
.cl-rows { padding: 6px; border: 1px solid var(--frost-line); border-radius: 24px; background: var(--frost); box-shadow: var(--frost-rim), var(--frost-shadow); }
.cl-inv { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; }
.cl-inv + .cl-inv::before { content: ''; position: absolute; top: 0; left: 72px; right: 14px; height: 1px; background: var(--frost-line); }
.cl-inv__ic { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--frost-well); color: var(--color-muted-foreground); }
.cl-inv__ic i { font-size: 18px; }
.cl-inv__who { min-width: 0; }
.cl-inv__who b { display: block; overflow: hidden; font-size: 15px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.cl-inv__who span { display: block; overflow: hidden; margin-top: 2px; font-size: 12.5px; color: var(--color-muted-foreground); text-overflow: ellipsis; white-space: nowrap; }
.cl-empty { display: grid; justify-items: center; gap: 18px; padding: 64px 24px; border: 1px dashed var(--frost-line); border-radius: 24px; text-align: center; }
.cl-empty p { max-width: 46ch; font-size: 15px; line-height: 1.55; color: var(--color-muted-foreground); text-wrap: pretty; }

/* ── the second pass (18 November 2026): the views beside the search, the groups, the colour band of a tile, the
   card that closes the list. Their shape is here so the page holds together on its own; their look is in
   views/clinicians-pass.css, over the clean layer. ── */
.cl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cl-chips[hidden] { display: none; }
.cl-chip { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border: 1px solid var(--frost-line); border-radius: 999px; font-size: 14px; white-space: nowrap; }
.cl-chip small { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--color-muted-foreground); }
.cl-clear { display: inline-flex; flex: none; align-items: center; gap: 5px; height: 30px; margin-right: -8px; padding: 0 10px; border-radius: 999px; font-size: 13px; color: var(--color-muted-foreground); }
.cl-clear[hidden] { display: none; }
.cl-sec { display: flex; flex-direction: column; gap: 18px; }
.cl-sec + .cl-sec { margin-top: 24px; }
.cl-sec__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-sec__ic { display: grid; flex: none; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: var(--color-muted); }
.cl-sec__t { flex: 1; min-width: 0; }
.cl-sec__t h2 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.2; }
.cl-sec__t p { margin: 2px 0 0; font-size: 14px; color: var(--color-muted-foreground); }
.cl-sec__n { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--color-muted-foreground); }
.cl-band { position: absolute; top: 6px; left: 6px; right: 6px; height: 70px; border-radius: 16px; background: var(--color-muted); pointer-events: none; }
.cl-tile > .cl-face { position: relative; z-index: 1; }
.cl-spec__f, .cl-spec__c { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-spec__sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cl-fact__dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--color-muted-foreground); }
.cl-go { gap: 10px; padding-left: 11px; }
.cl-go__ic { display: grid; flex: none; width: 24px; height: 24px; place-items: center; border-radius: 50%; }
.cl-invite { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-top: 16px; padding: 22px 24px; border-radius: 20px; background: var(--color-muted); }
.cl-invite__ic, .cl-empty__ic { display: grid; flex: none; width: 48px; height: 48px; place-items: center; border-radius: 50%; }
.cl-invite__t { min-width: 0; }
.cl-invite__t h2, .cl-empty h2 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.25; }
.cl-invite__t p { margin: 4px 0 0; font-size: 14.5px; color: var(--color-muted-foreground); }

/* ── while the accounts arrive ── */
.cl-tile--sk { cursor: default; }
.cl-sk { display: block; border-radius: 8px; }
.cl-sk--a { width: 130px; height: 14px; margin-top: 20px; }
.cl-sk--b { width: 90px; height: 10px; margin-top: 12px; }
.cl-sk--c { width: 104px; height: 36px; margin-top: 26px; border-radius: 999px; }

/* ── phones: two tiles a row ── */
@media (max-width: 899.98px) {
  .cl { gap: 18px; }
  .cl-head h1 { font-size: 27px; }
  .cl-search { max-width: none; flex-basis: 100%; }
  .cl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cl-tile { padding: 20px 10px 14px; border-radius: 20px; }
  .cl-face, .cl-face > *, .cl-pic { width: 68px; height: 68px; }
  .cl-ini, .cl-face--none { font-size: 22px; }
  .cl-who { margin-top: 12px; }
  .cl-name { font-size: 15px; }
  .cl-spec { font-size: 13px; }
  .cl-act { padding-top: 14px; }
  .cl-inv { grid-template-columns: 40px minmax(0, 1fr); row-gap: 10px; }
  .cl-inv .cl-btn { grid-column: 2; justify-self: start; }
  .cl-inv__ic { width: 40px; height: 40px; }
  .cl-inv + .cl-inv::before { left: 68px; }
  .cl-empty { padding: 48px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-tile, .cl-seg__thumb, .cl-pill, .cl-btn, .cl-search { transition: none; }
  .cl-tile:hover { translate: none; }
}
html.a11y-reduce-motion .cl-tile, html.a11y-reduce-motion .cl-seg__thumb, html.a11y-reduce-motion .cl-pill, html.a11y-reduce-motion .cl-btn, html.a11y-reduce-motion .cl-search { transition: none; }
html.a11y-reduce-motion .cl-tile:hover { translate: none; }

/* ── a touch screen: the segments are 44px tall (the row scrolls sideways, so the buttons themselves grow) ── */
@media (pointer: coarse) { .cl-seg button { height: 44px; } }
/* the name on a tile is its link (19px tall): an area nobody sees takes a 44px press, the look unchanged */
@media (pointer: coarse) {
  .cl-who { position: relative; }
  .cl-who::after { content: ''; position: absolute; inset: -13px 0; }
}
