/*
  App shell.
  Desktop: basalt sidebar, top bar, centred content column. It is the layout of any window of a
          computer (mouse or trackpad) down to 640px wide, and of every window from 992px up.
          Between 640 and 992px on a computer the menu stays folded to its icon strip.
  Phone:  compact top bar, content, bottom tab bar. No sidebar. Any touch screen under 992px
          (phones, tablets held upright) and any window narrower than 640px.
  These two conditions are repeated in tokens.css, components.css, base.html and sidebar.js.
*/

body.q-body { background: var(--q-bg); min-height: 100vh; }

.q-skip { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--q-surface); padding: .5rem .75rem; border-radius: var(--q-r-ctrl); }
.q-skip:focus { left: 8px; }

.q-icon { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }
.q-icon--lg { width: 1.5rem; height: 1.5rem; }
.q-icon--sm { width: .9375rem; height: .9375rem; }

/* ---- Sidebar (desktop) ---------------------------------------------------------------------- */
.q-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--q-sidebar-w); z-index: 1030;
  display: none; flex-direction: column;
  background: var(--q-basalt); color: var(--q-basalt-ink);
}
@media (min-width: 992px), (min-width: 640px) and (pointer: fine) { .q-sidebar { display: flex; } }

.q-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; }
.q-brand:hover { color: #fff; }
.q-brand__mark { width: 28px; height: 28px; flex: none; }
.q-brand__mark .m-face { fill: #fff; }
.q-topbar .q-brand__mark .m-face { fill: var(--q-basalt); }
.q-brand__name { font-family: var(--q-font-display); font-weight: 300; font-size: 1.3rem; letter-spacing: -.01em; line-height: 1; }
.q-brand__name b { font-weight: 800; }
/* The name inside a sentence or a heading: same rule, light Quarry and heavy IQ. */
.q-brand-word b { font-weight: 800; }
h1 .q-brand-word, h2 .q-brand-word { font-weight: 300; }
.q-sidebar .q-brand { height: var(--q-topbar-h); padding: 0 1.25rem; border-bottom: 1px solid var(--q-basalt-line); }

.q-nav__home { margin-top: .75rem; }
.q-sidebar__lang { padding: .75rem 1rem; border-top: 1px solid var(--q-basalt-line); }
.q-sidebar .q-lang { width: 100%; background: transparent; border-color: var(--q-basalt-line); }
.q-sidebar .q-lang button { flex: 1; color: var(--q-basalt-ink); }
.q-sidebar .q-lang button + button { border-left-color: var(--q-basalt-line); }
.q-sidebar .q-lang button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.q-sidebar .q-lang button[aria-current="true"] { background: #fff; color: var(--q-basalt); font-weight: 600; }
.q-nav { flex: 1; overflow-y: auto; padding: .75rem .75rem 1rem; }
/* The menu scrolls with the wheel or the trackpad when the window is short, without a scrollbar */
.q-nav { overscroll-behavior: contain; scrollbar-width: none; }
.q-nav::-webkit-scrollbar { display: none; width: 0; }
.q-nav ul { list-style: none; margin: 0; padding: 0; }
.q-nav { --q-nav-sep: #4a5a60; }
.q-nav__group { margin: .75rem 0 .25rem; padding: .7rem .75rem 0; border-top: 1px solid var(--q-nav-sep); font-size: var(--q-text-sm); font-weight: 500; color: var(--q-basalt-muted); }
.q-nav__group:first-child { margin-top: .25rem; }
.q-nav__link {
  position: relative; display: flex; align-items: center; gap: .75rem;
  min-height: 2.25rem; padding: .35rem .75rem; margin-bottom: 1px;
  border-radius: var(--q-r-ctrl); color: var(--q-basalt-ink); text-decoration: none; font-size: var(--q-text-base);
  transition: background-color .12s, color .12s;
}
.q-nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.q-nav__link.is-active { background: rgba(255, 255, 255, .09); color: #fff; font-weight: 500; }
.q-nav__link.is-active::before {          /* ochre bench marker: where you are */
  content: ""; position: absolute; left: -.75rem; top: .5rem; bottom: .5rem; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--q-accent);
}
.q-sidebar :focus-visible { outline-color: #fff; }

/* P4P "Set-up": the three steps, folded away once done; quieter than the daily pages. */
.q-nav__setup > summary { list-style: none; cursor: pointer; color: var(--q-basalt-muted); font-size: var(--q-text-sm); }
.q-nav__setup > summary::-webkit-details-marker { display: none; }
.q-nav__setup > summary::after {          /* chevron: points right when folded, down when open */
  content: ""; margin-left: auto; width: .45rem; height: .45rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .12s;
}
.q-nav__setup[open] > summary::after { transform: rotate(45deg); }
.q-nav__setup-head .q-nav__text { flex: 1; }
.q-nav__setup > summary::after { margin-left: .5rem; flex: none; }
.q-nav__setup .q-nav__link--step { color: var(--q-basalt-muted); font-size: var(--q-text-sm); min-height: 2.2rem; }
.q-nav__setup .q-nav__link--step:hover, .q-nav__setup .q-nav__link--step.is-active { color: #fff; }

.q-sidebar__foot { padding: .85rem 1rem; border-top: 1px solid var(--q-basalt-line); display: flex; align-items: center; gap: .65rem; }
.q-avatar {
  width: 2rem; height: 2rem; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--q-accent); color: var(--q-basalt);
  font-family: var(--q-font-display); font-weight: 600; font-size: .95rem;
}
.q-avatar--sky { background: #6cb7e8; }
.q-avatar--green { background: #6fcf97; }
.q-avatar--rose { background: #f08fb0; }
.q-avatar--violet { background: #b79cf0; }
.q-avatar--teal { background: #5fd0c5; }
.q-avatar--coral { background: #f2866b; }
.q-avatar--stone { background: #c9d3d6; }
.q-sidebar__me { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; padding: .25rem; margin: -.25rem; border-radius: var(--q-r-ctrl); text-decoration: none; color: inherit; }
.q-sidebar__me:hover { background: rgba(255, 255, 255, .06); }
.q-sidebar__user { min-width: 0; flex: 1; line-height: 1.25; }
.q-sidebar__user strong { display: block; color: #fff; font-weight: 500; font-size: var(--q-text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sidebar__user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--q-text-xs); color: var(--q-basalt-muted); }
.q-iconbtn { background: none; border: 0; color: var(--q-basalt-ink); padding: .4rem; border-radius: var(--q-r-ctrl); display: inline-grid; place-items: center; }
.q-iconbtn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---- Shell, top bar, content ---------------------------------------------------------------- */
.q-shell { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px), (min-width: 640px) and (pointer: fine) { .q-shell { margin-left: var(--q-sidebar-w); } }

.q-topbar {
  position: sticky; top: 0; z-index: 1020; height: var(--q-topbar-h);
  display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
  background: var(--q-surface); border-bottom: 1px solid var(--q-line);
}
@media (min-width: 992px), (min-width: 640px) and (pointer: fine) { .q-topbar { padding: 0 2rem; } }
.q-topbar .q-brand { color: var(--q-ink); }
.q-topbar .q-brand:hover { color: var(--q-ink); }
.q-topbar__context { flex: 1; min-width: 0; display: flex; align-items: center; }
.q-topbar__tools { display: flex; align-items: center; gap: .5rem; }

.q-context {            /* quarry switcher */
  display: inline-flex; align-items: center; gap: .5rem; max-width: 100%;
  background: var(--q-surface-sunk); border: 1px solid var(--q-line); border-radius: var(--q-r-ctrl);
  padding: .4rem .7rem; color: var(--q-ink); font-size: var(--q-text-base); font-weight: 500; min-height: 2.25rem; text-decoration: none;
}
.q-context:hover { text-decoration: none; }
.q-context:hover { border-color: var(--q-line-strong); background: var(--q-surface); }
.q-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-context small { color: var(--q-ink-3); font-weight: 400; font-size: var(--q-text-sm); }

.q-lang { display: inline-flex; border: 1px solid var(--q-line-strong); border-radius: var(--q-r-ctrl); overflow: hidden; background: var(--q-surface); }
.q-lang button { background: none; border: 0; padding: .3rem .6rem; font-size: var(--q-text-sm); font-weight: 500; color: var(--q-ink-2); min-height: 2rem; }
.q-lang button + button { border-left: 1px solid var(--q-line-strong); }
.q-lang button:hover { background: var(--q-surface-sunk); }
.q-lang button[aria-current="true"] { background: var(--q-primary-soft); color: var(--q-primary); }

.q-content { flex: 1; width: 100%; max-width: var(--q-content-max); margin: 0 auto; padding: 1.25rem 1rem 3rem; }
@media (min-width: 992px), (min-width: 640px) and (pointer: fine) { .q-content { padding: 1.75rem 2rem 3.5rem; } }

.q-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.5rem; }
.q-pagehead h1 { margin: 0; }
.q-pagehead__sub { margin: .25rem 0 0; color: var(--q-ink-3); font-size: var(--q-text-base); }
.q-pagehead__back { display: inline-flex; align-items: center; gap: .25rem; margin: .5rem 0 0 -.25rem; padding: .15rem .5rem .15rem .25rem; border-radius: var(--q-r-pill); color: var(--q-ink-3); font-size: var(--q-text-sm); font-weight: 500; text-decoration: none; }
.q-pagehead__back .q-icon { width: 1rem; height: 1rem; }
.q-pagehead__back:hover { background: var(--q-surface-sunk); color: var(--q-ink); }
.q-pagehead__back:focus-visible { outline: 2px solid var(--q-primary); outline-offset: 2px; }
.q-pagehead__switch { min-width: min(100%, 20rem); }

.q-section { margin-bottom: 2rem; }
.q-section > h2 { font-size: var(--q-text-lg); margin-bottom: .85rem; }
.q-section__intro { color: var(--q-ink-2); max-width: 62ch; margin: -.35rem 0 1rem; }

/* ---- Bottom tab bar (phone) ----------------------------------------------------------------- */
.q-bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 1030;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--q-surface); border-top: 1px solid var(--q-line);
  padding-bottom: env(safe-area-inset-bottom);
}
.q-bottomnav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  height: var(--q-bottomnav-h); color: var(--q-ink-3); text-decoration: none; font-size: var(--q-text-xs); font-weight: 500;
}
.q-bottomnav a .q-icon { width: 1.4rem; height: 1.4rem; }
.q-bottomnav a.is-active { color: var(--q-primary); }
.q-bottomnav a.is-active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--q-primary); }
@media (max-width: 639.98px), (max-width: 991.98px) and (pointer: coarse) {
  body.q-body { padding-bottom: calc(var(--q-bottomnav-h) + env(safe-area-inset-bottom)); }
}

/* Sticky primary action on phones (e.g. "Calculate" under a parameter form) */
.q-actionbar { display: flex; gap: .5rem; }
@media (max-width: 639.98px), (max-width: 991.98px) and (pointer: coarse) {
  .q-actionbar--sticky {
    position: fixed; inset: auto 0 calc(var(--q-bottomnav-h) + env(safe-area-inset-bottom)) 0; z-index: 1025;
    padding: .65rem 1rem; background: var(--q-surface); border-top: 1px solid var(--q-line);
  }
  .q-actionbar--sticky .btn { flex: 1; min-height: 3rem; }
  .q-has-actionbar { padding-bottom: 5rem; }
}

/* Show/hide helpers: render a *different* component per screen, not a squeezed one */
@media (max-width: 639.98px), (max-width: 991.98px) and (pointer: coarse) { .q-only-desktop { display: none !important; } }
@media (min-width: 992px), (min-width: 640px) and (pointer: fine)    { .q-only-mobile  { display: none !important; } }

/* Messages */

/* Quarry switcher */
.q-switcher { position: relative; width: 100%; }
.q-switcher .q-context { width: 100%; justify-content: space-between; }

/* Quarry selector panel: search, groups, recent quarries, one line per quarry */
.q-switch__panel { position: absolute; z-index: 1000; top: calc(100% + .4rem); right: 0; width: min(44rem, calc(100vw - 2rem)); padding: .75rem; background: var(--q-surface); border: 1px solid var(--q-line-strong); border-radius: var(--q-r-card); box-shadow: var(--q-shadow-pop); }
.q-switch__panel[hidden] { display: none; }
.q-switch__search { width: 100%; margin-bottom: .6rem; padding: .5rem .7rem; border: 1px solid var(--q-line-strong); border-radius: var(--q-r-ctrl); background: var(--q-surface); font: inherit; }
.q-switch__search:focus { outline: 2px solid var(--q-accent); outline-offset: 1px; }
.q-switch__chips, .q-switch__recent { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .6rem; }
.q-switch__chips { max-height: 5.6rem; overflow-y: auto; }
.q-switch__recent > span { margin-right: .25rem; font-size: var(--q-text-sm); color: var(--q-ink-3); }
.q-switch__list { max-height: min(24rem, 55vh); overflow-y: auto; border: 1px solid var(--q-line); border-radius: var(--q-r-ctrl); }
.q-switch__row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 6rem minmax(0, 1.2fr); align-items: center; gap: .75rem; width: 100%; padding: .5rem .75rem; border: 0; border-bottom: 1px solid var(--q-line); background: var(--q-surface); color: var(--q-ink); font: inherit; font-size: var(--q-text-sm); text-align: left; cursor: pointer; }
.q-switch__row:last-of-type { border-bottom: 0; }
.q-switch__row[hidden] { display: none; }
button.q-switch__row:hover, button.q-switch__row:focus-visible { background: var(--q-surface-sunk); outline: none; }
button.q-switch__row:focus-visible { box-shadow: inset 0 0 0 2px var(--q-accent); }
.q-switch__row.is-on .q-switch__name { font-weight: 700; }
.q-switch__row--head { position: sticky; top: 0; z-index: 1; background: var(--q-surface-sunk); color: var(--q-ink-3); font-size: var(--q-text-xs); font-weight: 600; cursor: default; }
.q-switch__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-switch__region, .q-switch__month { color: var(--q-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-switch__status { display: inline-flex; align-items: center; gap: .4rem; }
.q-switch__dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--q-ink-3); }
.q-switch__status.is-ok .q-switch__dot { background: var(--q-good); }
.q-switch__status.is-behind .q-switch__dot, .q-switch__status.is-waiting .q-switch__dot { background: var(--q-warning); }
.q-switch__status.is-late .q-switch__dot { background: var(--q-critical); }
.q-switch__empty { margin: 0; padding: .75rem; }
@media (max-width: 640px) {
  .q-switch__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .q-switch__region, .q-switch__month { display: none; }
}

/* ---- Collapsed side menu (desktop): an icon strip ------------------------------------------- */
/* The fold button is a "sidebar" icon in the logo bar, on the right. When the menu is folded the bar
   only has room for the logo, so the button goes just under it. Its text stays for screen readers and
   for the tooltip. */
.q-nav__toggle { display: none; position: absolute; top: calc((var(--q-topbar-h) - 2rem) / 2); right: .75rem; z-index: 2; width: 2rem; height: 2rem; padding: 0; margin: 0; min-height: 0; align-items: center; justify-content: center; border: 0; border-radius: var(--q-r-ctrl); background: none; color: var(--q-basalt-muted); }
.q-nav__toggle:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.q-nav__toggle .q-nav__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 992px), (min-width: 640px) and (pointer: fine) {
  .q-nav__toggle { display: flex; }
  .q-sidebar, .q-shell { transition: width .15s ease, margin-left .15s ease; }
  html.q-nav-collapsed { --q-sidebar-w: 64px; }
  html.q-nav-collapsed .q-brand { justify-content: center; padding: 0; }
  html.q-nav-collapsed .q-brand__name,
  html.q-nav-collapsed .q-sidebar__lang,
  html.q-nav-collapsed .q-sidebar__user { display: none; }
  html.q-nav-collapsed .q-nav { padding-inline: .75rem; overflow-x: hidden; }
  /* Folded: the long group name gives way to its short form (P4P, S4P, Admin) under the separator. */
  html.q-nav-collapsed .q-nav__group { margin: .75rem -.2rem .3rem; padding: .5rem 0 0; font-size: 0; text-align: center; }
  html.q-nav-collapsed .q-nav__group::before { content: attr(data-short); font-size: .66rem; font-weight: 600; letter-spacing: 0; }
  html.q-nav-collapsed .q-nav__link { justify-content: center; padding-inline: 0; margin-inline: 0; }
  html.q-nav-collapsed .q-nav__link--step { padding-left: 0; }
  html.q-nav-collapsed .q-nav__setup > summary::after { display: none; }
  html.q-nav-collapsed .q-nav__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html.q-nav-collapsed .q-nav__toggle { top: calc(var(--q-topbar-h) + .5rem); right: auto; left: 50%; transform: translateX(-50%); }
  /* The list starts below the fold button, so it scrolls beside it and never behind it. */
  html.q-nav-collapsed .q-nav { margin-top: 3rem; }
  html.q-nav-collapsed .q-nav__toggle { background: var(--q-basalt); }
  html.q-nav-collapsed .q-nav__toggle:hover { background: var(--q-basalt-line); }
  html.q-nav-collapsed .q-sidebar__foot { flex-direction: column; gap: .9rem; padding-inline: 0; justify-content: center; }
  html.q-nav-collapsed .q-sidebar__me { flex-direction: column; gap: .6rem; flex: 0 0 auto; }
  html.q-nav-collapsed .q-sidebar__flag { display: block; max-width: 100%; padding-inline: 2px; text-align: center; letter-spacing: 0; font-size: .6rem; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }
}
/* A computer window between 640 and 992px: the menu is always the icon strip, no fold button. */
@media (max-width: 991.98px) and (min-width: 640px) and (pointer: fine) {
  .q-nav__toggle { display: none; }
  html.q-nav-collapsed .q-nav { margin-top: 0; }
}
@media (min-width: 992px), (min-width: 640px) and (pointer: fine) { html.q-nav-collapsed .q-content { max-width: calc(var(--q-content-max) + 6rem); } }

/* ---- Attention triangle in the sidebar (open and collapsed) ---- */
.q-nav__link { position: relative; }
.q-nav__alert { margin-left: auto; display: inline-flex; color: var(--q-warning); }
.q-nav__alert[hidden] { display: none; }
.q-nav__alert .q-icon { width: 1rem; height: 1rem; }
html.q-nav-collapsed .q-nav__alert { position: absolute; top: .15rem; right: .55rem; margin: 0; padding: 1px; border-radius: 50%; background: var(--q-basalt, #1b2427); }
html.q-nav-collapsed .q-nav__alert .q-icon { width: .85rem; height: .85rem; }

/* ---- My account ---- */
.q-account { display: grid; gap: 1rem; margin-top: .25rem; }
.q-account__title { font-size: var(--q-text-lg); margin-bottom: .75rem; }
.q-account__rows { display: grid; gap: .6rem; margin: 0; }
.q-account__rows > div { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.q-account__rows dt { flex: 0 0 9rem; color: var(--q-ink-2); font-weight: 500; }
.q-account__saved { display: block; min-height: 1.25rem; margin-top: .4rem; font-size: var(--q-text-sm); color: var(--q-good-ink, #1f6f3f); }
.q-account__saved.is-error { color: var(--q-critical-ink, #b3261e); }
.q-account__rows dd { margin: 0; overflow-wrap: anywhere; }
.q-account__quarries { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.q-account__quarries small { color: var(--q-ink-3); margin-left: .4rem; }
.q-account__pref { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.q-account__pref fieldset { border: 0; margin: 0; padding: 0; }
.q-account__pref legend { margin-bottom: .75rem; }
.q-account__label { flex: 0 0 9rem; color: var(--q-ink-2); font-weight: 500; padding: 0; float: none; width: auto; margin: 0; font-size: inherit; }
.q-account__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.q-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.q-swatch { cursor: pointer; display: inline-flex; }
.q-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-swatch .q-avatar { transition: transform .1s ease; }
.q-swatch:hover .q-avatar { transform: scale(1.08); }
.q-swatch input:checked + .q-avatar { outline: 2px solid var(--q-ink); outline-offset: 2px; }
.q-swatch input:focus-visible + .q-avatar { outline: 2px solid var(--q-primary, #1b2427); outline-offset: 3px; }
.q-account__tablewrap { overflow-x: auto; margin: 0 -.25rem; }
.q-access th, .q-access td { text-align: left; }
.q-access th.num, .q-access td.num { text-align: center; width: 7.5rem; }
.q-access tbody tr.is-first td { border-top: 1px solid var(--q-line-strong); }
.q-access tbody tr:first-child td { border-top: 0; }
.q-access .is-yes { color: var(--q-good-ink, #1f6f3f); }
.q-access .is-soon { color: var(--q-warning-ink); }
.q-access .is-over { color: var(--q-critical-ink); font-weight: 500; }
.q-access td a { color: inherit; text-decoration: none; display: block; }
.q-access td a:hover small { text-decoration: underline; }
.q-access td small { display: block; font-size: var(--q-text-xs); line-height: 1.2; color: var(--q-ink-3); }
.q-access td.is-soon small, .q-access td.is-over small { color: inherit; }
.q-sidebar__focus { color: var(--q-accent); font-weight: 500; }
.q-sidebar__flag { display: none; color: var(--q-accent); font-size: .7rem; font-weight: 600; letter-spacing: .04em; line-height: 1; }
.q-sidebar__me.has-focus .q-avatar { box-shadow: 0 0 0 2px var(--q-basalt), 0 0 0 4px var(--q-accent); }
.q-account__note { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0 0; padding: .7rem .9rem; border-radius: var(--q-r-ctrl); background: var(--q-primary-soft); color: var(--q-ink-2); font-size: var(--q-text-sm); }
.q-account__note .q-icon { margin-top: .15rem; color: var(--q-primary); }

/* ---- Password rules (change password) ---- */
.q-rules { margin-top: .6rem; padding: .75rem .9rem; border-radius: var(--q-r-ctrl); background: var(--q-surface-sunk); }
.q-rules__title { margin: 0 0 .4rem; font-size: var(--q-text-sm); font-weight: 500; color: var(--q-ink-2); }
.q-rules__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.q-rules__note { margin: .6rem 0 0; font-size: var(--q-text-xs); color: var(--q-ink-3); }
.q-rule { display: flex; align-items: center; gap: .5rem; font-size: var(--q-text-sm); color: var(--q-ink-2); }
.q-rule .q-icon:first-child { color: var(--q-critical-ink, #b3261e); }
.q-rule .q-icon:nth-child(2) { display: none; color: var(--q-good-ink, #1f6f3f); }
.q-rule.is-ok { color: var(--q-ink); }
.q-rule.is-ok .q-icon:first-child { display: none; }
.q-rule.is-ok .q-icon:nth-child(2) { display: inline-block; }

/* ---- Subscription ended: blurred placeholder with the renewal message ---- */
.q-over { position: relative; min-height: 22rem; }
.q-over__ghost { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; display: grid; gap: 1.25rem; padding: 1rem; }
.q-over__ghost i { display: block; background: var(--q-line-strong); border-radius: .35rem; }
.q-over__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.q-over__row i { height: 4.5rem; }
.q-over__bars { display: flex; align-items: flex-end; gap: .75rem; height: 9rem; }
.q-over__bars i { flex: 1; }
.q-over__lines { display: grid; gap: .6rem; }
.q-over__lines i { height: 1.1rem; }
.q-over__card { position: absolute; inset: 0; margin: auto; width: min(28rem, 92%); height: max-content; padding: 1.5rem; text-align: center; background: var(--q-surface); border: 1px solid var(--q-line-strong); border-radius: var(--q-r-card, .75rem); box-shadow: 0 8px 30px rgba(0, 0, 0, .12); }
.q-over__card .q-icon { width: 1.75rem; height: 1.75rem; color: var(--q-warning); }
.q-over__card h2 { margin: .5rem 0 .4rem; font-size: 1.2rem; }
.q-over__card p { margin: 0 0 1rem; color: var(--q-ink-2); }

.q-reference { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; max-width: 12rem; }

/* Contact: the three choices side by side, the reply promise next to the Send button. */
.contact__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.contact__send { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.contact__send .btn { flex: none; }
.contact__toggle { display: inline-flex; align-items: center; gap: .4rem; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.contact__toggle .q-icon { width: 1rem; height: 1rem; color: var(--q-ink-3); }
.contact__toggle[aria-expanded="true"] .q-icon { transform: rotate(180deg); }
.contact__full td { padding-top: 0; border-top: 0; }
.contact__full textarea { resize: vertical; min-height: 0; padding: .45rem .65rem; font-size: .875rem; line-height: 1.4; color: var(--q-ink-2); background: var(--q-surface-2, #f4f6f5); }
.q-account__pref--colour { margin-bottom: 0; }
.q-account__saved { margin-top: .25rem; }
.q-access .is-over a small, .q-access .is-soon a small { text-decoration: underline; text-underline-offset: 2px; }
.q-nav__link.is-off { opacity: .55; }
.q-nav__link.is-off .q-nav__lock { margin-left: auto; display: inline-flex; }

/* ---- The customer's logo: top right of the page (desktop), in the top bar (mobile) ---- */
.q-companylogo { display: flex; align-items: center; margin-left: auto; }
.q-companylogo__img { display: block; width: auto; height: auto; max-width: 10rem; max-height: 2.5rem; object-fit: contain; }
.q-companylogo--page { align-self: flex-start; }
.q-companylogo--bar .q-companylogo__img { max-width: 7rem; max-height: 1.75rem; }
@media (max-width: 639.98px), (max-width: 991.98px) and (pointer: coarse) { .q-companylogo--page { display: none; } }
@media (min-width: 992px), (min-width: 640px) and (pointer: fine) { .q-companylogo--bar { display: none; } }
