/* QFI Shell: the shared look of every qfi-hub.com website.
   Colours (light and dark), base text, the header, the notification bell and the profile menu.
   Each site loads this file from https://qfi-hub.com/shell/shell.css, so a change here reaches every site.
   Sites bring their own fonts (fonts.css) and pictures (/img/), and add their own page styles after this file. */

:root {
  --bg: #DDE2E6; --surface: #F5F6F7; --surface-hi: #FCFCFD;
  --ink: #111111; --muted: #5E6770; --line: #C9D0D5;
  --tab-accent: #1B3340; --brand: #111111; --hero-bg: #111111;
  --divider: rgba(20, 32, 44, .16); --card-border: rgba(20, 32, 44, .08);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(20, 32, 44, .06), 0 12px 28px -12px rgba(20, 32, 44, .28);
  --card-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 4px rgba(20, 32, 44, .08), 0 20px 40px -14px rgba(20, 32, 44, .34);
  --signal: #FF5E2A;
  --radius-s: 9px; --radius-m: 14px;
  --display: "Michroma", "Barlow", "IBM Plex Sans", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111111; --surface: #1B1B1B; --surface-hi: #232323;
  --ink: #F2F2F2; --muted: #A3A8AD; --line: #2F3336;
  --tab-accent: #9DB8CA; --brand: #1B3340; --hero-bg: #1B3340;
  --divider: rgba(255, 255, 255, .10); --card-border: rgba(255, 255, 255, .06);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .45), 0 14px 32px -12px rgba(0, 0, 0, .75);
  --card-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 4px rgba(0, 0, 0, .5), 0 22px 44px -14px rgba(0, 0, 0, .85);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111; --surface: #1B1B1B; --surface-hi: #232323;
    --ink: #F2F2F2; --muted: #A3A8AD; --line: #2F3336;
    --tab-accent: #9DB8CA; --brand: #1B3340; --hero-bg: #1B3340;
    --divider: rgba(255, 255, 255, .10); --card-border: rgba(255, 255, 255, .06);
    --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .45), 0 14px 32px -12px rgba(0, 0, 0, .75);
    --card-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 4px rgba(0, 0, 0, .5), 0 22px 44px -14px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 "Barlow", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.qs-top {
  position: relative; isolation: isolate; z-index: 50;
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px 18px;
  min-height: 128px; padding: 52px 36px 18px;
  background: var(--brand); color: #FFFFFF; border-bottom: 2px solid var(--signal);
}
.qs-top::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: min(46%, 760px); z-index: -1; pointer-events: none;
  background: url("/img/drone-header.jpg") right 38% / cover no-repeat; opacity: .6;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 35%, #000 75%), linear-gradient(180deg, #000 55%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 35%, #000 75%), linear-gradient(180deg, #000 55%, transparent);
}
/* Top left, above the logo: QFI Hub, and "View as" for General Admins */
.qs-pills { position: absolute; top: 12px; left: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; z-index: 2; }
.qs-pills:empty, .qs-pills:has(> #qs-va-pill:empty):has(> #qs-notices:empty):not(:has(> :not(#qs-va-pill):not(#qs-notices))) { display: none; }   /* nothing to show */
/* a site's reminders, next to "View as": small pills with a coloured dot */
.qs-notices { display: contents; }
.qs-remind { text-decoration: none; }
.qs-remind-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #E0A100; box-shadow: 0 0 0 3px rgba(224, 161, 0, .25); }
.qs-remind.red .qs-remind-dot { background: #E2574C; box-shadow: 0 0 0 3px rgba(226, 87, 76, .28); }
.qs-remind.blue .qs-remind-dot { background: #6FA3E6; box-shadow: 0 0 0 3px rgba(111, 163, 230, .28); }
.qs-pills .qs-hub { position: static; }
.qs-va-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: #FFFFFF; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  transition: background-color .15s ease; }
.qs-va-pill:hover { background: rgba(255, 255, 255, .2); }
.qs-va-pill svg { width: 16px; height: 16px; flex: none; }
.qs-va-pill { max-width: 100%; white-space: nowrap; }
.qs-va-pill span { overflow: hidden; text-overflow: ellipsis; }
.qs-va-pill.on { background: var(--signal); color: var(--on-signal, #111111); box-shadow: none; }
.qs-va-pill.on:hover { background: color-mix(in srgb, var(--signal) 85%, #FFFFFF); }
/* Back to QFI Hub: top left, above the logo */
.qs-hub { position: absolute; top: 12px; left: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 8px;
  border-radius: 999px; color: #FFFFFF; font-size: 13px; font-weight: 600; text-decoration: none;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); transition: background-color .15s ease; }
.qs-hub:hover { background: rgba(255, 255, 255, .2); }
.qs-hub svg { width: 16px; height: 16px; }
.qs-mark { display: inline-flex; align-items: center; gap: 14px; color: #FFFFFF; white-space: nowrap; }
.qs-brand { display: inline-flex; align-items: center; color: #FFFFFF; text-decoration: none; border-radius: 6px; transition: opacity .15s ease; }
.qs-brand:hover { opacity: .85; }
.qs-mark .qs-app { color: #FFFFFF; text-decoration: none; border-radius: 4px; transition: opacity .15s ease; }
.qs-mark .qs-app:hover { opacity: .85; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.qs-brand:focus-visible, .qs-mark .qs-app:focus-visible { outline: 2px solid var(--signal, #FF5E2A); outline-offset: 4px; }
.qs-word { display: block; height: 44px; width: auto; }
.qs-y { display: none; height: 32px; width: auto; }
.qs-app { font-family: var(--display); font-size: 19px; letter-spacing: .03em; line-height: 44px;
  padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .35); }
.qs-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }   /* as in QFI People */
.qs-icon {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: none; color: #FFFFFF; cursor: pointer;
  transition: background-color .15s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.qs-icon:hover, .qs-icon[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
.qs-icon:active { transform: scale(.88); }
.qs-icon svg { width: 21px; height: 21px; }
.qs-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--signal); color: var(--on-signal, #111111); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.qs-count[hidden] { display: none; }

/* ---------- Dropdowns (profile menu and notifications) ---------- */
.qs-me, .qs-bell { position: relative; }
.qs-trigger {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: #FFFFFF; font: inherit; font-weight: 600; cursor: pointer;
  transition: background-color .15s ease;
}
.qs-trigger:hover, .qs-trigger[aria-expanded="true"] { background: rgba(255, 255, 255, .16); }
.qs-trigger svg { width: 16px; height: 16px; transition: transform .18s ease; }
.qs-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.qs-av { position: relative; display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  overflow: hidden; color: #FFFFFF; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.qs-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qs-av.l { width: 44px; height: 44px; font-size: 15px; }
/* The header picture with your frame (drawn by the profile module) */
.qs-trigger .qp-av.hd { width: 34px; height: 34px; font-size: 13px; }
/* On your own profile: an orange ring around your picture (as in QFI People) */
.qs-trigger.is-current .qs-av, .qs-trigger.is-current .qp-av { box-shadow: 0 0 0 2px var(--signal); }

.qs-drop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 150px); overflow-y: auto; padding: 8px;
  background: var(--surface-hi); color: var(--ink); border: 1px solid var(--card-border); border-radius: var(--radius-m);
  box-shadow: var(--card-shadow-hover); text-align: left;
}
.qs-drop[hidden] { display: none; }
/* Fades and slides in, like QFI People's menu */
.qs-drop { animation: qs-drop .16s ease-out; }
@keyframes qs-drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
/* Preview card at the top of the profile menu (same as QFI People's hover peek) */
.qs-pv { padding: 2px 2px 10px; border-bottom: 1px solid var(--line); }
.qs-pv .qs-who { border-bottom: 0; padding-bottom: 4px; }
.pv-card { position: relative; display: block; overflow: hidden; border-radius: var(--radius-m); background: var(--surface); color: inherit; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s ease; }
.pv-card:hover { box-shadow: inset 0 0 0 1px var(--tab-accent); }
.pv-cover { display: block; height: 84px; }
.pv-body { display: grid; gap: 2px; padding: 14px 16px 16px; }
.pv-card.has-cover .pv-body { margin-top: -42px; }
.pv-body .qp-av.m { width: 76px; height: 76px; font-size: 26px; margin-bottom: 8px; box-shadow: 0 0 0 4px var(--surface); }
.pv-name { font-size: 18px; font-weight: 600; }
.pv-role { color: var(--muted); font-size: 14px; }
.pv-title { color: var(--tab-accent); font-size: 13px; font-weight: 600; }
.hc-meta { display: grid; gap: 2px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.hc-meta .qp-flag { vertical-align: -2px; margin-right: 4px; }
/* An invisible bridge, so the menu stays open while the pointer moves from the button down into it. */
.qs-me .qs-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }

.qs-who { display: flex; gap: 12px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); }
.qs-who strong { display: block; line-height: 1.25; }
.qs-who div > span { display: block; color: var(--muted); font-size: 14px; }
.qs-sec { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.qs-sec:last-child { border-bottom: 0; }
.qs-label { display: block; margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.qs-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.qs-link:hover { background: var(--bg); }
.qs-link .qs-here { color: var(--muted); font-size: 13px; font-weight: 500; }
.qs-links { display: grid; gap: 2px; margin: -2px; }

.qs-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); }
.qs-seg button { flex: 1; padding: 6px 8px; border: 0; border-radius: 999px; background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.qs-seg button:hover { color: var(--ink); }
.qs-seg button[aria-pressed="true"] { background: var(--surface-hi); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }

.qs-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.qs-sw { width: 30px; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer;
  background: var(--sw); box-shadow: inset 0 0 0 3px var(--surface-hi); }
.qs-sw[aria-checked="true"] { border-color: var(--ink); }
.qs-sw.std { background: conic-gradient(#1B3340 0 50%, #9DB8CA 0); }
.qs-sw:disabled { cursor: not-allowed; opacity: .45; }
.qs-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* Notifications: QFI People's bell and panel, with the number in QFI orange */
/* The bell: QFI People's size and positions are the standard */
.qs-bell .qs-icon { width: 38px; height: 38px; }
.qs-bell .qs-icon svg { width: 20px; height: 20px; }
.qs-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 999px; background: var(--signal); color: var(--on-signal, #111111); font-size: 11px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 2px var(--brand); animation: qs-pop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes qs-pop { from { transform: scale(0); } }
.qs-icon.ring svg { animation: qs-ring .9s ease 1; transform-origin: 50% 8%; }
@keyframes qs-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-13deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.qs-bell .qs-drop { width: 370px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.qs-bell .np-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.qs-bell .linkish { font: inherit; font-size: 14px; background: none; border: 0; padding: 0; color: var(--rail, var(--tab-accent)); text-decoration: underline; cursor: pointer; }
.qs-bell .np-list { list-style: none; margin: 0; padding: 6px; max-height: min(440px, 70vh); overflow-y: auto; }
.qs-bell .notif { position: relative; display: flex; gap: 10px; padding: 10px 26px 10px 10px; border-radius: var(--radius-s); text-decoration: none; color: inherit; transition: background-color .12s ease; }
.qs-bell .notif:hover { background: var(--disc, var(--bg)); }
.qs-bell .notif .ni { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--disc, var(--bg)); font-size: 17px;
  font-family: "QFI Icons", "Barlow", sans-serif; font-variant-emoji: text; }
.qs-bell .notif:hover .ni { background: var(--surface); }
.qs-bell .notif .nt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qs-bell .ntext { font-size: 14px; line-height: 1.35; }
.qs-bell .notif.unread .ntext { font-weight: 600; }
.qs-bell .ndetail { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-bell .ntime { font-size: 12px; color: var(--muted); }
.qs-bell .notif.unread::after { content: ""; position: absolute; right: 10px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--rail, var(--tab-accent)); }
.qs-bell .np-empty { margin: 0; padding: 28px 14px; text-align: center; color: var(--muted); }

/* ---------- Title card (shell/intro.js) ---------- */
/* A plain dark cover from the first moment, until the title card itself is drawn. If anything fails, it lifts after 5 seconds. */
html.intro-pending::before { content: ""; position: fixed; inset: 0; z-index: 2147483001; background: #0B0D0F;
  animation: intro-cover-off 0s 5s forwards; }
@keyframes intro-cover-off { to { visibility: hidden; } }

html.intro-on, html.intro-on body { overflow: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; padding: 24px;
  background-color: #0B0D0F; color: #FFFFFF; cursor: pointer; overflow: hidden; isolation: isolate;
  transition: opacity .85s ease, visibility .85s ease;
}
.intro::before {
  content: ""; position: absolute; inset: -80px; z-index: -1;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 186, 110, .22) 0 60px, transparent 150px),
    radial-gradient(circle at 80% 30%, rgba(150, 190, 222, .18) 0 70px, transparent 170px),
    radial-gradient(circle at 36% 78%, rgba(255, 150, 90, .14) 0 80px, transparent 190px),
    radial-gradient(circle at 86% 80%, rgba(255, 214, 150, .14) 0 50px, transparent 130px),
    radial-gradient(circle at 60% 10%, rgba(255, 255, 255, .07) 0 40px, transparent 110px);
  filter: blur(22px); opacity: 0; transform: scale(1.08);
  transition: opacity 1.6s ease, transform 3s ease;
}
.intro.intro-play::before { opacity: 1; transform: scale(1); }
.intro-line {
  font-family: "Michroma", "Barlow", sans-serif; font-weight: 400; text-align: center;
  font-size: clamp(26px, 5.4vw, 76px); line-height: 1.15; letter-spacing: .04em;
}
.intro-w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(14px);
  transition: opacity .7s ease, filter .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(.25s + var(--i) * .28s); }
.intro.intro-play .intro-w { opacity: 1; filter: blur(0); transform: none; }
.intro.intro-out { opacity: 0; visibility: hidden; }
/* The website you're arriving at, under the slogan: fades in after the four words */
.intro-stack { display: grid; justify-items: center; gap: clamp(14px, 2vw, 26px); }
.intro-site { font-family: "Barlow", "IBM Plex Sans", sans-serif; font-weight: 600; font-size: clamp(15px, 1.9vw, 25px);
  letter-spacing: .38em; text-transform: uppercase; padding-left: .38em; color: rgba(255, 255, 255, .72);
  opacity: 0; transform: translateY(8px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: 1.55s; }
.intro.intro-play .intro-site { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .intro-site { transition: opacity .3s ease; transform: none; transition-delay: 0s; } }

@media (prefers-reduced-motion: reduce) {
  .intro, .intro::before, .intro-w { transition: opacity .3s ease; transform: none; filter: none; }
}

/* ---------- Universal profile pages (shell/profile.js) ---------- */
/* main.qp wins over any site's own "main" layout */
main.qp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 1120px; margin: 0 auto; padding: 28px 20px 72px; position: static; }
main.qp::before { content: none; }
.qp h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: .02em; line-height: 1.2; }
.qp h2 { margin: 0 0 10px; font-size: 17px; }
.qp-state { padding: 40px 0; color: var(--muted); display: grid; gap: 8px; }
.qp-state strong { color: var(--ink); font-size: 18px; }
.qp-muted { margin: 0; color: var(--muted); }
.qp-card, .qp-sec { background: linear-gradient(180deg, var(--surface-hi), var(--surface)); border: 1px solid var(--card-border);
  border-radius: var(--radius-m); box-shadow: var(--card-shadow); }
.qp-card { position: relative; overflow: hidden; padding: 24px; display: grid; gap: 18px; }
.qp-cover { height: 150px; margin: -24px -24px 0; }
.qp-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
/* With a background, only the picture overlaps it; the name stays below, on the card. */
.qp-card.has-cover .qp-head > .qp-av.xl { margin-top: -96px; }
.qp-who { display: grid; gap: 2px; min-width: 0; flex: 1; }
.qp-who p { margin: 0; }
.qp-title { color: var(--tab-accent); font-weight: 600; font-size: 14px; }
.qp-job { font-size: 18px; font-weight: 600; }
.qp-sub { color: var(--muted); }
.qp-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px !important; color: var(--muted); font-size: 14px; }
.qp-meta span { display: inline-flex; align-items: center; gap: 6px; }
.qp-flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.qp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-hi); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.qp-btn:hover { border-color: var(--tab-accent); }
.qp-btn.primary { background: var(--tab-accent); border-color: var(--tab-accent); color: var(--on-rail, #FFFFFF); }
.qp-btn.sm { padding: 6px 12px; font-size: 14px; justify-self: start; }
.qp-btn.disabled, .qp-btn:disabled { opacity: .5; cursor: not-allowed; }
.qp-mini { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-hi); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.qp-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: start; }
.qp-col { display: grid; gap: 22px; }
.qp-sec { padding: 20px; }
.qp-sec-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.qp-sec-head a, .qp-link { color: var(--tab-accent); font-weight: 600; text-decoration: none; }
.qp-sec-head a:hover, .qp-link:hover { text-decoration: underline; }
.qp-link { display: inline-block; margin-top: 10px; }
.qp-about { margin: 0; white-space: pre-line; }
.qp-facts { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.qp-langs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qp-langs li { display: flex; justify-content: space-between; gap: 10px; }
.qp-langs span { color: var(--muted); }
.qp-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.qp-badges a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--radius-s); background: var(--bg); text-decoration: none; }
.qp-badges a:hover { box-shadow: inset 0 0 0 1px var(--tab-accent); }
.qp-badges strong, .qp-badges .qp-site { display: block; }
.qp-badge-ico { font-size: 26px; line-height: 1; }
.qp-site { color: var(--muted); font-size: 13px; }
.qp-label { margin: 8px 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.qp-team { display: grid; gap: 6px; }
.qp-mini-person { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: var(--radius-s); text-decoration: none; }
.qp-mini-person:hover { background: var(--bg); }
.qp-mini-person > span { display: grid; min-width: 0; }
.qp-mini-person > span > span { color: var(--muted); font-size: 13px; }
/* Pictures, with frames earned from badges (same as QFI People) */
.qp-av { position: relative; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #FFFFFF; font-weight: 600; font-size: 14px; }
.qp-av.s { width: 36px; height: 36px; font-size: 13px; }
.qp-av.m { width: 64px; height: 64px; font-size: 20px; }
.qp-av.xl { width: 140px; height: 140px; font-size: 44px; box-shadow: 0 0 0 5px var(--surface-hi); }
.qp-av-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.qp-av.framed::after { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: max(2px, 7%); background: var(--fr); pointer-events: none; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.qp-av.glow { box-shadow: 0 0 14px var(--glow); }
.qp-av.framed.spin::after, .qp-av.framed-img.spin .qp-frame-img { animation: qp-spin 7s linear infinite; }
@keyframes qp-spin { to { transform: rotate(360deg); } }
.qp-frame-img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; object-fit: contain; }
/* Edit pages */
.qp-page { display: grid; gap: 16px; max-width: 760px; }
.qp-back { color: var(--tab-accent); font-weight: 600; text-decoration: none; }
.qp-form { display: grid; gap: 18px; }
.qp-field { display: grid; gap: 6px; }
.qp-fl { font-weight: 600; }
.qp-fh { margin: 0; color: var(--muted); font-size: 14px; }
.qp-form input[type=text], .qp-form textarea, .qp-form select, .qp-form input[type=number], .qp-sec select, .qp-sec input[type=text] {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-hi); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.qp-list { display: grid; gap: 8px; justify-items: start; }
.qp-row { display: flex; gap: 8px; width: 100%; align-items: center; }
.qp-row input, .qp-row select { flex: 1; }
.qp-check { display: inline-flex; gap: 8px; align-items: center; }
.qp-err { margin: 0; color: #C2410C; font-weight: 600; }
.qp-err:empty { display: none; }
.qp-pic { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.qp-pic-acts { display: grid; gap: 8px; justify-items: start; }
.qp-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 10px; }
.qp-choice { display: grid; gap: 8px; justify-items: center; padding: 12px 8px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface-hi); color: var(--ink); font: inherit; font-size: 14px; text-align: center; cursor: pointer; }
.qp-choice[aria-pressed="true"], .qp-badge-pick:has(input:checked) { border-color: var(--tab-accent); box-shadow: inset 0 0 0 1px var(--tab-accent); }
.qp-choice:disabled { opacity: .45; cursor: not-allowed; }
.qp-tile { display: block; width: 100%; height: 44px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.qp-badge-pick input { justify-self: end; }
.qp-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translateX(-50%); padding: 11px 18px; border-radius: 999px;
  background: #111111; color: #FFFFFF; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: opacity .25s ease; }
.qp-toast.out { opacity: 0; }
@media (max-width: 860px) {
  .qp-grid { grid-template-columns: 1fr; }
  .qp-av.xl { width: 110px; height: 110px; font-size: 34px; }
  .qp-card.has-cover .qp-head > .qp-av.xl { margin-top: -76px; }
}
@media (prefers-reduced-motion: reduce) { .qp-av.framed.spin::after, .qp-av.framed-img.spin .qp-frame-img { animation: none; } }

/* ---------- Achievements (shell/profile.js) ---------- */
.qa-head { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; justify-content: space-between; }
.qa-head p { margin: 6px 0 0; }
.qa-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.qa-tools input { min-width: 220px; font: inherit; color: var(--ink); background: var(--surface-hi); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.qa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-chips button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-hi); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.qa-chips button[aria-pressed="true"] { background: var(--tab-accent); border-color: var(--tab-accent); color: var(--on-rail, #FFFFFF); }
.qa-group { display: grid; gap: 10px; }
.qa-group h2 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .05em; }
.qa-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.qa-badge { height: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-m); text-decoration: none;
  background: linear-gradient(180deg, var(--surface-hi), var(--surface)); border: 1px solid var(--card-border); box-shadow: var(--card-shadow); transition: box-shadow .18s ease, transform .18s ease; }
.qa-badge:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.qa-badge.got { border-color: color-mix(in srgb, var(--tab-accent) 55%, transparent); }
.qa-text { display: grid; gap: 3px; min-width: 0; }
.qa-text > span { color: var(--muted); font-size: 14px; }
.qa-meta { color: var(--muted); font-size: 13px; margin: 0; }
.qa-meta b { color: var(--tab-accent); }
.qa-emoji { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--bg); font-size: 30px; line-height: 1; }
.qa-emoji.sm { width: 38px; height: 38px; font-size: 22px; border-radius: 10px; }
.qa-img { flex: none; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.qa-detail { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.qa-detail .qa-emoji, .qa-detail .qa-img { width: 96px; height: 96px; font-size: 56px; border-radius: 22px; }
.qa-detail h1 { margin-bottom: 4px; }
.qa-detail p { margin: 0; }
.qa-got { margin-top: 8px !important; font-weight: 600; color: var(--tab-accent); }
.qa-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qa-rows li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--radius-s); background: var(--bg); }
.qa-rows .qa-text { flex: 1; }
.qa-rows a { color: inherit; }
.qa-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qa-picker { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.qa-pk { width: 100%; font: inherit; color: var(--ink); background: var(--surface-hi); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.qa-pl { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow-y: auto;
  background: var(--surface-hi); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--card-shadow-hover); }
.qa-pl li { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.qa-pl li:hover { background: var(--bg); }
.qa-pl span { color: var(--muted); font-size: 13px; }
.qp-form .qa-icon-in { max-width: 120px; font-size: 22px; }
fieldset.qp-field { margin: 0; border: 1px solid var(--card-border); }
.qp-page.wide { max-width: 1120px; }
.qp-btn.danger { color: #C2410C; border-color: color-mix(in srgb, #C2410C 45%, var(--line)); }
.qa-holder { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qa-num { max-width: 110px; flex: none !important; }
.qa-add select, .qa-add input[type=text] { width: auto; min-width: 160px; }
.qa-sub { margin-top: 18px !important; }
.qa-rows li .qp-mini { flex: none; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .qs-top { padding: 18px 20px; min-height: 0; align-items: center; }
  .qs-top::before { width: 75%; opacity: .45; }
  .qs-word { display: none; }
  .qs-y { display: block; }
  .qs-mark { gap: 10px; }
  .qs-top { padding-top: 52px; }
  .qs-hub { top: 10px; left: 20px; }
  .qs-pills { top: 10px; left: 20px; }
  .qs-app { border-left: 0; padding-left: 0; }
  .qs-trigger .qs-tlabel, .qs-trigger svg { display: none; }
  .qs-trigger { padding: 3px; }
  .qs-drop { position: fixed; left: 12px; right: 12px; top: 72px; width: auto; max-height: calc(100vh - 90px); }
  .qs-me .qs-drop::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .qs-icon, .qs-trigger, .qs-trigger svg { transition: none; }
  .qs-drop { animation: none; }
}

/* ---------- "View as" (General Admins, for testing) ---------- */
.qs-viewas { position: sticky; top: 0; z-index: 100; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 9px 16px; background: var(--signal); color: var(--on-signal, #111111); font-size: 15px; }
.qs-viewas-stop { font: inherit; font-weight: 700; padding: 5px 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .82); color: #FFFFFF; }
.qs-va { width: min(460px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-m, 14px);
  background: var(--surface-hi, var(--surface)); color: var(--ink); box-shadow: var(--card-shadow-hover); }
.qs-va::backdrop { background: rgba(6, 8, 10, .6); }
.qs-va h2 { margin: 0 0 6px; font-size: 19px; }
.qs-va p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.qs-va input { width: 100%; box-sizing: border-box; font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.qs-va-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; max-height: 320px; overflow-y: auto; }
.qs-va-list button { width: 100%; display: grid; gap: 2px; text-align: left; font: inherit; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; }
.qs-va-list button:hover, .qs-va-list button:focus-visible { background: var(--bg); }
.qs-va-list span { color: var(--muted); font-size: 13px; }
.qs-va-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.qs-va-close { font: inherit; font-weight: 600; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }

/* A website that's under construction or off (for people who can't go in yet) */
.qs-closed { max-width: 560px; margin: 12vh auto; padding: 0 20px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.qs-closed h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; }
.qs-closed p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.qs-closed-btn { margin-top: 8px; padding: 11px 22px; border-radius: 999px; background: var(--signal); color: var(--on-signal, #111111); font-weight: 700; text-decoration: none; }

/* Live updates: a short "Updated" when a page was redrawn with new data */
.qs-live-note { position: fixed; z-index: 9500; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); padding: 7px 14px; border-radius: 999px;
  background: #16303D; color: #FFFFFF; font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); opacity: 0; transform: translateY(8px);
  pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.qs-live-note.show { animation: qs-live 2.6s ease forwards; }
@keyframes qs-live { 0% { opacity: 0; transform: translateY(8px); } 10%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .qs-live-note.show { animation: none; opacity: 1; } }

/* Profile pictures stay inside their circle: a cropped picture is drawn larger and shifted, so the circle clips it
   (frames are drawn inside the circle and a glow is a shadow, so neither is cut off). Behind a picture, the coloured
   initials circle is transparent, so no coloured rim shows at the edge. */
.qp-av { overflow: hidden; isolation: isolate; }
.qp-av:has(> .qp-av-img) { background: transparent !important; color: transparent; }

/* A site's own header content (QFI People's search and page links): its items join the header row as they are */
.qs-slot { display: contents; }

/* Translate: a small button under what people wrote; the translation shows in place of the text */
.qs-tr-btn { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0; padding: 2px 0; border: 0; background: none;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.qs-tr-btn:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.qs-tr-btn:disabled { opacity: .6; cursor: progress; }
.qs-tr-on { white-space: pre-wrap; }

/* "This website has been updated": a bar at the bottom of the page, on every QFI website */
.qs-newver { position: fixed; z-index: 9000; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: min(760px, calc(100vw - 24px)); padding: 12px 14px 12px 18px;
  border-radius: 14px; background: #151515; color: #F5F5F5; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); font: 600 14px/1.4 Barlow, "IBM Plex Sans", system-ui, sans-serif;
  animation: qs-newver-in .25s ease-out both; }
.qs-newver > span:first-child { flex: 1 1 260px; }
.qs-newver-btns { display: flex; gap: 8px; margin-left: auto; }
.qs-newver-btn { border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: inherit; font: inherit; padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.qs-newver-btn:hover { background: rgba(255, 255, 255, .1); }
.qs-newver-btn.primary { background: var(--signal, #FF5E2A); border-color: transparent; color: var(--on-signal, #fff); }   /* the theme's accent */
.qs-newver-btn.primary:hover { filter: brightness(1.08); }
.qs-newver-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@keyframes qs-newver-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .qs-newver { animation: none; } }

/* While a page loads: nothing written, just room for it (screen readers still hear it's busy) */
.qfi-busy { min-height: 40vh; border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; }
li.qfi-busy, p.note.qfi-busy { min-height: 48px; list-style: none; }
.qs-top .qs-pills a.qs-remind, .qs-top .qs-pills a.qs-remind:visited { color: #FFFFFF; opacity: 1; }   /* a site's own link colours never dim it */
/* reminder pills sit exactly level with "View as": a site's header link styles (display, margins) never move them */
.qs-top .qs-pills a.qs-remind { display: inline-flex; margin: 0; align-self: center; vertical-align: middle; line-height: inherit; }
.qs-top .qs-pills > #qs-va-pill { display: inline-flex; align-self: center; }
/* reminder pills: tinted in their colour, bold, with a gently pulsing dot, so a pending task is noticed (not shouted) */
.qs-top .qs-pills a.qs-remind { font-weight: 700; color: #FFFFFF; }
.qs-top .qs-pills a.qs-remind.amber { background: rgba(224, 161, 0, .26); box-shadow: inset 0 0 0 1px rgba(255, 196, 64, .7); }
.qs-top .qs-pills a.qs-remind.red { background: rgba(226, 87, 76, .3); box-shadow: inset 0 0 0 1px rgba(255, 128, 116, .75); }
.qs-top .qs-pills a.qs-remind.blue { background: rgba(111, 163, 230, .26); box-shadow: inset 0 0 0 1px rgba(150, 190, 245, .7); }
.qs-top .qs-pills a.qs-remind.amber:hover { background: rgba(224, 161, 0, .38); }
.qs-top .qs-pills a.qs-remind.red:hover { background: rgba(226, 87, 76, .42); }
.qs-top .qs-pills a.qs-remind.blue:hover { background: rgba(111, 163, 230, .38); }
.qs-remind-dot { position: relative; background: #FFC23D; box-shadow: none; }
.qs-remind.red .qs-remind-dot { background: #FF7A6E; box-shadow: none; } .qs-remind.blue .qs-remind-dot { background: #8DB9F2; box-shadow: none; }
.qs-remind-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: qs-remind-pulse 2.6s ease-out infinite; }
@keyframes qs-remind-pulse { 0% { transform: scale(1); opacity: .75; } 70%, 100% { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .qs-remind-dot::after { animation: none; display: none; } }
.qs-top .qs-pills a.qs-remind.amber { background: rgba(224, 161, 0, .34); box-shadow: inset 0 0 0 1px rgba(255, 200, 80, .8); }
.qs-top .qs-pills a.qs-remind.blue { background: rgba(80, 140, 225, .38); box-shadow: inset 0 0 0 1px rgba(150, 190, 245, .8); }
.qs-top .qs-pills a.qs-remind.amber:hover { background: rgba(224, 161, 0, .46); }
.qs-top .qs-pills a.qs-remind.blue:hover { background: rgba(80, 140, 225, .5); }
