/**
 * CryptoQuotes - Chronicle design system
 * Distinctive editorial layer + light/dark tokens + utilities
 */

:root {
  --flare-coral: #ff8b73;
}

/* --- Light theme tokens (inherit into components that use var(--*)) --- */
html[data-theme="light"] {
  --bg: #f2f0ea;
  --bg-soft: #e8e6e0;
  --bg-card: rgba(255, 255, 255, 0.88);
  --text: #14121a;
  --muted: #5c5668;
  --accent: #c45c4a;
  --accent-2: #6d4aa6;
  --accent-cool: #0d9488;
  --border: rgba(20, 18, 26, 0.1);
  --border-strong: rgba(20, 18, 26, 0.16);
  --glow: 0 24px 56px rgba(20, 18, 26, 0.08);
  --flare-cyan: #0d9488;
  --flare-magenta: #9333ea;
  --flare-amber: #d97706;
  --flare-rose: #e11d48;
  --violet: #7c3aed;
  --hot: #ea580c;
  --lime: #16a34a;
  --pink: #db2777;
  --flare-coral: #c45c4a;
  --cq-link: #0f766e;
  --cq-link-hover: #0d9488;
  --cq-link-visited: #5b21b6;
  --cq-link-active: var(--accent);
  --cq-link-underline: rgba(13, 148, 136, 0.38);
  --cq-link-underline-hover: rgba(13, 148, 136, 0.75);
}

html[data-theme="light"] body.site-body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] .ambient-bg {
  background:
    radial-gradient(48rem 28rem at 4% 0%, rgba(13, 148, 136, 0.12), transparent 72%),
    radial-gradient(44rem 26rem at 96% 6%, rgba(147, 51, 234, 0.1), transparent 70%),
    radial-gradient(52rem 32rem at 50% 100%, rgba(217, 119, 6, 0.08), transparent 76%),
    radial-gradient(38rem 22rem at 70% 40%, rgba(225, 29, 72, 0.06), transparent 72%);
}

html[data-theme="light"] .noise-overlay {
  opacity: 0.035;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(20, 18, 26, 0.2) 0.35px, transparent 0.4px),
    radial-gradient(circle at 78% 62%, rgba(20, 18, 26, 0.15) 0.35px, transparent 0.4px);
}

html[data-theme="light"] .site-gridfx {
  opacity: 0.035;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 71px,
    rgba(20, 18, 26, 0.12) 71px,
    rgba(20, 18, 26, 0.12) 72px
  );
}

html[data-theme="light"] .site-header {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 45%),
    rgba(242, 240, 234, 0.82);
}

html[data-theme="light"] .top-ribbon {
  border-bottom-color: var(--border);
}

html[data-theme="light"] .top-ribbon__tagline {
  color: rgba(20, 18, 26, 0.82);
  text-shadow: none;
}

html[data-theme="light"] .ribbon-pill {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}

html[data-theme="light"] .mobile-drawer {
  background:
    linear-gradient(165deg, rgba(13, 148, 136, 0.08), transparent 35%),
    rgba(255, 255, 255, 0.98);
}

html[data-theme="light"] .site-footer {
  background:
    linear-gradient(180deg, rgba(13, 148, 136, 0.06), transparent 40%),
    rgba(232, 230, 224, 0.95);
}

html[data-theme="light"] .quote-card,
html[data-theme="light"] .card {
  background: var(--bg-card);
}

html[data-theme="light"] .meta-list strong {
  color: rgba(20, 18, 26, 0.92);
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
  border: 2px solid rgba(242, 240, 234, 0.95);
}

html[data-theme="light"] ::-webkit-scrollbar-track {
  background: rgba(232, 230, 224, 0.95);
}

:focus-visible {
  outline: 2px solid var(--flare-cyan);
  outline-offset: 3px;
}

button:focus-visible,
.nav-search__submit:focus-visible {
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Editorial grid (signature texture) --- */
.site-gridfx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 71px,
    rgba(247, 246, 244, 0.14) 71px,
    rgba(247, 246, 244, 0.14) 72px
  );
  mask-image: radial-gradient(ellipse 90% 70% at 50% -10%, #000 0%, transparent 65%);
}

/* --- Ribbon pills --- */
.ribbon-pill {
  display: inline-block;
  padding: 0.12rem 0.38rem;
  border-radius: 0.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(34, 211, 238, 0.12);
  color: var(--flare-cyan);
}

/* --- Nav search --- */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 1 min(12.25rem, 28vw);
  min-width: 10rem;
  max-width: min(12.25rem, 34vw);
  margin-left: auto;
  margin-right: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-search:focus-within {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

html[data-theme="light"] .nav-search {
  background: rgba(255, 255, 255, 0.75);
}

/* Ribbon holds search on desktop; this duplicate form is only for narrow viewports */
@media (min-width: 961px) {
  .nav-search.nav-search--mobile {
    display: none;
  }
}

.nav-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  padding: 0.3rem 0.55rem;
}

.nav-search__input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.nav-search__input:focus {
  outline: none;
}

.nav-search__submit {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 1.9rem;
  border: none;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(232, 121, 249, 0.15));
  color: var(--text);
  cursor: pointer;
  transition: filter 0.2s ease;
}

.nav-search__submit:hover {
  filter: brightness(1.1);
}

.nav-search__submit iconify-icon {
  font-size: 0.92rem;
}

/* --- Theme toggle --- */
.nav-trailing .theme-toggle {
  margin-left: 0;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  margin-left: 0.2rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: rgba(232, 121, 249, 0.4);
  transform: scale(1.04);
}

.theme-toggle iconify-icon {
  font-size: 1.08rem;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

html[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

html[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  margin: 0 0 1.25rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--muted);
  font-weight: 400;
  opacity: 0.65;
}

.breadcrumbs__link {
  color: var(--muted);
  text-decoration: none;
  padding: 0.15rem 0.28rem;
  margin: -0.15rem -0.28rem;
  border-radius: 0.35rem;
  transition:
    color 0.2s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.breadcrumbs__link:hover {
  color: var(--cq-link);
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15);
}

.breadcrumbs__link:focus-visible {
  outline: 2px solid var(--flare-cyan);
  outline-offset: 2px;
}

.breadcrumbs__current {
  color: var(--text);
}

/* --- Hero Chronicle: same flat treatment as .hero --- */
.hero--chronicle {
  box-shadow: none;
  border: none;
  border-radius: 0;
  background: none;
}

/* --- Quote page hero --- */
.quote-main--feature {
  position: relative;
  overflow: hidden;
}

.quote-main--feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--flare-cyan), var(--flare-magenta), var(--flare-amber));
  border-radius: 2px;
  opacity: 0.85;
}

.quote-page__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.62;
  letter-spacing: -0.015em;
  color: rgba(247, 246, 244, 0.98);
}

html[data-theme="light"] .quote-page__title {
  color: rgba(20, 18, 26, 0.94);
}

.ai-disclaimer {
  margin: 1rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* --- Content pages (About, etc.) --- */
.page-hero {
  margin-bottom: 1.5rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  line-height: 1.1;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.pillar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
  background: var(--bg-card);
  box-shadow: var(--glow);
  transition: transform 0.25s var(--ease-out-expo), border-color 0.25s ease;
}

.pillar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.25);
}

.pillar-card h2 {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--flare-cyan);
}

.pillar-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

/* --- Mobile nav layout --- */
@media (max-width: 960px) {
  :root {
    --cq-reels-below-header: clamp(4.85rem, 22vw, 6.25rem);
  }

  body.page--reels {
    --reels-header-pad: var(--cq-reels-below-header);
  }

  /* Ribbon (tagline + desktop search) - desktop only */
  .top-ribbon--desktop-only {
    display: none !important;
  }

  .nav-sticky {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand trailing"
      "search search";
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0;
  }

  .nav-sticky .nav-brand-wrap {
    grid-area: brand;
    order: unset;
  }

  .nav-sticky .nav-trailing {
    grid-area: trailing;
    order: unset;
  }

  .nav-sticky .nav-menu {
    display: none;
    order: unset;
  }

  .nav-search--mobile {
    grid-area: search;
    display: none;
    max-width: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    flex: none;
  }

  .nav-sticky.nav-search-is-open .nav-search--mobile {
    display: flex;
    margin-top: 11px;
  }

  .nav-brand-wrap {
    min-width: 0;
  }

  .nav-trailing {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.32rem;
    flex-shrink: 0;
  }

  /* Menu · search · theme - same footprint */
  .nav-trailing .mobile-menu-toggle,
  .nav-trailing .nav-search-toggle,
  .nav-trailing .theme-toggle {
    display: inline-grid;
    width: 40px;
    height: 40px;
    margin: 0;
    flex-shrink: 0;
  }

  .nav-trailing .mobile-menu-toggle iconify-icon,
  .nav-trailing .nav-search-toggle iconify-icon,
  .nav-trailing .theme-toggle iconify-icon {
    font-size: 1.14rem;
  }

  .nav-search-toggle {
    display: inline-grid;
  }

  .nav-search-toggle[aria-expanded="true"] {
    border-color: rgba(34, 211, 238, 0.5);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(232, 121, 249, 0.12));
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
  }

  html[data-theme="light"] .nav-search-toggle[aria-expanded="true"] {
    border-color: rgba(13, 148, 136, 0.45);
    background: rgba(13, 148, 136, 0.12);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
  }

  .quote-page__title {
    font-size: 1.08rem;
    line-height: 1.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pillar-card:hover,
  .theme-toggle:hover {
    transform: none;
  }
}

/* =============================================================================
   Light theme - finish pass (surfaces, no heavy borders, calmer motion)
   ============================================================================= */

html[data-theme="light"] ::selection {
  background: rgba(13, 148, 136, 0.22);
  color: var(--text);
}

html[data-theme="light"] .site-header {
  animation: none;
  box-shadow: 0 1px 0 rgba(20, 18, 26, 0.05);
}

html[data-theme="light"] .site-header::after {
  height: 1px;
  opacity: 0.55;
  animation: none;
}

html[data-theme="light"] .header-beam {
  opacity: 0.25;
  animation: none;
}

html[data-theme="light"] .top-ribbon {
  animation: none;
  background: linear-gradient(
    105deg,
    rgba(13, 148, 136, 0.09) 0%,
    rgba(147, 51, 234, 0.06) 50%,
    rgba(217, 119, 6, 0.07) 100%
  );
  background-size: 100% 100%;
}

html[data-theme="light"] .nav-search:focus-within {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .nav-search__submit {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.18), rgba(147, 51, 234, 0.12));
}

html[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .nav-search-toggle {
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .nav-menu a {
  color: rgba(20, 18, 26, 0.78);
}

html[data-theme="light"] .nav-menu a:hover,
html[data-theme="light"] .nav-menu a.is-active {
  background: rgba(13, 148, 136, 0.1);
  box-shadow: none;
  color: var(--text);
}

html[data-theme="light"] .nav-menu a.is-active {
  color: #0f766e;
  text-shadow: none;
}

html[data-theme="light"] .nav-menu {
  border-top-color: rgba(20, 18, 26, 0.08);
}

html[data-theme="light"] .nav-menu a:hover,
html[data-theme="light"] .nav-menu a.is-active {
  box-shadow: none;
}

html[data-theme="light"] .mobile-menu-toggle:hover {
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .mobile-drawer-backdrop {
  background: rgba(20, 18, 26, 0.35);
}

html[data-theme="light"] .mobile-drawer-nav a {
  color: rgba(20, 18, 26, 0.88);
  background: rgba(13, 148, 136, 0.04);
}

html[data-theme="light"] .mobile-drawer-nav a:hover {
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.1);
}

/* Hero: flat in light (no card / shadow - matches dark) */
html[data-theme="light"] .hero,
html[data-theme="light"] .hero--chronicle {
  border: none;
  border-radius: 0;
  animation: none;
  background: none;
  box-shadow: none;
}

html[data-theme="light"] .hero h1 {
  color: #14121a;
  background: none;
  -webkit-text-fill-color: currentColor;
  -webkit-background-clip: unset;
  background-clip: border-box;
  filter: none;
}

html[data-theme="light"] .hero h2 {
  color: #1e1b2e;
  text-shadow: none;
}

html[data-theme="light"] .hero-chips span {
  border: 1px solid rgba(20, 18, 26, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  color: #252230;
}

html[data-theme="light"] .hero-chips span iconify-icon {
  color: #0f766e;
  opacity: 1;
}

html[data-theme="light"] .hero-chips span:hover {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.12);
  color: #14121a;
}

html[data-theme="light"] .quote-day-spotlight {
  border: 1px solid rgba(20, 18, 26, 0.08);
  animation: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 32px rgba(20, 18, 26, 0.05);
}

html[data-theme="light"] .spotlight-label {
  text-shadow: none;
  color: #0f766e;
}

html[data-theme="light"] .quote-day-spotlight blockquote {
  color: #1a1628;
}

/* Cards & grid - float on paper, no hard rims */
html[data-theme="light"] .card,
html[data-theme="light"] .quote-card {
  border: none !important;
  background: #ffffff;
  box-shadow:
    0 12px 40px rgba(20, 18, 26, 0.06),
    0 0 0 1px rgba(20, 18, 26, 0.04);
  backdrop-filter: none;
}

html[data-theme="light"] .card:hover,
html[data-theme="light"] .quote-card:hover {
  box-shadow:
    0 20px 56px rgba(20, 18, 26, 0.1),
    0 0 0 1px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .quotes-grid > article.quote-card:nth-of-type(3n + 1),
html[data-theme="light"] .quotes-grid > article.quote-card:nth-of-type(3n + 2),
html[data-theme="light"] .quotes-grid > article.quote-card:nth-of-type(3n + 3) {
  background: #ffffff;
}

html[data-theme="light"] .quote-card blockquote {
  color: #1f1c2e;
}

html[data-theme="light"] .quote-card__bodylink:hover blockquote,
html[data-theme="light"] .quote-card__bodylink:focus-visible blockquote {
  color: #0f766e;
}

html[data-theme="light"] .qotd-archive-row__snippet {
  border-bottom-color: rgba(20, 18, 26, 0.18);
}

html[data-theme="light"] .quote-author {
  color: var(--muted);
}

html[data-theme="light"] .author-thumb {
  border-color: rgba(20, 18, 26, 0.12);
  background: rgba(20, 18, 26, 0.04);
}

html[data-theme="light"] .author-thumb__initials {
  color: rgba(20, 18, 26, 0.78);
}

html[data-theme="light"] .page-link {
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(20, 18, 26, 0.06);
  color: #3a3548;
}

html[data-theme="light"] .page-link:hover,
html[data-theme="light"] .page-link.is-active {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.15);
  color: #14121a;
}

html[data-theme="light"] .quote-badge {
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.4);
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.28), rgba(251, 113, 133, 0.14));
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.12);
}

html[data-theme="light"] .quote-signal {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.45);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.18), rgba(147, 51, 234, 0.12));
}

html[data-theme="light"] .quote-badge--category {
  color: #5b21b6;
  border-color: rgba(124, 58, 237, 0.38);
  background: linear-gradient(120deg, rgba(196, 181, 253, 0.5), rgba(167, 243, 208, 0.32));
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.1);
}

html[data-theme="light"] .quote-badge--category iconify-icon {
  color: #6d28d9;
}

html[data-theme="light"] .quote-badge--hot {
  color: #7f1d1d;
  border-color: rgba(220, 38, 38, 0.45);
  background: linear-gradient(120deg, rgba(254, 202, 202, 0.95), rgba(254, 243, 199, 0.85));
  box-shadow: 0 2px 14px rgba(220, 38, 38, 0.2);
}

html[data-theme="light"] .quote-badge--hot iconify-icon {
  color: #b91c1c;
}

html[data-theme="light"] .ai-insight-item {
  border: none;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 28px rgba(20, 18, 26, 0.05);
}

html[data-theme="light"] .ai-insight-item p {
  color: rgba(20, 18, 26, 0.88);
}

html[data-theme="light"] .ai-empty-state {
  border: 1px dashed rgba(20, 18, 26, 0.12);
  background: rgba(255, 255, 255, 0.5);
}

html[data-theme="light"] .personality-card {
  border: none;
  background: #fff;
  box-shadow: 0 12px 40px rgba(20, 18, 26, 0.06);
}

html[data-theme="light"] .social-links a {
  border: 1px solid rgba(20, 18, 26, 0.1);
  background: rgba(13, 148, 136, 0.1);
  color: rgba(20, 18, 26, 0.88);
  font-weight: 600;
}

html[data-theme="light"] .social-links a:hover {
  color: rgba(20, 18, 26, 0.95);
  border-color: rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.14);
}

html[data-theme="light"] .site-footer {
  animation: none;
  border-top: none;
  box-shadow: 0 -24px 60px rgba(20, 18, 26, 0.04);
}

html[data-theme="light"] .footer-heart svg {
  fill: #7c3aed;
  filter: drop-shadow(0 0 5px rgba(124, 58, 237, 0.28));
}

html[data-theme="light"] .site-footer::before {
  animation: none;
  opacity: 0.5;
}

html[data-theme="light"] .footer-aurora__orb {
  animation: none;
  opacity: 0.35;
}

html[data-theme="light"] .footer-title {
  color: #000;
  font-weight: 700;
  text-shadow: none;
}

html[data-theme="light"] .site-footer a:hover {
  text-shadow: none;
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.22);
}

html[data-theme="light"] .breadcrumbs__link:hover {
  background: rgba(13, 148, 136, 0.1);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.18);
}

html[data-theme="light"] .quote-source:hover {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.28);
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.12);
}

html[data-theme="light"] .quote-source:hover iconify-icon {
  color: #0f766e;
}

html[data-theme="light"] .footer-explore-nav a:hover {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.22);
}

html[data-theme="light"] .site-footer nav.footer-community a {
  color: rgba(20, 18, 26, 0.82);
  background: rgba(13, 148, 136, 0.08);
  border-color: rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .site-footer nav.footer-community a:hover {
  color: rgba(20, 18, 26, 0.92);
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.22);
}

html[data-theme="light"] .quote-day-spotlight a:hover {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.1);
}

html[data-theme="light"] .qotd-archive-row__link:hover {
  background: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.18);
}

html[data-theme="light"] .quote-full {
  color: #1f1c2e;
}

html[data-theme="light"] .meta-list li {
  border-bottom-color: rgba(20, 18, 26, 0.08);
}

html[data-theme="light"] .share-actions a,
html[data-theme="light"] .share-actions button {
  border: 1px solid rgba(20, 18, 26, 0.12);
  background: #ffffff;
  color: #252230;
  box-shadow: 0 2px 10px rgba(20, 18, 26, 0.06);
}

html[data-theme="light"] .share-actions a iconify-icon,
html[data-theme="light"] .share-actions button iconify-icon {
  color: #0f766e;
  opacity: 1;
}

html[data-theme="light"] .share-actions a:hover,
html[data-theme="light"] .share-actions button:hover {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.08);
  color: #14121a;
}

html[data-theme="light"] .share-actions a:hover iconify-icon,
html[data-theme="light"] .share-actions button:hover iconify-icon {
  color: #0d9488;
}

/* Quote page - sidebar rail */
.quote-sidebar--rail {
  gap: 1.1rem;
}

/* Main quote article: no “card lift” hover */
.quote-main.card:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--glow);
}

html[data-theme="light"] .quote-main.card:hover {
  box-shadow:
    0 24px 64px rgba(20, 18, 26, 0.09),
    0 0 0 1px rgba(20, 18, 26, 0.04);
}

.widget-surface {
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--glow);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .widget-surface {
  border: none;
  background: #ffffff;
  box-shadow:
    0 16px 48px rgba(20, 18, 26, 0.08),
    0 0 0 1px rgba(20, 18, 26, 0.04);
  backdrop-filter: none;
}

.widget-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.widget-heading iconify-icon {
  font-size: 1.1rem;
  color: var(--flare-cyan);
  opacity: 0.9;
}

.widget-lede {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.meta-list--clean li {
  border-bottom-style: solid;
  border-bottom-width: 1px;
  padding-bottom: 0.42rem;
}

.share-actions--compact a,
.share-actions--compact button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-actions--compact iconify-icon {
  font-size: 1.15rem;
  opacity: 0.88;
}

.quote-source--cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(232, 121, 249, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.1);
}

.quote-source--cta:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(232, 121, 249, 0.16));
  border-color: rgba(34, 211, 238, 0.5) !important;
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.15);
}

html[data-theme="light"] .quote-source--cta {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(147, 51, 234, 0.08));
  border: none;
}

html[data-theme="light"] .quote-main.card.quote-main--feature {
  border: none !important;
  background: linear-gradient(180deg, #ffffff 0%, #faf9f6 100%);
  box-shadow:
    0 24px 64px rgba(20, 18, 26, 0.09),
    0 0 0 1px rgba(20, 18, 26, 0.04);
  backdrop-filter: none;
}

html[data-theme="light"] .quote-main--feature::before {
  opacity: 1;
  width: 3px;
}

html[data-theme="light"] .ai-insight-panel {
  border-top-color: rgba(20, 18, 26, 0.08);
}

html[data-theme="light"] .pillar-card {
  border: none;
  box-shadow: 0 12px 36px rgba(20, 18, 26, 0.07);
}

html[data-theme="light"] .pillar-card:hover {
  border-color: transparent;
  box-shadow: 0 18px 48px rgba(20, 18, 26, 0.1);
}

/* Find My Quote - light paper board */
html[data-theme="light"] .fmq {
  --fmq-sand: #0d9488;
  --fmq-sand-dim: rgba(13, 148, 136, 0.35);
  --fmq-paper: #14121a;
  --fmq-ink: #3d3848;
  --fmq-ink-soft: #6b6575;
  --fmq-panel: rgba(255, 255, 255, 0.97);
  --fmq-panel-edge: rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .fmq-hero__title em {
  color: #0f766e;
}

html[data-theme="light"] .fmq-canvas {
  border: none;
  background: linear-gradient(165deg, #ffffff 0%, #f5f3ee 100%);
  box-shadow:
    0 24px 64px rgba(20, 18, 26, 0.08),
    0 0 0 1px rgba(20, 18, 26, 0.05);
}

html[data-theme="light"] .fmq-rail {
  background: rgba(13, 148, 136, 0.06);
  border-right-color: rgba(20, 18, 26, 0.08);
}

html[data-theme="light"] .fmq-rail__ticks li {
  background: rgba(20, 18, 26, 0.06);
  border-color: rgba(20, 18, 26, 0.08);
}

html[data-theme="light"] .fmq-rail__ticks li.is-active {
  background: #fff;
  border-color: var(--fmq-sand);
  box-shadow: 0 0 16px rgba(13, 148, 136, 0.25);
}

html[data-theme="light"] .fmq-progress__bar {
  background: rgba(20, 18, 26, 0.06);
}

html[data-theme="light"] .fmq-ring__track {
  stroke: rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .fmq-choice {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(20, 18, 26, 0.08);
  color: var(--fmq-ink);
}

html[data-theme="light"] .fmq-choice:hover,
html[data-theme="light"] .fmq-choice:focus-visible {
  background: rgba(13, 148, 136, 0.06);
  border-color: rgba(13, 148, 136, 0.35);
}

html[data-theme="light"] .fmq-q {
  color: var(--fmq-paper);
}

html[data-theme="light"] .fmq-outcome__quote {
  color: #14121a;
}

html[data-theme="light"] .fmq-hint kbd {
  color: #14121a;
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .fmq-btn--solid {
  background: #0d9488;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .fmq-btn--solid:hover {
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.3);
}

html[data-theme="light"] .fmq-btn--line {
  color: var(--fmq-ink);
}

html[data-theme="light"] .fmq-btn--line:hover {
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.35);
}

html[data-theme="light"] .fmq-outcome__again:hover {
  color: var(--fmq-paper);
  background: rgba(13, 148, 136, 0.06);
}

/* --- SEO internal linking (topic strip + footer explore) --- */
.seo-topic-strip {
  max-width: var(--layout-max);
  margin: 1.75rem auto 0;
  padding: 0;
}

.seo-topic-strip__inner {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.05rem 1.05rem;
  background: var(--bg-card);
  box-shadow: var(--glow);
}

.seo-topic-strip__kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

h2.seo-topic-strip__kicker {
  margin-top: 0;
  line-height: 1.25;
}

.seo-context-links__title {
  margin: 0 0 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.3;
}

.seo-topic-strip__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
}

.seo-topic-strip__a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cq-link);
  text-decoration: none;
  padding: 0.12rem 0;
  border-bottom: none;
  transition: color 0.2s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.seo-topic-strip__a:hover {
  color: var(--cq-link-hover);
}

.seo-topic-strip__a:focus-visible {
  outline: 2px solid var(--flare-cyan);
  outline-offset: 3px;
  border-radius: 0.2rem;
}

.footer-explore-nav {
  display: grid;
  gap: 0.42rem 0.55rem;
  grid-template-columns: 1fr 1fr;
}

.footer-explore-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(244, 243, 240, 0.82);
  text-decoration: none;
  padding: 0.22rem 0.38rem;
  margin: -0.22rem -0.38rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  transition:
    color 0.22s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.footer-explore-nav a:hover {
  color: var(--cq-link-hover);
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.2);
  transform: translateX(3px);
}

.footer-explore-nav a:focus-visible {
  outline: 2px solid var(--flare-cyan);
  outline-offset: 2px;
}

.footer-explore-nav iconify-icon {
  font-size: 1rem;
  opacity: 0.88;
}

html[data-theme="light"] .seo-topic-strip__inner {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .qotd-scratch__reveal-btn {
  color: var(--cq-link);
}

html[data-theme="light"] .quotes-feed-section__heading,
html[data-theme="light"] .authors-directory__title,
html[data-theme="light"] .qotd-archive__list-heading,
html[data-theme="light"] .qotd-page__section-title,
html[data-theme="light"] .faq-main__title,
html[data-theme="light"] .terms-main__title,
html[data-theme="light"] .quote-related-block__head h2 {
  color: var(--text);
}

/* Beat main.css .hero h2 (higher specificity) so Related quotes is readable in light theme */
html[data-theme="light"] .quote-related-block__head h2#related-quotes-heading,
html[data-theme="light"] .quote-related-block__head h2.quote-related-block__title {
  color: var(--text);
  -webkit-text-fill-color: currentColor;
}

html[data-theme="light"] .seo-topic-strip__a {
  color: var(--cq-link);
}

html[data-theme="light"] .seo-topic-strip__a:hover {
  color: var(--cq-link-hover);
}

html[data-theme="light"] .footer-explore-nav a {
  color: var(--text);
}

/* Quote page: votes + views */
.quote-vote-row {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.quote-vote-row--compact {
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.quote-vote-row--compact .quote-vote-btn {
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
}

.quote-vote-row--compact .quote-vote-btn iconify-icon {
  font-size: 1rem;
}

.quote-vote-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quote-vote-btn:hover {
  border-color: var(--cq-link);
}

.quote-vote-btn--up:hover {
  color: var(--lime);
}

.quote-vote-btn--down:hover {
  color: var(--flare-rose);
}

.quote-vote-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.quote-vote-btn__n {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.quote-views-stat {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
}

.quote-views-stat iconify-icon {
  vertical-align: -0.15em;
  margin-right: 0.25rem;
}

html[data-theme="dark"] .quote-vote-btn {
  background: rgba(255, 255, 255, 0.06);
}

/* Light + touch: override sticky :hover after tap (Android). */
@media (hover: none) {
  html[data-theme="light"] .site-footer a:hover {
    color: var(--muted);
    background: transparent;
    border-color: transparent;
    text-shadow: none;
    transform: none;
  }

  html[data-theme="light"] .site-footer nav.footer-community a:hover {
    color: rgba(20, 18, 26, 0.82);
    background: rgba(13, 148, 136, 0.08);
    border-color: rgba(20, 18, 26, 0.1);
  }

  html[data-theme="light"] .site-footer a:hover iconify-icon:not(.footer-community__icon) {
    transform: none;
    color: inherit;
  }

  html[data-theme="light"] .site-footer nav.footer-community a:hover .footer-community__icon[icon="simple-icons:tiktok"] {
    transform: translate(-0.1rem, -0.08rem);
  }

  html[data-theme="light"] .site-footer nav.footer-community a:hover .footer-community__icon[icon="mdi:instagram"] {
    transform: translate(0, 0.06rem);
  }

  html[data-theme="light"] .site-footer nav.footer-community a:hover .footer-community__icon[icon="simple-icons:x"] {
    transform: translate(0.08rem, 0.06rem);
  }
}
