/* =====================================================================
   layout.css - top bar, utility bar, navigation, grids, footer,
   floating language switcher, floating assistant, quick view tab
   ===================================================================== */

/* --- Top bar (section 5.1) ------------------------------------------- */
.topbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 60;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 15px;
  max-width: var(--container-max);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}
.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent-tan);
  padding: 4px;
  flex: 0 0 48px;
}
.brand__name { font-weight: 700; font-size: 1.25rem; line-height: 1.2; }

.state-picker { display: flex; align-items: center; gap: var(--space-2); }
.state-picker select {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  max-width: 220px;
}

/* --- Utility bar (section 5.2) --------------------------------------- */
.utilitybar {
  background: var(--color-accent-tan);
  border-bottom: 1px solid var(--color-accent-tan-hover);
}
.utilitybar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 15px;
  max-width: var(--container-max);
  margin: 0 auto;
  flex-wrap: wrap;
}
.utilitybar__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.searchbox { display: flex; }
.searchbox input[type="search"] {
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  min-width: 200px;
  background: var(--color-surface);
}
.searchbox button {
  padding: 7px 14px;
  border: 1px solid var(--color-btn-bg);
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 500;
}
.quicklinks { display: flex; align-items: center; gap: var(--space-2); font-size: 0.9rem; }
.quicklinks a { color: var(--color-nav-link); }
.quicklinks .sep { color: var(--color-text-muted); }

/* --- Main navigation -------------------------------------------------- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-nav-link);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 10px 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-nav-link);
  margin: 4px 0;
  border-radius: 2px;
}
.nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.nav a {
  color: var(--color-nav-link);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 2px;
  display: inline-block;
}
.nav a:hover { color: var(--color-text); }
.nav a[aria-current="page"] { color: var(--color-text); font-weight: 500; }

.user-menu { position: relative; }
.user-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--color-nav-link);
  font-size: 0.95rem;
  padding: 6px 2px;
}
.user-menu__caret { font-size: 0.7rem; }
.user-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  min-width: 170px;
  padding: var(--space-1) 0;
  display: none;
  z-index: 70;
}
.user-menu__panel.is-open { display: block; }
.user-menu__panel a,
.user-menu__panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px var(--space-3);
  background: none;
  border: 0;
  color: var(--color-nav-link);
  text-decoration: none;
  font-size: 0.95rem;
}
.user-menu__panel a:hover,
.user-menu__panel button:hover { background: var(--color-table-stripe); }

/* --- Breadcrumb -------------------------------------------------------- */
.breadcrumb {
  font-size: 0.875rem;
  padding: var(--space-3) 0 0;
  color: var(--color-text-muted);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.breadcrumb li::after { content: '/'; margin-left: 6px; color: var(--color-border); }
.breadcrumb li:last-child::after { content: ''; }

/* --- Card grids (section 3.3) ------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-5);
}

/* --- Footer (section 5.6) ---------------------------------------------- */
.site-footer { background: var(--color-accent-tan); margin-top: var(--space-6); }
.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-5) 0;
}
.site-footer h3 { font-size: 1.125rem; margin: 0 0 var(--space-2); }
.site-footer a { color: var(--color-nav-link); }
.footer-about { max-width: 320px; }
.footer-about__brand { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.footer-about__brand img { width: 40px; height: 40px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--space-1); }

.social-row { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  text-decoration: none;
}
.social-row svg { width: 18px; height: 18px; }

.footer-connect {
  background: #1b1b1b;
  color: #ffffff;
  padding: var(--space-3) 0;
}
.footer-connect__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.footer-connect .pill {
  display: inline-block;
  border: 1px solid #ffffff;
  border-radius: 999px;
  padding: 8px 18px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-refs {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--space-3) 0;
  background: var(--color-accent-tan);
}
.footer-refs a {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--color-nav-link);
}
.footer-legal {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  padding: var(--space-3) 15px var(--space-4);
  background: var(--color-accent-tan);
}
.footer-legal p { margin: 0 0 4px; }

/* --- Floating language switcher (section 5.3) -------------------------- */
.lang-switcher {
  position: fixed;
  left: 0;
  /* A bare 24px puts this under the iOS Safari toolbar and the Android
     gesture bar, where it cannot be tapped at all. */
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  font-size: 0.875rem;
}
.lang-switcher__tab {
  background: var(--color-accent-tan);
  border: 1px solid var(--color-accent-tan-hover);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  padding: 8px 16px 8px 12px;
  color: var(--color-nav-link);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-card);
}
.lang-switcher__list {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-card);
  min-width: 170px;
  max-height: 60vh;
  max-height: min(60dvh, calc(100dvh - 140px));
  overflow-y: auto;
  overscroll-behavior: contain;   /* scrolling the list must not scroll the page */
  padding: var(--space-1) 0;
  margin: 0;
  list-style: none;
}
.lang-switcher.is-open .lang-switcher__list { display: block; }
.lang-switcher__list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px var(--space-3);
  color: var(--color-nav-link);
}
.lang-switcher__list button:hover { background: var(--color-table-stripe); }
.lang-switcher__list button[aria-current="true"] { font-weight: 700; }

/* --- Floating help assistant (section 5.4) ----------------------------- */
.assistant {
  position: fixed;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 85;
}
.assistant__chip {
  position: absolute;
  right: 68px;
  bottom: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  color: var(--color-text);
}
.assistant__chip::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: 12px;
  width: 10px; height: 10px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  transform: rotate(-45deg);
}
.assistant__button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--assistant-purple);
  color: #ffffff;
  border: 0;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 0.625rem;
  line-height: 1;
}
.assistant__button svg { width: 22px; height: 22px; }
.assistant__panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.assistant.is-open .assistant__panel {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.assistant__header {
  background: var(--assistant-purple);
  color: #ffffff;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}
.assistant__close { background: none; border: 0; color: #ffffff; font-size: 1.25rem; line-height: 1; }
.assistant__log {
  padding: var(--space-3);
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.9rem;
}
.assistant__msg { padding: 8px 12px; border-radius: var(--radius-md); max-width: 90%; }
.assistant__msg--bot { background: var(--color-badge-bg); align-self: flex-start; }
.assistant__msg--user { background: var(--assistant-purple); color: #ffffff; align-self: flex-end; }
.assistant__msg ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
/* One quoted passage: its source heading, then the line lifted from the page. */
.assistant__facts { margin: 8px 0 0; }
.assistant__facts dt {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-top: 8px;
}
.assistant__facts dt:first-child { margin-top: 0; }
.assistant__facts dt:empty { display: none; }
.assistant__facts dd { margin: 2px 0 0; }
.assistant__source { margin: 8px 0 0; font-size: 0.8125rem; color: var(--color-text-muted); }
.assistant__source a { color: var(--color-link); text-decoration: underline; }
.assistant__suggest-intro {
  flex: 1 0 100%;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.assistant__suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--space-3) var(--space-2); }
.assistant__suggestions button {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8125rem;
}
.assistant__form { display: flex; border-top: 1px solid var(--color-border); }
.assistant__form input { flex: 1; border: 0; padding: 12px var(--space-3); }
.assistant__form button {
  border: 0;
  background: var(--assistant-purple);
  color: #ffffff;
  padding: 0 var(--space-3);
  font-weight: 500;
}

/* --- Quick View tab and modal (section 5.5) ---------------------------- */
.quickview-tab {
  position: fixed;
  right: 0;
  top: 45%;
  z-index: 70;
  writing-mode: vertical-rl;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: var(--space-3) 8px;
  letter-spacing: 0.04em;
  font-size: 0.875rem;
}
.quickview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 95;
  padding: var(--space-3);
}
.quickview-modal.is-open { display: flex; }
.quickview-modal__box {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.quickview-modal__head {
  background: var(--color-accent-tan);
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.quickview-modal__head button { background: none; border: 0; font-size: 1.25rem; line-height: 1; }
.quickview-modal ul { list-style: none; margin: 0; padding: var(--space-2) 0; }
.quickview-modal li a {
  display: block;
  padding: 8px var(--space-3);
  color: var(--color-nav-link);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.quickview-modal li:last-child a { border-bottom: 0; }
.quickview-modal li a:hover { background: var(--color-table-stripe); }

/* --- Advertising slots (section 5.9) ------------------------------------ */
/* In production a slot collapses to nothing until real ad code is pasted in.
   DEV_MODE adds .ad-slot--dev, which makes it visible while building. */
.ad-slot { margin: var(--space-3) 0; }
.ad-slot:empty { min-height: 0; margin: 0; }
.ad-slot--dev {
  min-height: 90px;
  background: var(--color-badge-bg);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Responsive (section 9.3) -------------------------------------------- */
@media (max-width: 991px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  /* The hamburger lives in the white header on small screens, on the same
     row as the brand, with the state picker allowed to wrap beneath. */
  .topbar__inner { flex-wrap: wrap; }
  .brand { min-width: 0; }
  .nav-toggle { display: block; order: 0; margin-left: auto; }
  .state-picker { order: 1; }
  /* order: -1 puts the open menu at the top of the utility bar, directly
     under the button, instead of below the search box. */
  .nav { display: none; width: 100%; order: -1; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li { border-top: 1px solid var(--color-accent-tan-hover); }
  .nav a, .user-menu__button { display: block; padding: 12px 0; width: 100%; }
  .user-menu__panel { position: static; box-shadow: none; border: 0; min-width: 0; }
  .utilitybar__inner { align-items: flex-start; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  .card-grid { grid-template-columns: 1fr; }
  /* The home page's state and category cards are small enough to sit two-up.
     At 320px that leaves a ~141px column, so the media, type and padding all
     step down to match. The dashboard's scheme cards keep the single column. */
  .card-grid--compact { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .card-grid--compact .info-card { padding: var(--space-2); }
  .card-grid--compact .info-card__media { width: 56px; height: 56px; }
  .card-grid--compact .info-card__title { font-size: 0.875rem; }
  .card-grid--compact .info-card__leader { font-size: 0.6875rem; }
  .card-grid--compact .info-card__meta { font-size: 0.6875rem; line-height: 1.35; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .topbar__inner { flex-wrap: wrap; }
  /* flex-basis 0 stops the brand name from claiming a whole row and
     pushing the toggle onto the next line. */
  .brand { flex: 1 1 0; }
  .state-picker { flex: 1 0 100%; }
  .state-picker select { max-width: 100%; width: 100%; }
  .utilitybar__left { width: 100%; min-width: 0; }
  .searchbox { width: 100%; }
  .searchbox input[type="search"] { min-width: 0; flex: 1; }
  .assistant__chip { display: none; }
  /* Thirteen languages in one column need scrolling inside a small floating
     panel, which is awkward on a phone and gives no sign that the rest are
     there at all. Two columns fit them on one screen. */
  .lang-switcher.is-open .lang-switcher__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(320px, calc(100vw - 24px));
  }
  .lang-switcher__list button { padding: 10px var(--space-2); }
  .quickview-tab { padding: var(--space-2) 6px; font-size: 0.8125rem; }
}

/* =====================================================================
   Polish layer for the global chrome.
   ===================================================================== */

/* --- Top bar ---------------------------------------------------------- */
.topbar {
  border-bottom: 1px solid var(--color-border-soft);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  backdrop-filter: saturate(1.6) blur(8px);
  background: rgba(255, 255, 255, 0.92);
}
.topbar__inner { padding: 10px 15px; }
.brand { transition: opacity var(--speed) var(--ease); }
.brand:hover { opacity: 0.82; }
.brand__logo {
  box-shadow: 0 0 0 1px var(--color-border-soft), var(--shadow-card);
  transition: transform var(--speed) var(--ease);
}
.brand:hover .brand__logo { transform: scale(1.04); }
.brand__name { letter-spacing: -0.015em; }

.state-picker select {
  border-radius: var(--radius-pill);
  padding: 8px 34px 8px 14px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  cursor: pointer;
}
.state-picker select:hover { border-color: var(--color-border-strong); }
.state-picker select:focus { border-color: var(--color-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus) 16%, transparent); outline: none; }

/* --- Utility bar -------------------------------------------------------- */
.utilitybar {
  background: linear-gradient(180deg, var(--color-accent-tan-light) 0%, var(--color-accent-tan) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.searchbox input[type="search"] {
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  padding: 8px 16px;
  border-color: rgba(0, 0, 0, 0.1);
  transition: box-shadow var(--speed) var(--ease);
}
.searchbox input[type="search"]:focus { outline: none; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06); }
.searchbox button {
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  padding: 8px 18px;
  transition: background-color var(--speed) var(--ease);
}
.searchbox button:hover { background: #1f1f1f; }
.quicklinks a { transition: color var(--speed) var(--ease); }
.quicklinks a:hover { color: #000000; }

/* --- Navigation ---------------------------------------------------------- */
.nav a {
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.nav a:hover { background: rgba(0, 0, 0, 0.06); }
.nav a[aria-current="page"] { background: rgba(0, 0, 0, 0.08); }
.nav ul { gap: var(--space-1); }
.user-menu__button {
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  transition: background-color var(--speed) var(--ease);
}
.user-menu__button:hover { background: rgba(0, 0, 0, 0.06); }
.user-menu__panel { border-radius: var(--radius-md); box-shadow: var(--shadow-pop); overflow: hidden; }
.nav-toggle { border-radius: var(--radius-sm); transition: background-color var(--speed) var(--ease); }
.nav-toggle:hover { background: rgba(0, 0, 0, 0.06); }

/* --- Breadcrumb ----------------------------------------------------------- */
.breadcrumb a { color: var(--color-text-muted); transition: color var(--speed) var(--ease); }
.breadcrumb a:hover { color: var(--color-link); }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: linear-gradient(180deg, var(--color-accent-tan-light) 0%, var(--color-accent-tan) 100%); }
.site-footer a { transition: color var(--speed) var(--ease); }
.site-footer a:hover { color: #000000; }
.site-footer h3 { letter-spacing: -0.01em; }
.social-row a {
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
  box-shadow: var(--shadow-card);
}
.social-row a:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--color-border-strong); }
.footer-connect { background: #141414; }
.footer-connect .pill {
  border-radius: var(--radius-pill);
  border-color: rgba(255, 255, 255, 0.35);
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.footer-connect .pill:hover { background: rgba(255, 255, 255, 0.14); border-color: #ffffff; }
.footer-refs a {
  border-radius: var(--radius-pill);
  transition: box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.footer-refs a:hover { box-shadow: var(--shadow-card); border-color: var(--color-border-strong); }
.footer-legal { border-top: 1px solid rgba(0, 0, 0, 0.07); }

/* --- Floating widgets ------------------------------------------------------ */
.lang-switcher__tab {
  box-shadow: var(--shadow-hover);
  transition: padding-left var(--speed) var(--ease), background-color var(--speed) var(--ease);
}
.lang-switcher__tab:hover { background: var(--color-accent-tan-hover); padding-left: 16px; }
.lang-switcher__list { border-radius: 0 var(--radius-md) var(--radius-md) 0; box-shadow: var(--shadow-pop); }
.lang-switcher__list button { transition: background-color var(--speed) var(--ease); }

.assistant__button {
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  box-shadow: 0 6px 18px rgba(91, 62, 168, 0.34);
}
.assistant__button:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgba(91, 62, 168, 0.42); }
.assistant__panel { border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); border-color: var(--color-border-soft); }
.assistant__header { background: linear-gradient(135deg, #6b4bc0 0%, var(--assistant-purple) 100%); }
.assistant__suggestions button { transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease); }
.assistant__suggestions button:hover { background: var(--color-surface-sunken); border-color: var(--color-border-strong); }
.assistant__chip { box-shadow: var(--shadow-hover); }
.assistant__form input:focus { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--assistant-purple) 30%, transparent); }

.quickview-tab {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  box-shadow: -2px 2px 10px rgba(16, 24, 40, 0.18);
  transition: padding-right var(--speed) var(--ease), background-color var(--speed) var(--ease);
}
.quickview-tab:hover { padding-right: 12px; background: #1f1f1f; }
.quickview-modal { backdrop-filter: blur(2px); }
.quickview-modal__box { border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.quickview-modal li a { transition: background-color var(--speed) var(--ease), padding-left var(--speed) var(--ease); }
.quickview-modal li a:hover { padding-left: 22px; color: var(--color-link); }

/* Motion is decoration here. Anyone who asks for less gets none of it. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .info-card:hover,
  .stat-row__item:hover,
  .assistant__button:hover,
  .social-row a:hover { transform: none; }
}

/* --- Accent colour contrast -------------------------------------------
   The accent is now a saturated orange rather than a pale tan, so text
   sitting on it needs to be darker than the old muted grey, which fell to
   2.4:1 against it. These rules keep every accent surface above the WCAG
   AA 4.5:1 threshold for normal text. */
.utilitybar,
.site-footer,
.footer-refs,
.footer-legal { color: var(--color-on-accent); }

.utilitybar .quicklinks a,
.site-footer a,
.footer-refs a { color: var(--color-on-accent); }
.utilitybar .quicklinks a:hover,
.site-footer a:hover { color: #000000; }
.quicklinks .sep { color: rgba(33, 17, 6, 0.55); }

.footer-legal { color: rgba(33, 17, 6, 0.82); }
.footer-legal a { color: var(--color-on-accent); }
.footer-legal { border-top-color: rgba(33, 17, 6, 0.18); }

/* White surfaces sitting on the accent need a slightly firmer edge now. */
.footer-refs a { background: #ffffff; border-color: rgba(33, 17, 6, 0.18); }
.searchbox input[type="search"] { border-color: rgba(33, 17, 6, 0.18); }
.utilitybar { border-bottom-color: rgba(33, 17, 6, 0.16); }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(33, 17, 6, 0.1); }
.nav a { color: var(--color-on-accent); }
.nav a:hover, .nav a[aria-current="page"] { color: #000000; }
.user-menu__button { color: var(--color-on-accent); }
.user-menu__button:hover { background: rgba(33, 17, 6, 0.1); }
.nav-toggle { border-color: rgba(33, 17, 6, 0.45); }
.nav-toggle span { background: var(--color-on-accent); }
/* The toggle now sits on the white header, not the tan bar. */
.topbar .nav-toggle { border-color: var(--color-border); }
.topbar .nav-toggle span { background: var(--color-text); }
.nav li { border-top-color: rgba(33, 17, 6, 0.15); }

/* The logo chip used to sit on pale tan. On the saturated accent the
   emblem's own saffron bar muddies against it, so the chip gets a light
   tint of the accent and a thin ring instead of the flat accent fill. */
.brand__logo {
  background: color-mix(in srgb, var(--color-accent-tan) 18%, #ffffff);
  box-shadow: 0 0 0 1px rgba(33, 17, 6, 0.14), var(--shadow-card);
}
