/* Styles for the feature modules (dictation, AI summary, Today, Ask ORAMA).
   Every colour, radius and size comes from ORAMA's own tokens in index.html,
   so light and dark themes follow automatically. Class prefix: oa- */

.oa-muted { color: var(--ink-muted); }
.oa-failed { margin: 0; font-size: 13px; line-height: 18px; }
.oa-linkbtn {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent-ink);
  cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap;
}
.oa-linkbtn:hover { text-decoration-thickness: 2px; }
.oa-linkbtn:focus-visible, .oa-dict__btn:focus-visible, .oa-cite:focus-visible, .oa-chip:focus-visible,
.oa-seg__opt:focus-visible, .oa-iconbtn:focus-visible, .oa-disclosure:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }

.oa-tag {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap;
}
.oa-tag--ai { background: var(--ai-soft); color: var(--ai-ink); }
.oa-ai-icon { width: 18px; height: 18px; color: var(--ai-ink); flex-shrink: 0; }

.oa-state {
  display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 0 8px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap;
}
.oa-state--bad { background: var(--bad-soft); color: var(--bad-ink); }
.oa-state--warn { background: var(--warn-soft); color: var(--warn-ink); }
.oa-state--due { background: var(--due-soft); color: var(--due-ink); }
.oa-state--ok { background: var(--ok-soft); color: var(--ok-ink); }
.oa-state--info { background: var(--accent-soft); color: var(--accent-ink); }
.oa-state--neutral { background: var(--surface-sunken); color: var(--ink-muted); }

/* ------------------------------------------------------------ dictation */

.oa-dict { display: grid; gap: 6px; min-width: 0; width: 100%; }
.oa-dict__box { position: relative; min-width: 0; }
.oa-dict__box > .oa-dict__field { width: 100%; }
.oa-dict--textarea:not(.oa-dict--compact) .oa-dict__field { padding-bottom: 42px; }
.oa-dict--input .oa-dict__field, .oa-dict--compact .oa-dict__field { padding-right: 44px; }
.oa-dict__btn {
  position: absolute; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink-muted);
  border-radius: var(--radius-full); font: 600 13px/1 var(--font-sans);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.oa-dict__btn:hover { color: var(--ink); background: var(--surface-sunken); }
.oa-dict--textarea:not(.oa-dict--compact) .oa-dict__btn { right: 18px; bottom: 8px; height: 28px; padding: 0 12px 0 10px; }
.oa-dict__btn--icon { right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
.oa-dict--compact.oa-dict--textarea .oa-dict__btn--icon { top: 20px; }
.oa-dict__icon { width: 16px; height: 16px; flex-shrink: 0; }
.is-listening .oa-dict__btn { color: var(--bad-ink); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--bad-soft); }
.is-listening .oa-dict__btn--icon .oa-dict__dot { display: none; }
.is-listening .oa-dict__field { border-color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink) 18%, transparent); }
.oa-dict__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); flex-shrink: 0; }
.is-listening .oa-dict__dot { animation: oa-pulse 1.2s ease-in-out infinite; }
@keyframes oa-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.oa-dict__status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; line-height: 18px; color: var(--ink-muted); min-width: 0; }
.oa-dict__status.is-error { color: var(--warn-ink); }
.oa-dict__live { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--bad-ink); }
.oa-dict__interim { color: var(--ink); font-style: italic; overflow-wrap: anywhere; }
.oa-dict__note { flex-basis: 100%; }

/* ------------------------------------------------------ overview layout */

.oa-overview { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1023px) { .oa-overview { grid-template-columns: minmax(0, 1fr); } }

.oa-card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; min-width: 0; }
.oa-card__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.oa-card__heading { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.oa-card__title { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 17px; line-height: 22px; font-weight: 600; text-wrap: balance; }
.oa-card__tools { display: flex; gap: 4px; flex-wrap: wrap; margin-right: -8px; }
.oa-card__head > .oa-muted { font-size: 13px; line-height: 18px; }
@media (max-width: 639px) { .oa-card__head { padding: 12px 16px; } }

/* ----------------------------------------------------------- AI summary */

.oa-summary__body { padding: 16px 20px 4px; transition: opacity .2s ease; }
.oa-summary__body.is-busy { opacity: .45; }
.oa-summary__text { margin: 0; font-size: 16px; line-height: 26px; max-width: 72ch; text-wrap: pretty; }
.oa-sentence { border-radius: 4px; transition: background-color .15s ease; }
.oa-sentence.is-focus { background: var(--ai-soft); }
.oa-cite {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 3px; padding: 0 4px;
  vertical-align: 2px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--surface-sunken);
  color: var(--ink-muted); font: 600 11px/1 var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer;
}
.oa-cite:hover { color: var(--ai-ink); border-color: var(--ai-ink); }
.oa-summary__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 20px 16px; font-size: 13px; line-height: 18px; }
.oa-disclosure { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent-ink); cursor: pointer; }
.oa-disclosure__icon { width: 16px; height: 16px; transition: transform .15s ease; }
.oa-disclosure__icon.is-open { transform: rotate(180deg); }
.oa-sources { list-style: none; margin: 0; padding: 4px 20px 16px; display: grid; gap: 2px; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 18px; }
.oa-sources li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-sm); }
.oa-sources li.is-focus { background: var(--ai-soft); }
.oa-sources__n { font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.oa-sources__what { min-width: 0; }
@media (max-width: 639px) { .oa-summary__body { padding: 14px 16px 2px; } .oa-summary__foot, .oa-sources { padding-left: 16px; padding-right: 16px; } }

/* -------------------------------------------------------------- Today */

.oa-today { display: grid; }
.oa-today > * + * { border-top: 1px solid var(--line-soft); }
.oa-today > .oa-card__head + * { border-top: 0; }
.oa-today__nurse { margin: 0; padding: 12px 20px 0; font-size: 13px; line-height: 18px; }
.oa-today__nurse + .oa-vitals { border-top: 0; }
.oa-vitals { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 20px; }
.oa-vitals__news {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: var(--radius-md);
  background: var(--surface-sunken); font-size: 13px; line-height: 18px; color: var(--ink-muted);
}
.oa-vitals__news b { font-size: 20px; line-height: 24px; color: var(--ink); font-variant-numeric: tabular-nums; }
.oa-vitals__nc { font-weight: 600; color: var(--ink); }
.oa-vitals__news.is-ok { background: var(--ok-soft); }
.oa-vitals__news.is-low { background: var(--accent-soft); }
.oa-vitals__news.is-warn { background: var(--warn-soft); }
.oa-vitals__news.is-warn b { color: var(--warn-ink); }
.oa-vitals__news.is-bad { background: var(--bad-soft); }
.oa-vitals__news.is-bad b { color: var(--bad-ink); }
.oa-vitals__list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; }
.oa-vitals__item { display: inline-flex; gap: 5px; align-items: baseline; font-size: 13px; line-height: 18px; }
.oa-vitals__item dt { color: var(--ink-muted); }
.oa-vitals__item dd { margin: 0; font-variant-numeric: tabular-nums; }
.oa-vitals__item b { font-size: 15px; font-weight: 600; }
.oa-vitals__src { flex-basis: 100%; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.oa-care { margin: 0; padding: 12px 20px; display: grid; gap: 4px; font-size: 13px; line-height: 18px; }
.oa-care div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
.oa-care dt { color: var(--ink-muted); }
.oa-care dd { margin: 0; }
.oa-today__section { padding: 14px 20px 16px; display: grid; gap: 8px; }
.oa-subhead { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .02em; color: var(--ink-muted); display: flex; gap: 8px; align-items: baseline; }
.oa-today__empty { margin: 0; font-size: 14px; line-height: 20px; }
.oa-timeline, .oa-people { list-style: none; margin: 0; padding: 0; display: grid; }
.oa-timeline__row, .oa-people__row { display: grid; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; line-height: 20px; }
.oa-timeline__row:first-child, .oa-people__row:first-child { border-top: 0; padding-top: 2px; }
.oa-timeline__row { grid-template-columns: 44px 86px minmax(0, 1fr) auto; }
.oa-timeline__row.is-critical .oa-timeline__label { font-weight: 600; }
.oa-timeline__time, .oa-people__time { font-variant-numeric: tabular-nums; color: var(--ink-muted); font-size: 13px; }
.oa-timeline__row .oa-state { justify-self: start; }
.oa-timeline__what { display: grid; min-width: 0; }
.oa-timeline__what .oa-muted { font-size: 13px; line-height: 18px; }
.oa-people__row { grid-template-columns: minmax(0, 1fr) 44px auto; row-gap: 0; }
.oa-people__who, .oa-people__what { min-width: 0; overflow-wrap: anywhere; }
.oa-people__who { grid-column: 1; grid-row: 1; }
.oa-people__what { grid-column: 1; grid-row: 2; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.oa-people__time { grid-column: 2; grid-row: 1; }
.oa-people__row > .oa-linkbtn, .oa-people__row > span:last-child { grid-column: 3; grid-row: 1; }
@media (max-width: 639px) {
  .oa-today__nurse, .oa-vitals, .oa-care, .oa-today__section { padding-left: 16px; padding-right: 16px; }
  .oa-timeline__row { grid-template-columns: 44px auto minmax(0, 1fr); }
  .oa-timeline__what { grid-column: 1 / -1; }
  .oa-timeline__row > .oa-linkbtn { grid-column: 3; grid-row: 1; justify-self: end; }
}

/* ------------------------------------------------------------ Ask ORAMA */

.oa-ask { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.oa-ask__form { display: flex; align-items: flex-start; gap: 10px 12px; }
.oa-ask__label { display: inline-flex; align-items: center; gap: 6px; height: 40px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.oa-ask__field { flex: 1 1 auto; min-width: 0; }
.oa-ask__input { resize: none; min-height: 40px; max-height: 132px; padding-top: 9px; padding-bottom: 9px; line-height: 20px; field-sizing: content; }
.oa-ask__form > button { flex-shrink: 0; }
.oa-ask__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; font-size: 13px; line-height: 18px; padding-left: calc(102px + 12px); }
.oa-ask__draft { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.oa-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.oa-chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-full);
  background: var(--surface-raised); color: var(--ink); font: 500 13px/1 var(--font-sans); cursor: pointer; white-space: nowrap;
}
.oa-chip:hover { background: var(--surface-sunken); }
.oa-chip.is-on { background: var(--accent-soft); border-color: var(--accent-ink); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 767px) {
  .oa-ask__form { flex-wrap: wrap; }
  .oa-ask__label { height: auto; flex-basis: 100%; }
  .oa-ask__field { flex-basis: 100%; }
  .oa-ask__input { min-height: 64px; }
  .oa-ask__form > button { margin-left: auto; }
  .oa-ask__meta { padding-left: 0; }
}

/* Review panel */
.oa-review { display: grid; gap: 20px; }
.oa-review__request { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.oa-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.oa-inline--between { justify-content: space-between; font-size: 13px; line-height: 18px; }
.oa-unknown { margin: 0; font-size: 13px; line-height: 18px; color: var(--warn-ink); }
.oa-unknown__item { display: inline-block; margin: 0 2px; padding: 0 6px; border-radius: 4px; background: var(--warn-soft); font-weight: 600; }
.oa-group { display: grid; gap: 10px; }
.oa-prop { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); }
.oa-prop.is-attention { border-color: color-mix(in srgb, var(--warn) 70%, var(--line)); }
.oa-prop.is-off { background: var(--surface); }
.oa-prop.is-off .oa-prop__title, .oa-prop.is-off .oa-prop__detail { color: var(--ink-muted); }
.oa-prop__head { display: flex; align-items: flex-start; gap: 10px; }
.oa-check { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent-ink); flex-shrink: 0; cursor: pointer; }
.oa-prop__title { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 20px; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.oa-iconbtn { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -4px -6px 0 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-muted); cursor: pointer; flex-shrink: 0; }
.oa-iconbtn:hover { background: var(--surface-sunken); color: var(--ink); }
.oa-iconbtn svg { width: 16px; height: 16px; }
.oa-prop__detail, .oa-prop__to { margin: 0 0 0 28px; font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.oa-prop__to { color: var(--ink-muted); }
.oa-checks { list-style: none; margin: 2px 0 0 28px; padding: 0; display: grid; gap: 4px; font-size: 13px; line-height: 18px; }
.oa-checks__item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 6px; }
.oa-checks__item > span { flex: 1 1 200px; min-width: 0; }
.oa-checks__icon { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; }
.oa-checks__item.is-ok .oa-checks__icon { color: var(--ok-ink); }
.oa-checks__item.is-info .oa-checks__icon { color: var(--accent-ink); }
.oa-checks__item.is-warn { color: var(--warn-ink); }
.oa-checks__item.is-block { color: var(--bad-ink); font-weight: 600; }
.oa-confirm { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); cursor: pointer; }
.oa-edit { margin: 4px 0 0 28px; display: grid; gap: 8px; }
.oa-edit__row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.oa-edit__label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-muted); }
.oa-edit__control { min-width: 0; display: grid; gap: 4px; }
.oa-review__request > .oa-edit__label { color: var(--ink); }
.oa-narrow { max-width: 132px; }
.oa-edit select { width: auto; min-width: 0; }
.oa-suggest { justify-self: start; font-size: 13px; }
.oa-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-control); border-radius: var(--radius-sm); overflow: hidden; justify-self: start; }
.oa-seg__opt { height: 32px; padding: 0 12px; border: 0; border-left: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); font: 500 13px/1 var(--font-sans); cursor: pointer; }
.oa-seg__opt:first-child { border-left: 0; }
.oa-seg__opt:hover { background: var(--surface-sunken); }
.oa-seg__opt.is-on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.oa-prop__needs { margin: 2px 0 0 28px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--warn-ink); }
.oa-review__note { margin: 0; font-size: 12px; line-height: 17px; color: var(--ink-muted); }
.oa-foot__status { margin-right: auto; align-self: center; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.oa-foot__status.is-warn { color: var(--warn-ink); font-weight: 600; }
@media (max-width: 639px) {
  .oa-edit__row { grid-template-columns: minmax(0, 1fr); }
  .oa-prop__detail, .oa-prop__to, .oa-checks, .oa-edit, .oa-prop__needs { margin-left: 0; }
  .oa-foot__status { flex-basis: 100%; }
}

/* Sent */
.oa-sent { display: grid; gap: 10px; }
.oa-sent__lead { margin: 0; font-size: 15px; line-height: 22px; }
.oa-sent > .oa-muted { margin: 0; font-size: 13px; line-height: 18px; }
.oa-sent__list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: var(--radius-md); }
.oa-sent__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.oa-sent__row:first-child { border-top: 0; }
.oa-sent__what { display: grid; min-width: 0; font-size: 14px; line-height: 20px; }
.oa-sent__what .oa-muted { font-size: 13px; line-height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .is-listening .oa-dict__dot { animation: none; }
  .oa-summary__body, .oa-sentence, .oa-disclosure__icon, .oa-dict__btn { transition: none; }
}

/* Sign-in page (app/features/sign-in.js). Always light; the brand card is dark. */
.oa-signin {
  --si-teal: var(--accent-ink);
  --si-line: #dfe5ee;
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(400px, 46.5%) minmax(0, 1fr);
  background: #f5f7fa; color: var(--ink); font-family: var(--font-sans);
}

/* Brand card */
.oa-signin__brand {
  position: sticky; top: 18px; align-self: start; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  height: calc(100dvh - 36px); min-height: 560px; margin: 18px 0 18px 22px; padding: 40px 46px 36px; border-radius: 22px;
  background: linear-gradient(180deg, #0e1e30 0%, #0b1625 48%, #090f19 100%);
  box-shadow: 0 1px 2px #0e172914, 0 22px 44px -18px #0e172980; color: #e6edf5;
}
.oa-signin__logo { display: flex; align-items: center; gap: 18px; font-size: 20px; line-height: 1; font-weight: 600; letter-spacing: 0.5em; color: #e3eaf3; }
.oa-signin__logo img { width: 52px; height: 52px; }
.oa-signin__eye { position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: auto; pointer-events: none; }
.oa-signin__pitch { margin-top: auto; }
.oa-signin__rule { display: block; width: 48px; height: 3px; margin-bottom: 17px; border-radius: 3px; background: linear-gradient(90deg, #2ee6f6, #1aa3d6); }
.oa-signin__line { margin: 0; font-size: clamp(24px, 2.5vw, 38px); line-height: 1.47; font-weight: 450; letter-spacing: -0.02em; color: #eef2f7; }
.oa-signin__line--muted { color: #8796ab; }
.oa-signin__fine { margin: 25px 0 0; max-width: 360px; font-size: 11px; line-height: 17px; color: #7d8ca1; }
.oa-signin__fine--foot { display: none; }

/* Right side */
.oa-signin__main {
  display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh;
  padding: 40px clamp(28px, 4vw, 96px) 34px; outline: none;
}
.oa-signin__top { display: flex; justify-content: flex-end; }
.oa-signin__clock { display: inline-flex; align-items: center; gap: 10px; margin: 0; line-height: 18px; white-space: nowrap; }
.oa-signin__clock b { font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.oa-signin__clock i { width: 1px; height: 12px; background: var(--si-line); }
.oa-signin__clock span { font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }
.oa-signin__panel { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 402px; margin: 0 auto; padding: 44px 0 28px; }
.oa-signin__view { display: flex; flex-direction: column; }
.oa-signin__site { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--si-teal); }
.oa-signin__site svg { width: 15px; height: 15px; }
.oa-signin__title { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); outline: none; text-wrap: balance; }
.oa-signin__lead { margin: 8px 0 26px; font-size: 13px; line-height: 19px; color: var(--ink-muted); text-wrap: pretty; }

/* Sensor card */
.oa-signin__sensor {
  display: flex; align-items: center; gap: 18px; width: 100%; min-height: 105px; padding: 15px 18px 15px 16px; text-align: left; cursor: pointer;
  border: 1px solid #e3e8ef; border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%); color: var(--ink); font: inherit;
  box-shadow: 0 1px 2px #0e17290a, 0 14px 30px -16px #0e172940; transition: border-color 0.15s, box-shadow 0.15s;
}
.oa-signin__sensor:hover { border-color: #c9d6e2; box-shadow: 0 1px 2px #0e17290a, 0 18px 34px -16px #0e172952; }
.oa-signin__sensor:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.oa-signin__sensor:disabled { cursor: progress; }
.oa-signin__halo {
  position: relative; flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; color: #0d6f7c;
  border: 2.5px solid transparent;
  background: linear-gradient(#ffffff, #f4fdfe) padding-box, linear-gradient(140deg, #2ee6f6 0%, #1aa3d6 100%) border-box;
  box-shadow: 0 0 0 7px #2ee6f614, 0 8px 22px #2ec8e64d;
}
.oa-signin__halo svg { width: 30px; height: 30px; stroke-width: 1.75; }
.oa-signin__halo::after { content: ""; position: absolute; inset: -10px; border: 2px solid #2ee6f6; border-radius: 50%; opacity: 0; }
.is-reading .oa-signin__halo::after { animation: oa-signin-ping 0.9s ease-out infinite; }
@keyframes oa-signin-ping { from { transform: scale(0.88); opacity: 0.8; } to { transform: scale(1.3); opacity: 0; } }
.oa-signin__sensor-text { display: grid; gap: 4px; min-width: 0; }
.oa-signin__sensor-text b { font-size: 14px; line-height: 19px; font-weight: 600; }
.oa-signin__sensor-text span { font-size: 12px; line-height: 16px; color: var(--ink-muted); }

.oa-signin__or { display: flex; align-items: center; gap: 14px; margin: 24px 0; font-size: 11.5px; line-height: 14px; color: #8d99aa; }
.oa-signin__or::before, .oa-signin__or::after { content: ""; flex: 1; height: 1px; background: #e1e6ee; }

.oa-signin__alt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--si-line); border-radius: 12px; background: #ffffff; color: #1a2436; font: 600 13.5px/18px var(--font-sans);
  box-shadow: 0 1px 2px #0e17290a; transition: border-color 0.15s, background-color 0.15s;
}
.oa-signin__alt + .oa-signin__alt { margin-top: 10px; }
.oa-signin__alt:hover { border-color: #c9d3e0; background: #fbfcfe; }
.oa-signin__alt:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.oa-signin__alt > span { flex: 1; min-width: 0; }
.oa-signin__alt svg { width: 17px; height: 17px; flex: none; color: var(--si-teal); }
.oa-signin__alt svg:last-child { width: 15px; height: 15px; color: #a3aebd; }
.oa-signin__patient { margin: 28px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.oa-signin__patient .oa-linkbtn, .oa-signin__trouble .oa-linkbtn { text-decoration: none; }
.oa-signin__patient .oa-linkbtn:hover, .oa-signin__trouble .oa-linkbtn:hover { text-decoration: underline; }

.oa-signin__back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 0 0 16px -8px; padding: 0 8px;
  border: 0; border-radius: 8px; background: none; color: var(--ink-muted); font: 600 13px/18px var(--font-sans); cursor: pointer;
}
.oa-signin__back:hover { color: var(--ink); background: #e9eef4; }
.oa-signin__back:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.oa-signin__back svg { width: 15px; height: 15px; }

.oa-signin__form { display: grid; gap: 16px; }
.oa-signin__field { display: grid; gap: 6px; }
.oa-signin__field label { font-size: 13px; line-height: 18px; font-weight: 600; }
.oa-signin__field input { height: 44px; border-color: #cfd8e4; border-radius: 12px; font-size: 15px; }
.oa-signin__field.has-error input { border-color: var(--bad-ink); }
.oa-signin__error { margin: 0; font-size: 12.5px; line-height: 17px; font-weight: 600; color: var(--bad-ink); }
.oa-signin__hint { margin: 0; font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
.oa-signin__secret { position: relative; display: block; }
.oa-signin__secret input { padding-right: 48px; }
.oa-signin__reveal {
  position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: none; color: var(--ink-muted); cursor: pointer;
}
.oa-signin__reveal:hover { color: var(--ink); background: #eef2f7; }
.oa-signin__reveal:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.oa-signin__reveal svg { width: 17px; height: 17px; }
.oa-signin__submit { width: 100%; margin-top: 4px; border-radius: 12px; }
.oa-signin__demo-hint { margin: 16px 0 0; font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
.oa-signin__sso-note { display: flex; gap: 8px; margin: 16px 0 0; font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
.oa-signin__sso-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--ok-ink); }
.oa-signin__checking {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px; font-size: 14px; font-weight: 600;
  border: 1px solid #e3e8ef; border-radius: 16px; background: #ffffff; box-shadow: 0 14px 30px -16px #0e172940;
}
.oa-signin__spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #e3e8ef; border-top-color: #1aa3d6; animation: oa-signin-spin 0.8s linear infinite; }
@keyframes oa-signin-spin { to { transform: rotate(360deg); } }

.oa-signin__search { position: relative; display: block; }
.oa-signin__search > svg { position: absolute; top: 50%; left: 14px; width: 17px; height: 17px; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }
.oa-signin__search input { height: 44px; padding-left: 40px; border-color: #cfd8e4; border-radius: 12px; font-size: 15px; }
.oa-signin__people {
  max-height: min(52vh, 500px); margin-top: 12px; overflow: auto; overscroll-behavior: contain;
  border: 1px solid #e3e8ef; border-radius: 16px; background: #ffffff; box-shadow: 0 14px 30px -18px #0e172940;
}
.oa-signin__group h2 {
  position: sticky; top: 0; z-index: 1; margin: 0; padding: 10px 16px 6px; font-size: 11.5px; line-height: 16px; font-weight: 700;
  color: var(--ink-muted); background: #ffffff; border-bottom: 1px solid #eef1f5;
}
.oa-signin__group ul { list-style: none; margin: 0; padding: 4px 0; }
.oa-signin__person {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 16px; text-align: left; cursor: pointer;
  border: 0; background: none; color: var(--ink); font: inherit;
}
.oa-signin__person:hover { background: #f4f7fa; }
.oa-signin__person:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--si-teal); }
.oa-signin__person-text { display: grid; flex: 1; min-width: 0; }
.oa-signin__person-text b { font-size: 14px; line-height: 19px; font-weight: 600; }
.oa-signin__person-text span { font-size: 12.5px; line-height: 17px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-signin__count { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--si-teal); font-size: 11.5px; line-height: 16px; font-weight: 600; }
.oa-signin__none { margin: 0; padding: 20px 16px; font-size: 13px; color: var(--ink-muted); }
.oa-signin__avatar {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(180deg, #13243a, #0b1625); color: #e6edf5; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em;
}
.oa-signin__avatar--lg { width: 44px; height: 44px; font-size: 14px; }
.oa-signin__me { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.oa-signin__me > span:last-child { display: grid; font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
.oa-signin__me b { font-size: 15px; line-height: 21px; font-weight: 600; color: var(--ink); }
.oa-signin__roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.oa-signin__alt--role { min-height: 60px; }
.oa-signin__alt--role > span { display: grid; gap: 2px; }
.oa-signin__alt--role > span > span { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-muted); }

/* Footer */
.oa-signin__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; font-size: 11.5px; line-height: 16px; color: var(--ink-muted); }
.oa-signin__trouble { display: grid; gap: 4px; }
.oa-signin__trouble > span:first-child { white-space: nowrap; }
.oa-signin__trouble .oa-linkbtn { font-weight: 400; color: inherit; }
.oa-signin__desk { color: var(--ink); }
.oa-signin__demo {
  display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--si-line); background: #ffffff; color: var(--ink-muted); font-size: 11.5px; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px #0e17290a;
}
.oa-signin__demo svg { width: 15px; height: 15px; color: var(--si-teal); }

/* Demo bar: Sign out (icon only, the bar has no room for a label) */
.oa-signout { width: 32px; flex: none; justify-content: center; padding: 0; }

@media (max-width: 1023px) {
  .oa-signin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .oa-signin__brand { position: relative; top: 0; height: auto; min-height: 0; margin: 12px 12px 0; padding: 26px 30px 30px; border-radius: 20px; }
  .oa-signin__logo { font-size: 17px; }
  .oa-signin__logo img { width: 44px; height: 44px; }
  .oa-signin__eye { width: 70%; left: auto; right: 0; }
  .oa-signin__pitch { margin-top: 48px; }
  .oa-signin__rule { margin-bottom: 18px; }
  .oa-signin__line { font-size: 26px; line-height: 1.4; }
  .oa-signin__brand .oa-signin__fine { display: none; }
  .oa-signin__fine--foot { display: block; flex-basis: 100%; margin: 4px 0 0; max-width: none; color: var(--ink-muted); }
  .oa-signin__main { min-height: 0; padding: 20px 32px 24px; }
  .oa-signin__panel { margin: 0 auto; padding: 12px 0 36px; }
}
@media (max-width: 639px) {
  .oa-signin__brand { margin: 8px 8px 0; padding: 18px 20px 22px; border-radius: 18px; }
  .oa-signin__logo { gap: 12px; font-size: 15px; }
  .oa-signin__logo img { width: 36px; height: 36px; }
  .oa-signin__eye { width: 85%; }
  .oa-signin__pitch { margin-top: 30px; }
  .oa-signin__rule { width: 40px; margin-bottom: 14px; }
  .oa-signin__line { font-size: 21px; }
  .oa-signin__main { padding: 16px 16px 20px; }
  .oa-signin__title { font-size: 26px; }
  .oa-signin__lead { margin-bottom: 22px; }
  .oa-signin__sensor { gap: 14px; padding: 14px; }
  .oa-signin__halo { width: 62px; height: 62px; }
  .oa-signin__halo svg { width: 26px; height: 26px; }
  .oa-signin__people { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .is-reading .oa-signin__halo::after, .oa-signin__spinner { animation: none; }
  .oa-signin__sensor, .oa-signin__alt { transition: none; }
}

/* ------------------------------------------------------------ Run: the whole patient cycle (class prefix rc-) */

@media (max-width: 1560px) { .oa-protolabel { display: none; } }
.rc-chip.is-on { border-color: var(--accent-ink); background: var(--accent-soft); color: var(--accent-ink); }
.rc-chip svg { color: var(--accent-ink); }

.rc-shield { position: fixed; inset: 0; z-index: 9990; background: transparent; cursor: progress; }
.rc-ring {
  position: fixed; z-index: 9995; pointer-events: none; border-radius: 10px;
  border: 3px solid var(--accent-ink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-ink) 22%, transparent), 0 6px 18px color-mix(in srgb, var(--accent-ink) 25%, transparent);
  transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease;
  animation: rc-pulse 1.4s ease-in-out infinite;
}
@keyframes rc-pulse { 0%, 100% { border-color: var(--accent-ink); } 50% { border-color: color-mix(in srgb, var(--accent-ink) 55%, transparent); } }

.rc-panel {
  position: fixed; z-index: 9999; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(520px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 14px 16px 12px;
  background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); font-family: var(--font-sans);
}
.rc-panel.is-top { bottom: auto; top: calc(64px + env(safe-area-inset-top, 0px)); }
.rc-panel__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rc-kicker { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .02em; color: var(--accent-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-when { margin-left: auto; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.rc-x { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-muted); cursor: pointer; flex-shrink: 0; }
.rc-x:hover { background: var(--surface-sunken); color: var(--ink); }
.rc-panel__body { display: grid; gap: 4px; min-width: 0; }
.rc-who { font-size: 15px; line-height: 20px; font-weight: 600; }
.rc-say { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink); text-wrap: pretty; }
.rc-note { margin: 4px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; line-height: 18px; }
.rc-meta { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.rc-bar { height: 4px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.rc-bar > span { display: block; height: 100%; background: var(--accent-ink); transition: width .4s ease; }
.rc-panel__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-step { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.rc-grow { flex: 1 1 auto; }
.rc-speed { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--radius-full); background: var(--surface-sunken); }
.rc-speed > button { height: 28px; min-width: 36px; padding: 0 10px; border: 0; border-radius: var(--radius-full); background: transparent; font: 600 13px/1 var(--font-sans); color: var(--ink-muted); cursor: pointer; }
.rc-speed > button[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.rc-speed > button:focus-visible, .rc-x:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.rc-scrim { position: fixed; inset: 0; z-index: 9998; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--ink) 38%, transparent); }
.rc-intro {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; gap: 12px; padding: 22px 22px 18px;
  background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); font-family: var(--font-sans);
}
.rc-intro__title { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; text-wrap: balance; }
.rc-intro__text { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink); }
.rc-intro__meta { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.rc-chapters { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.rc-chapters li { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; min-width: 0; }
.rc-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.rc-intro__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
@media (max-width: 639px) {
  .rc-chapters { grid-template-columns: minmax(0, 1fr); }
  .rc-panel { padding: 12px; }
  .rc-say { font-size: 14px; line-height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-ring { transition: none; animation: none; }
  .rc-bar > span { transition: none; }
}
