/* =========================================
   components.css - shell chrome shared by every view
   Extracted verbatim from the pre-refactor style.css (QUO-34, OCW-5).
   Top nav, dynamic island, top layer, sidebar, theme toggle, content frame,
   advert ticker, dark section, effect layer, footer, app-grid modal, and the
   shared half of the <=768px block. Source order preserved exactly.
   ========================================= */

/* =========================================
   Top Navigation Bar & Dynamic Island (Completely Decoupled)
   ========================================= */
.top-nav {
  position: fixed;
  top: 8px; /* Clean elevation */
  left: 0;
  width: 100%;
  height: 48px; /* Fixed height: ensures icons NEVER move or shift */
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  pointer-events: none;
}

/* Standalone Dynamic Island Wrapper: Centered independently, zero layout coupling to icons */
.dynamic-island-wrapper {
  position: fixed;
  top: 8px;
  left: 0;
  width: 100%;
  height: 48px; /* Reference height matching nav for perfect alignment */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  pointer-events: none;
}

/* Navigation Icon Buttons */
.nav-icon-btn {
  pointer-events: auto;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  color: var(--nav-icon-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon-btn:hover {
  color: var(--nav-icon-hover-color);
  background: var(--nav-icon-hover-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-icon-btn:active {
  transform: scale(0.94);
  background: var(--nav-icon-hover-bg);
}

/* Dynamic Island Container */
.dynamic-island-container {
  pointer-events: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Dynamic Island Pill */
.dynamic-island {
  width: 210px;
  height: 35px;
  background-color: #000000;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: pointer;
  /* Smart snappy spring transition */
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Island Content */
.island-content {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

.default-content {
  justify-content: center;
  transition: opacity 0.2s ease;
}

/* OrderChaw text wordmark in the collapsed island (QUO-9).
   Placeholder for a logo image: swapping in <img class="wordmark-img">
   keeps the same centred slot, so layout logic never has to change. */
.wordmark {
  font-family: "Newsreader", Georgia, serif; /* matches the editorial serif used in sidebar nav */
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: #e5e7eb; /* same token as the island status label */
  white-space: nowrap;
  user-select: none;
  transition: opacity 0.2s ease;
}

.wordmark-img {
  height: 15px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* QUO-33 fix: the dynamic island is background-color: #000000 in BOTH site themes
   (no [data-theme="light"] override exists on .dynamic-island) — so the wordmark inside
   it must always be the white lockup, never swap with the site's light/dark toggle.
   The site theme and the island's own (always-black) background are independent things;
   QUO-22 wrongly tied the wordmark swap to the former instead of the latter. */
.wordmark-light {
  display: none;
}

.expanded-content {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0 16px;
  opacity: 0;
  pointer-events: none;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-badge .label {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Dynamic Island Expansion: Opens wide when hovered or tapped/touched, closes when cursor leaves or hand released */
.dynamic-island:hover,
.dynamic-island.expanded {
  width: 310px;
  height: 48px;
  border-radius: 24px;
  background-color: #050505;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.05);
}

.dynamic-island:hover .default-content,
.dynamic-island.expanded .default-content {
  opacity: 0;
}

.dynamic-island:hover .expanded-content,
.dynamic-island.expanded .expanded-content {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================
   1. Top Layer (Holds Sidebar & Content Frame in the SAME layer)
   ========================================= */
/* QUO-37 Mechanism 2: the scroll-driven four-app sequence pins this section.

   WHY THE PIN LIVES HERE AND NOT IN views/home.html, which is where QUO-37
   originally specced it. Measured on 487adea, not assumed: a position:sticky
   element inside the hero markup DOES NOT PIN AT ALL - it sat at top 69px at
   scroll 0 and top -631px at scroll 700, i.e. it scrolled away exactly like a
   static element. overflow:hidden does not only clip, it creates a SCROLL
   CONTAINER, and sticky pins to its nearest scrolling ancestor. #viewMount never
   scrolls (scrollHeight === clientHeight), so the sticky had zero scroll range
   and silently degraded to static - no error, no warning.

   There are TWO such layers, which is why setting #viewMount to overflow:visible
   alone did not fix it: #contentFrame (.content-frame) carries the same
   overflow-y:hidden, plus will-change:flex which creates a containing block for
   sticky descendants in some engines. Anything inside views/home.html therefore
   sits two clipping layers below the real page scroller.

   .top-layer is outside both, is already position:relative, and is already
   exactly viewport height - so this is a one-property change, and critically it
   leaves both overflow:hidden layers intact, which is what keeps Mechanism 1's
   guarantee that an expanded card cannot escape the frame.

   GATED, never global: the class is added by orbit.js only while the Home view is
   active AND prefers-reduced-motion is off. The About view must never inherit a
   pin built for Home's four-app sequence. Scope approved by Quomy on QUO-37. */
.page-container.has-scroll-sequence .top-layer {
  position: sticky;
  top: 0;
}

.top-layer {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding-top: 68px; /* Clearance below fixed top navigation */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}


/* QUO-37 (Mechanism 2): pin the hero section while the four-app sequence runs.
   HOME-SCOPED ON PURPOSE - the class is added by orbit.js, which only ever
   initialises on the Home view, and removed on teardown. .top-layer is shared
   with the About view, so setting this globally would give About a pin it must
   never have. Approved by Quomy under rule 6.
   The pin lives here rather than inside the hero markup because #viewMount and
   #contentFrame are both overflow-y:hidden, which makes them scroll containers
   and silently reduces any sticky descendant to static - see the long note in
   assets/js/orbit.js. */
.page-container.has-scroll-sequence .top-layer {
  position: sticky;
  top: 0;
}

/* Flex Row Container in the Same Layer */
.top-layer-wrapper {
  display: flex;
  width: 100%;
  flex: 1;
  padding: 0 10px;
  box-sizing: border-box;
  position: relative;
}

/* Sidebar: In document flow, scrolls away naturally with the top layer */
.app-sidebar {
  position: relative;
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin-right: 0;
  height: auto;
  min-height: calc(100vh - 80px);
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 2;
  /* Smart snappy spring transition */
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease, margin-right 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: width, opacity, margin-right;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  box-sizing: border-box;
}

/* Sidebar Open: Expands smoothly in the same plane */
body.sidebar-open .app-sidebar {
  width: 132px;
  opacity: 1;
  pointer-events: auto;
  margin-right: 10px;
  padding: 10px 6px;
}

/* Sidebar Navigation (Home and About) */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.sidebar-nav-item {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: "Newsreader", Georgia, serif; /* Anthropic Claude-style editorial serif */
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--sidebar-text);
  padding: 8px 14px;
  border-radius: 10px;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  width: 100%;
  user-select: none;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-hover-bg);
}

.sidebar-nav-item.active {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active-bg);
  font-weight: 600;
}

/* Sidebar Bottom Container: Pinned to the very bottom of the sidebar, far from Home and About */
.sidebar-bottom-wrap {
  margin-top: auto;
  padding: 24px 8px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.theme-toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 9999px;
  background: var(--toggle-track-bg);
  border: 1px solid var(--toggle-track-border);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.theme-toggle-switch:hover {
  border-color: var(--toggle-track-hover-border);
  transform: scale(1.03);
}

.theme-toggle-switch:active {
  transform: scale(0.96);
}

/* Sliding active thumb */
.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--toggle-thumb-bg);
  border: 1px solid var(--toggle-thumb-border);
  box-shadow: 0 2px 5px var(--toggle-thumb-shadow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* In Dark Mode: Thumb is on the Moon (right) */
:root .toggle-slider {
  transform: translateX(24px);
}

/* In Light Mode: Thumb is on the Sun (left) */
[data-theme="light"] .toggle-slider {
  transform: translateX(0);
}

.toggle-icon-wrap {
  position: relative;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.icon-sun-wrap {
  color: var(--toggle-sun-color);
}

.icon-moon-wrap {
  color: var(--toggle-moon-color);
}

/* Stiff Curved Content Frame: Flexes smoothly alongside sidebar */
.content-frame {
  position: relative;
  margin: 0;
  flex: 1;
  min-height: calc(100vh - 80px);
  border-top: 1.5px solid var(--border-content-frame);
  border-left: 1.5px solid var(--border-content-frame);
  border-right: 1.5px solid var(--border-content-frame);
  border-bottom: none; /* Open at bottom, flowing into middle layer */
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  background: transparent;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 0 var(--border-content-glow);
  overflow: hidden;
  /* Smart snappy flex adjustment */
  transition: flex 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  will-change: flex;
}

.top-layer-content {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* =========================================
   Slim Advert Ticker Bar (Between Layer 1 & Layer 2)
   ========================================= */
.advert-ticker-bar {
  width: 100%;
  height: 30px;
  background-color: var(--advert-bg);
  border-top: 1px solid var(--advert-border);
  border-bottom: 1px solid var(--advert-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
  user-select: none;
  z-index: 5;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.ticker-track {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  animation: marqueeScroll 22s linear infinite;
  will-change: transform;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.ticker-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--advert-text);
  text-transform: uppercase;
  padding: 0 4px;
  transition: color 0.25s ease;
}

.ticker-dot {
  font-size: 11px;
  color: var(--advert-dot);
  padding: 0 16px;
  transition: color 0.25s ease;
}

/* =========================================
   2. Dark Section (Black Layer in #060606 - Reduced Height)
   ========================================= */
.dark-section {
  position: relative;
  width: 100%;
  min-height: 50vh; /* Reduced balanced height as requested */
  background-color: var(--dark-section-bg);
  border: none; /* Completely borderless */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: background-color 0.25s ease;
}

.dark-section-content {
  flex: 1;
  width: 100%;
  padding: 30px 24px;
}

/* =========================================
   3. Second-to-Last Section (Restored Canvas / Effect Color)
   ========================================= */
.effect-layer {
  position: relative;
  width: 100%;
  min-height: 50vh; /* Sits before the footer, separating dark section from footer */
  background-color: var(--effect-layer-bg);
  border: none; /* Completely borderless */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: background-color 0.25s ease;
}

.effect-layer-content {
  flex: 1;
  width: 100%;
  padding: 30px 24px;
}

/* =========================================
   4. Footer Page (At Bottom under Effect Layer)
   ========================================= */
.app-footer {
  position: relative;
  width: 100%;
  min-height: 180px; /* Dedicated footer page */
  background-color: var(--footer-bg);
  border: none; /* Seamless borderless connection to the section above */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  transition: background-color 0.25s ease;
}

/* =========================================
   5. Mobile Responsiveness (<= 768px)
   ========================================= */
@media (max-width: 768px) {
  .top-nav {
    padding: 0 12px;
    height: 44px;
  }

  .dynamic-island-wrapper {
    top: 8px;
    height: 44px;
  }

  /* Compact dynamic island on mobile to fit nicely */
  .dynamic-island {
    width: 155px;
    height: 32px;
  }

  .dynamic-island:hover,
  .dynamic-island.expanded {
    width: 245px;
    height: 42px;
  }

  .status-badge .label {
    font-size: 12px;
  }

  /* Wordmark tracks the compact mobile island (QUO-9) */
  .wordmark {
    font-size: 13px;
  }

  .wordmark-img {
    height: 13px;
  }

  .top-layer {
    padding-top: 60px;
  }

  .top-layer-wrapper {
    padding: 0 8px;
    position: relative;
  }

  /* Sleek floating drawer on mobile */
  .app-sidebar {
    position: absolute;
    top: 0;
    left: 8px;
    bottom: 0;
    height: 100%;
    min-height: auto;
    z-index: 50;
    background: var(--sidebar-mobile-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--sidebar-mobile-border);
    border-radius: 18px;
    box-shadow: var(--sidebar-mobile-shadow);
    width: 0;
    opacity: 0;
    pointer-events: none;
    margin-right: 0;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.16s ease;
  }

  body.sidebar-open .app-sidebar {
    width: 144px;
    opacity: 1;
    pointer-events: auto;
    padding: 14px 10px;
  }

  /* Full screen width content frame on mobile */
  .content-frame {
    width: 100%;
    flex: 1;
    min-height: calc(100vh - 72px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  .advert-ticker-bar {
    height: 28px;
  }

  .ticker-text {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .dark-section {
    min-height: 40vh;
  }

  .effect-layer {
    min-height: 40vh;
  }

  .app-footer {
    min-height: 140px;
  }
}

/* =========================================
   6. App Grid Pop-up Modal (Empty Dialog)
   ========================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  /* Lightened frosted overlay so background & globe remain clearly visible! */
  background: var(--modal-backdrop-bg);
  backdrop-filter: blur(var(--modal-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--modal-backdrop-blur));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  width: min(90vw, 440px);
  min-height: 280px;
  background-color: var(--modal-dialog-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--modal-dialog-border);
  border-radius: 24px;
  box-shadow: var(--modal-dialog-shadow);
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--modal-close-bg);
  border: 1px solid var(--modal-close-border);
  color: var(--modal-close-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--modal-close-border);
  color: var(--nav-icon-hover-color);
  transform: scale(1.05);
}

.modal-close-btn:active {
  transform: scale(0.95);
}

.modal-body {
  flex: 1;
  width: 100%;
  min-height: 200px;
  /* Empty modal interior as requested */
}

/* ---- QUO-32 / OCW-21: App Grid tiles inside .modal-body ----
   Appended after the modal section; nothing above is edited. Monochrome,
   base.css tokens only, no literal hex. Each tile = a routing <button> plus a
   row of two store links (an <a> cannot live inside a <button>). */
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  /* clears the absolutely positioned close button (top 16px + 32px) */
  margin-top: 36px;
}

.app-grid-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--modal-dialog-border);
  border-radius: 16px;
  background: var(--modal-close-bg);
  overflow: hidden;
  transition: border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-grid-tile:hover {
  border-color: var(--border-content-frame);
  transform: translateY(-2px);
}

.app-grid-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 16px 12px;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-grid-open:hover { background: var(--nav-icon-hover-bg); }
.app-grid-open:active { transform: scale(0.98); }

.app-grid-open:focus-visible,
.app-grid-store:focus-visible,
.store-badge:focus-visible {
  outline: 2px solid var(--sidebar-active-text);
  outline-offset: 2px;
}

/* Matthew's own app icons, backgrounds kept. Rounded like a home-screen icon;
   the hairline keeps the black-background icons from dissolving into a dark
   dialog. */
.app-grid-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 22%;
  box-shadow: 0 0 0 1px var(--modal-dialog-border);
  object-fit: cover;
  display: block;
}

.app-grid-name {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sidebar-text);
}

.app-grid-headline {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--sidebar-active-text);
}

/* Compact store links on each tile: glyph only, full label in aria-label.
   44px tall to meet the tap-target guideline. */
.app-grid-stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 12px 12px;
}

.app-grid-store {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1px solid var(--modal-dialog-border);
  border-radius: 10px;
  color: var(--sidebar-active-text);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.app-grid-store:hover {
  background: var(--nav-icon-hover-bg);
  border-color: var(--border-content-frame);
}

.app-grid-store-glyph { width: 18px; height: 18px; }

/* ---- Store badges on the four app pages (full label) ---- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(20px, 3vh, 28px);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--border-content-frame);
  border-radius: 12px;
  background: var(--dark-section-bg);
  color: var(--sidebar-active-text);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.store-badge:hover {
  border-color: var(--modal-dialog-border);
  background: var(--nav-icon-hover-bg);
  transform: translateY(-1px);
}

.store-badge-glyph { width: 22px; height: 22px; flex: 0 0 auto; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge-small { font-size: 0.64rem; letter-spacing: 0.02em; color: var(--sidebar-text); }
.store-badge-big { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }

/* ---- Mobile: the dialog was too see-through over the hero and globe
   (Matthew, 2026-09-23). Solid dialog surface plus a stronger backdrop blur,
   both from existing tokens / values, mobile only. ---- */
@media (max-width: 768px) {
  .modal-dialog {
    background-color: var(--dark-section-bg);
  }
  .modal-backdrop {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-grid-tile,
  .app-grid-open,
  .store-badge { transition: none; }
  .app-grid-tile:hover,
  .app-grid-open:active,
  .store-badge:hover { transform: none; }
}

@media (max-width: 420px) {
  .app-grid { gap: 10px; }
  .app-grid-open { padding: 14px 12px 10px; }
  .app-grid-stores { padding: 0 10px 10px; }
  .app-grid-headline { font-size: 0.9rem; }
  .app-grid-icon { width: 40px; height: 40px; }
}

/* =========================================
   QUO-14 / OCW-7: Footer content
   Lives inside the existing .app-footer shell (rules above not edited; the
   shell's flex centring simply centres .footer-inner). Tokens only.
   ========================================= */
.footer-inner {
  width: min(100%, 1080px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vh, 44px);
  padding: clamp(12px, 3vh, 28px) 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: clamp(28px, 5vw, 64px);
}

.footer-wordmark { display: block; height: 22px; width: auto; margin-bottom: 16px; }

.footer-tagline {
  margin: 0;
  max-width: 38ch;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--sidebar-text);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col-title {
  margin: 0 0 14px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sidebar-text);
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  color: var(--sidebar-active-text);
  text-decoration: none;
  cursor: pointer;
  opacity: 0.86;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-link:hover { opacity: 1; }

.footer-link:focus-visible,
.footer-social-link:focus-visible { outline: 2px solid var(--sidebar-active-text); outline-offset: 3px; border-radius: 6px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border-content-frame);
}

.footer-region {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-content-frame);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--sidebar-text);
}

.footer-social { display: flex; gap: 10px; }

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-content-frame);
  border-radius: 50%;
  color: var(--sidebar-text);
  transition: color 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-social-link:hover { color: var(--sidebar-active-text); border-color: var(--sidebar-text); }

.footer-copy { margin: 0; font-size: 0.8rem; color: var(--sidebar-text); }

@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-link, .footer-social-link { transition: none; }
}
