/* Doctorpedia apps (views/apps.js, 18 November 2026): the other apps of the family, kept out of the bar (the owner found a button
   there too visible): a quiet group of the account card under the portrait on a wide screen, and of the sheet of Me on a phone,
   before Log out. The bar button's rules stay below for the day it is wanted back; nothing draws that button now. Only the focus
   ring takes the lilac; everything else is ink, greys and hairlines, as in the rest of BiteSized. */

.dpa, .dpa-sheet, .dpa-am { display: none; }

@media (min-width: 1200px) {
  html body #appTopbar .dpa { position: relative; display: inline-flex; flex: none; }
  html body #appTopbar .dpa-btn { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid var(--cl-line-2); border-radius: 50%; background: var(--cl-surface); box-shadow: none; color: var(--cl-ink-2); cursor: pointer; transition: border-color .22s var(--cl-out), color .22s var(--cl-out), background-color .22s var(--cl-out), scale .12s var(--cl-out); }
  html body #appTopbar .dpa-btn > i { font-size: 19px !important; }
  html body #appTopbar .dpa-btn:hover { border-color: var(--cl-line-3); color: var(--cl-ink); }
  html body #appTopbar .dpa-btn:active { scale: .96; }
  html body #appTopbar .dpa-btn[aria-expanded="true"] { border-color: var(--cl-line-3); background: var(--cl-surface-2); color: var(--cl-ink); }
  html body #appTopbar .dpa-btn:focus-visible { outline: 2px solid var(--cl-lilac); outline-offset: 2px; }

  /* the card: under the button, its right edge on the button's right edge, opening from that corner as the account card does */
  html body #appTopbar .dpa-card { position: absolute; z-index: 5; top: calc(100% + 10px); right: 0; width: 352px; padding: 6px; border: 1px solid var(--cl-line-2); border-radius: 20px; background: var(--cl-surface); color: var(--cl-ink); box-shadow: var(--cl-shadow-pop); text-align: left;
    opacity: 0; transform: translateY(-8px) scale(.96); transform-origin: calc(100% - 22px) 0; transition: opacity .14s var(--cl-out), transform .18s var(--cl-out); }
  html body #appTopbar .dpa.is-open .dpa-card { opacity: 1; transform: none; transition: opacity .2s var(--cl-out), transform .42s var(--cl-spring); }
  html body #appTopbar .dpa-card[hidden] { display: none; }
  .dpa-head { margin: 0 4px 6px; padding: 10px 8px 12px; border-bottom: 1px solid var(--cl-line); }
  .dpa-cap { margin: 0; font-size: 14.5px; line-height: 1.3; color: var(--cl-ink); }
  .dpa-here { margin: 2px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--cl-ink-3); }
}

/* a row: the app's mark, its name and what it is for, and an arrow that leans forward when the row is pointed at */
.dpa-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--cl-ink); text-decoration: none; transition: background-color .14s var(--cl-out); }
.dpa-row:hover { background: var(--cl-hover); }
.dpa-row:focus-visible { outline: 2px solid var(--cl-lilac); outline-offset: -2px; background: var(--cl-hover); }
.dpa-txt { display: grid; gap: 2px; min-width: 0; }
.dpa-txt b { font-weight: 400; font-size: 14.5px; line-height: 1.3; }
.dpa-txt small { font-size: 12.5px; line-height: 1.35; color: var(--cl-ink-3); }
.dpa-go { font-size: 16px; color: var(--cl-ink-4); transition: color .14s var(--cl-out), translate .3s var(--cl-spring); }
.dpa-row:hover .dpa-go, .dpa-row:focus-visible .dpa-go { color: var(--cl-ink); translate: 2px 0; }

/* the marks, each on the same ink tile (the favicon's tile), so the three read as one family */
.dpa-tile { display: grid; flex: none; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--cl-ink); color: var(--cl-surface); }
.dpa-tile svg { width: 22px; height: 22px; }   /* Ask's; Dose's and BiteSized's at the family's optical size beside it */
.dpa-tile.is-dose svg { width: 20.5px; height: 20.5px; }
.dpa-tile.is-bitesized svg { width: 18.5px; height: 18.5px; }

/* on every wide screen: a group of the account card (clean.js acctDrop, clean.css .am), with the card's own caption and line
   (18 November 2026: no button in the bar, the owner found it too visible) */
@media (min-width: 1024px) {
  .am .dpa-am { display: block; }
  .am .dpa-am .nm-cap { margin-top: 2px; }
  .am .dpa-am .dpa-row { padding: 7px 10px 7px 7px; }
  .am .dpa-am .dpa-tile { width: 32px; height: 32px; border-radius: 9px; }
}

/* the group of the account sheet that stands in for the button on a phone, with the sheet's own caption */
@media (max-width: 1023.98px) {
  #userMenu .dpa-sheet { display: grid; gap: 2px; padding: 6px 10px 10px; }
  #userMenu .dpa-sheet-h { margin: 0; padding: 0 2px 6px; }
  #userMenu .dpa-sheet .dpa-row { min-height: 56px; padding: 8px 6px; }
  #userMenu .dpa-sheet .dpa-txt b { font-size: 15.5px; }
  #userMenu .dpa-sheet .dpa-txt small { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html body #appTopbar .dpa-card, .dpa-go { transition: opacity .12s linear !important; transform: none !important; translate: none !important; }
}
html.a11y-reduce-motion body #appTopbar .dpa-card, html.a11y-reduce-motion .dpa-go { transition: opacity .12s linear !important; transform: none !important; translate: none !important; }

/* Inside the account's menus the rows look like the menu's own rows (the owner, 18 November 2026: the black tiles and the two
   lines "chocan mucho"): the app's mark small and grey where the other rows have their icon, the name alone in the same size
   and ink, no line under it, and an arrow that shows only under the pointer or the keyboard. Every mark is drawn in the same
   grey, so nothing in the menu takes a colour of its own. */
.am .dpa-am .dpa-row, #userMenu .dpa-sheet .dpa-row { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 16px; min-height: 46px; padding: 0 10px 0 11px; color: var(--cl-ink); }
.am .dpa-am .dpa-tile, #userMenu .dpa-sheet .dpa-tile { width: 20px; height: 20px; border-radius: 0; background: none; color: var(--cl-ink-3); transition: color .14s var(--cl-out); }
.am .dpa-am .dpa-tile svg, #userMenu .dpa-sheet .dpa-tile svg { width: 17px; height: 17px; }
/* the three marks at the family's optical size (assets/brand/mark.js): Ask's wide one the widest, BiteSized's square one the least */
.am .dpa-am .dpa-tile.is-ask svg, #userMenu .dpa-sheet .dpa-tile.is-ask svg { width: 19px; height: 19px; }
.am .dpa-am .dpa-tile.is-dose svg, #userMenu .dpa-sheet .dpa-tile.is-dose svg { width: 17.5px; height: 17.5px; }
.am .dpa-am .dpa-tile.is-bitesized svg, #userMenu .dpa-sheet .dpa-tile.is-bitesized svg { width: 16px; height: 16px; }
.am .dpa-am .dpa-txt small, #userMenu .dpa-sheet .dpa-txt small { display: none; }
.am .dpa-am .dpa-txt b { font-size: 16px; }
#userMenu .dpa-sheet .dpa-txt b { font-size: 15.5px; }
.am .dpa-am .dpa-go, #userMenu .dpa-sheet .dpa-go { font-size: 14px; opacity: 0; transition: opacity .14s var(--cl-out), translate .3s var(--cl-spring); }
.am .dpa-am .dpa-row:hover, #userMenu .dpa-sheet .dpa-row:hover { color: var(--cl-ink); }
.am .dpa-am .dpa-row:hover .dpa-tile, #userMenu .dpa-sheet .dpa-row:hover .dpa-tile { color: var(--cl-ink); }
.am .dpa-am .dpa-row:is(:hover, :focus-visible) .dpa-go, #userMenu .dpa-sheet .dpa-row:is(:hover, :focus-visible) .dpa-go { opacity: 1; color: var(--cl-ink-3); }
