/* ==========================================================================
   RufaidiQB brand (brand kit of 2026-11-24). Loaded last on every page.
   The symbol: an R that is also a question mark, with a medical plus as its dot.
   The wordmark: "Rufaidi" in navy and "QB" in cyan (Plus Jakarta Sans 700 in the kit;
   brand-wordmark.png is the kit's lettering used as a mask, so it takes any colour).
   Navy #071D35, cyan #00B8C4. On a dark page or on the coloured menu band the
   navy parts turn white, as in the kit's dark-mode logo.
   ========================================================================== */
:root, :root[data-theme="light"] { --brand-navy: #071D35; --brand-cyan: #00B8C4; --rq-ink: var(--brand-navy); --rq-plus: var(--brand-cyan); }
:root[data-theme="dark"] { --rq-ink: #FFFFFF; }

.rq-symbol { display: block; width: 100%; height: 100%; overflow: visible; }
.rq-symbol .rq-r { fill: var(--rq-ink); stroke: none !important; }
.rq-symbol .rq-plus { fill: var(--rq-plus); stroke: none !important; }

/* the wordmark: the lettering is the mask, the colours are the background (split between "Rufaidi" and "QB") */
.rq-word {
  position: relative; display: block; flex: none; height: var(--rq-word-h, 22px); aspect-ratio: 515 / 96; overflow: hidden;
  background: linear-gradient(90deg, var(--rq-ink) 0 67.4%, var(--rq-plus) 67.4% 100%) !important;
  -webkit-mask: url("brand-wordmark.png") center / contain no-repeat; mask: url("brand-wordmark.png") center / contain no-repeat;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rq-name { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (forced-colors: active) { .rq-word { forced-color-adjust: none; background: CanvasText !important; } .rq-symbol .rq-r, .rq-symbol .rq-plus { fill: CanvasText; } }

/* ---- public pages (welcome, sign-in, plans, error pages): symbol + wordmark, the line of text under it ----
   The wordmark is 118 px wide (22 px high) when there is room; on narrow phones it shrinks with the space left by the
   buttons on the right (the brand link and its text column may shrink, the lettering keeps its proportions). */
.top .brand { gap: 11px; flex: 0 1 auto; min-width: 0; }
.top .brand .rq-mark { flex: none; width: 34px; height: 34px; }
.top .brand > span:not(.rq-mark) { min-width: 0; }
.top .brand .rq-word { width: calc(22px * 515 / 96); max-width: 100%; height: auto; }
.top .brand small { margin-top: 4px; }
@media (max-width: 420px) { .top .brand { gap: 8px; } .top .brand .rq-mark { width: 30px; height: 30px; } }
/* below about 70 px the lettering is too small to read: show the symbol alone (the link keeps its aria-label).
   That happens under 305 px, or under 354 px when the wider "Open the app" button is there (welcome page, signed in). */
@media (max-width: 304px) { .top .brand .rq-word { display: none; } }
@media (max-width: 353px) { .top .wrap:has(a.btn[href="/"]) .brand .rq-word { display: none; } }

/* the sign-in picture panel: the light app icon (white tile, navy R, cyan plus) on the brand gradient */
.auth-art-mark.rq-tile { --rq-ink: var(--brand-navy); width: 52px; height: 52px; padding: 9px; box-sizing: border-box; border-radius: 15px;
  background: #FFFFFF !important; border: 0 !important; box-shadow: 0 10px 24px -12px rgba(7, 29, 53, .55); }

/* ---- the app: the brand at the start of the menu ---- */
.sidebar .brand .brand-symbol { flex: none; width: 32px; height: 32px; }
.sidebar .brand .rq-word { --rq-word-h: 21px; }
.sidebar .brand .brand-title-row strong.rq-word { font-size: 0 !important; letter-spacing: 0 !important; }
html.sidebar-collapsed .sidebar .brand .brand-symbol { width: 30px; height: 30px; }
@media (min-width: 901px) {
  /* wide screens: the menu is the coloured band, where the logo is white and cyan */
  .sidebar .brand { --rq-ink: #FFFFFF; gap: 11px !important; }
  .sidebar .brand .brand-symbol { width: 30px; height: 30px; }
  .sidebar .brand .rq-word { --rq-word-h: 24px; }
}
