/* NexusSpira — public quote pages */

/* Typography: Inter body / UI, Playfair headings, Playfair italic quotes */
body.site-public:has(.quotes-page) {
  --q-font-heading: var(--font-display);
  --q-font-body: var(--font-body);
  --q-font-quote: var(--font-display);
  font-family: var(--q-font-body);
}

body.site-public:has(.quotes-page) header,
body.site-public:has(.quotes-page) footer {
  font-family: var(--q-font-body);
}

.quotes-page {
  font-family: var(--q-font-body);
  background: #F2F6FF;
}

main.ns-main.quotes-page {
  padding-top: 0;
  min-height: 0;
}

.quotes-page h1,
.quotes-page h2,
.quotes-page h3 {
  font-family: var(--q-font-heading);
  letter-spacing: -0.01em;
}

.quotes-page .sidebar-head h3,
.quotes-page .sidebar-card-head h3,
.quotes-page .tags-section h4 {
  font-family: var(--q-font-body);
  letter-spacing: 0.6px;
}

.quotes-page .author-name-big {
  font-family: var(--q-font-heading);
}

.quotes-page .q-text,
.quotes-page .qotd-text,
.quotes-page .big-quote-text,
.quotes-page .q-text-sm,
.quotes-page .q-row-text,
.quotes-page .rmi-text {
  font-family: var(--q-font-quote);
  font-style: italic;
}

.quotes-page .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.quotes-page .reveal.visible {
  opacity: 1;
  transform: none;
}

.quotes-page .page-hero {
  padding: 88px 5% 32px;
  background: transparent;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.quotes-page .page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 15% 80%, rgba(26, 111, 191, 0.1) 0%, transparent 60%);
}
.quotes-page .hero-float {
  position: absolute;
  border-radius: 24px;
  opacity: .45;
  pointer-events: none;
  animation: qFloatY 7s ease-in-out infinite;
}
.quotes-page .hero-float.f1 { top: 18%; left: 8%; width: 40px; height: 40px; background: linear-gradient(135deg, #EC4899, #F472B6); transform: rotate(10deg); }
.quotes-page .hero-float.f2 { top: 64%; left: 13%; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #1A6FBF, #00B8C8); animation-delay: 1.1s; }
.quotes-page .hero-float.f3 { top: 24%; right: 10%; width: 32px; height: 32px; background: linear-gradient(135deg, #8B5CF6, #B794F6); transform: rotate(-12deg); animation-delay: .7s; }
.quotes-page .hero-float.f4 { top: 66%; right: 15%; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #F59E0B, #FBBF24); animation-delay: 1.5s; }
.quotes-page .hero-float.f5 { top: 10%; right: 32%; width: 18px; height: 18px; background: linear-gradient(135deg, #EC4899, #FF8B55); transform: rotate(45deg); animation-delay: .9s; }
@keyframes qFloatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.quotes-page .page-hero > * { position: relative; z-index: 1; }
.quotes-page .page-hero h1 {
  font-family: var(--q-font-heading) !important;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.2;
}
.quotes-page .page-hero h1 .accent {
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.quotes-page .page-hero p {
  font-size: 14px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

.quotes-page .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(26, 111, 191, .2);
  background: rgba(26, 111, 191, .08);
}

.quotes-page--category .page-hero--category::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--cat-gradient, linear-gradient(90deg, #1A6FBF, #00B8C8));
}

.quotes-page--category .page-hero--category .hero-eyebrow {
  color: var(--cat-color, #1A6FBF);
  border-color: color-mix(in srgb, var(--cat-color, #1A6FBF) 35%, transparent);
  background: color-mix(in srgb, var(--cat-color, #1A6FBF) 10%, transparent);
}

.quotes-page--category .page-hero--category h1 .accent {
  background: none;
  -webkit-text-fill-color: var(--cat-color, #1A6FBF);
  color: var(--cat-color, #1A6FBF);
}

.q-section { background: var(--white); padding: 20px 5% 50px; }
.q-wrap { max-width: 1180px; margin: 0 auto; }

.qotd-banner {
  margin: 20px 0 24px;
  background: linear-gradient(135deg, #0F1F5C 0%, #1A6FBF 55%, #00B8C8 100%);
  border-radius: 20px;
  padding: 30px 36px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
.qotd-banner:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15, 31, 92, .25); }
.qotd-banner::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 140px;
  color: rgba(255, 255, 255, .06);
  font-family: var(--font-display);
  line-height: 1;
  pointer-events: none;
}
.qotd-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, .9);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 14px;
}
.qotd-text {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 12px;
}
.qotd-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.qotd-author { color: rgba(255, 255, 255, .75); font-size: 13px; font-weight: 600; }
.qotd-actions { display: flex; gap: 8px; }
.qotd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .2s;
}
.qotd-btn:hover { background: rgba(255, 255, 255, .25); }
.qotd-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 24px;
}
.filter-row {
  display: contents;
}
.filter-field {
  display: contents;
}
.filter-label {
  display: none;
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 2;
  min-width: 0;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  height: 44px;
  transition: all .2s;
}
.filter-search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 184, 200, .12);
  background: var(--white);
}
.filter-search svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.filter-search input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  min-width: 0;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
}
.filter-select {
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  flex: 1;
  min-width: 0;
}
.random-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #1A2E6B 0%, #1A6FBF 50%, #00B8C8 100%);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.random-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

.results-count { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.results-count strong { color: var(--navy); }

.q-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.q-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .3s cubic-bezier(.22, .68, 0, 1.2);
  cursor: pointer;
}
.q-card:hover { transform: translateY(-5px); box-shadow: 0 16px 38px -8px rgba(26, 46, 107, .15); border-color: transparent; }
.q-card-bar { height: 5px; width: 100%; }
.q-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.q-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 14px;
  width: fit-content;
}
.q-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--navy);
  font-weight: 500;
  flex: 1;
  margin-bottom: 16px;
  position: relative;
  padding-left: 16px;
}
.q-text::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -4px;
  font-size: 26px;
  color: var(--border);
  font-family: var(--font-display);
  line-height: 1;
}
.q-author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.q-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  border: 2px solid var(--border);
}
.q-author-name { font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-author-meta { font-size: 11px; color: var(--muted); }
.q-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}
.q-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.q-action-btn:hover { border-color: var(--teal); color: var(--teal); background: rgba(0, 184, 200, .06); }
.q-action-btn.liked { border-color: #EC4899; color: #EC4899; background: rgba(236, 72, 153, .07); }
.q-action-btn.copied { border-color: #10B981; color: #10B981; background: rgba(16, 185, 129, .07); }
.q-action-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.q-action-spacer { flex: 1; }
.q-source { font-size: 10.5px; color: var(--muted); text-align: right; }
.q-card.hidden-card { display: none; }

.q-empty { text-align: center; padding: 60px 20px; display: none; }
.q-empty.show { display: block; }
.q-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .5; }
.q-empty h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.q-empty p { font-size: 14px; color: var(--muted); }

.submit-cta {
  background: linear-gradient(135deg, #0F1F5C 0%, #8B5CF6 100%);
  border-radius: 18px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.submit-cta h3,
.submit-cta-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.4;
}
.submit-cta p,
.submit-cta-text p {
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  line-height: 1.5;
}
.submit-cta-btn {
  background: rgba(255, 255, 255, .15);
  border: 1.5px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.submit-cta-btn:hover { background: rgba(255, 255, 255, .25); }

.submit-cta--sidebar {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  margin-bottom: 18px;
  border-radius: 16px;
}
.submit-cta--sidebar h3,
.submit-cta--sidebar .submit-cta-text h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.submit-cta--sidebar p,
.submit-cta--sidebar .submit-cta-text p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 14px;
}
.submit-cta--sidebar .submit-cta-btn {
  display: inline-block;
  font-size: 12.5px;
  padding: 9px 20px;
  border-radius: 10px;
}

/* Detail page */
.quotes-page .breadcrumb { padding: 78px 5% 8px; max-width: 1180px; margin: 0 auto; }
.breadcrumb-inner { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb-inner a { color: var(--muted); text-decoration: none; }
.breadcrumb-inner a:hover { color: var(--blue); }
.breadcrumb-inner span.sep { color: var(--border); }
.breadcrumb-current { color: var(--navy); font-weight: 600; }

.quotes-page--category .page-hero--category {
  padding-top: 88px;
}

.quotes-page--authors .page-hero {
  padding: 8px 5% 24px;
}

.quotes-page--detail .detail-hero,
.quotes-page--author .author-hero {
  padding-top: 8px;
}

.detail-hero { padding: 8px 5% 0; max-width: 1180px; margin: 0 auto; }
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.quote-card-big { background: var(--white); border: 1.5px solid var(--border); border-radius: 24px; overflow: hidden; margin-bottom: 20px; }
.quote-card-bar { height: 6px; }
.quote-card-inner { padding: 36px 40px; }
.big-quote-mark { font-size: 80px; color: var(--border); font-family: var(--font-display); line-height: .8; display: block; margin-bottom: 8px; }
.big-quote-text {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--navy);
  margin-bottom: 28px;
}
.quote-author-row { display: flex; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--border); }
.quote-author-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
  border: 2px solid var(--border);
  object-fit: cover;
}
.quote-author-name { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.quote-author-name a { color: inherit; text-decoration: none; }
.quote-author-name a:hover { color: var(--blue); }
.quote-author-sub { font-size: 13px; color: var(--muted); }
.quote-source-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 9px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 40px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}
.action-btn:hover { border-color: var(--teal); color: var(--teal); }
.action-btn.liked { border-color: #EC4899; color: #EC4899; background: rgba(236, 72, 153, .06); }
.action-btn.saved { border-color: #8B5CF6; color: #8B5CF6; background: rgba(139, 92, 246, .06); }
.action-btn.copied { border-color: #10B981; color: #10B981; background: rgba(16, 185, 129, .06); }
.action-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  text-decoration: none;
  color: var(--text);
}
.share-btn:hover { border-color: var(--teal); background: rgba(0, 184, 200, .07); transform: translateY(-2px); }
.spacer { flex: 1; }

.tags-section { background: var(--white); border: 1.5px solid var(--border); border-radius: 16px; padding: 20px 24px; margin-bottom: 20px; }
.tags-section h4 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 12px; }
.tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--bg);
  border: 1.5px solid var(--border);
  padding: 5px 13px;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
}
.tag-pill:hover { border-color: var(--teal); color: var(--teal); }

.sidebar-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 20px; }
.sidebar-card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.sidebar-card-head h3 { font-size: 13px; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: .6px; }
.sidebar-card-body { padding: 16px 20px; }
.author-bio-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 20px; }
.author-big-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A6FBF, #00B8C8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  object-fit: cover;
}
.author-big-name { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.author-big-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.author-stat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.author-bio { font-size: 13px; color: var(--muted); line-height: 1.65; text-align: left; margin-bottom: 16px; }
.author-link {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  padding: 9px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
}
.author-link:hover { border-color: var(--teal); color: var(--teal); }

.related-mini-item { padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.related-mini-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-mini-item:hover .rmi-text { color: var(--blue); }
.rmi-cat { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.rmi-text { font-size: 13.5px; font-weight: 500; color: var(--navy); line-height: 1.5; transition: color .2s; margin-bottom: 4px; }
.rmi-author { font-size: 11.5px; color: var(--muted); }

.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 14px; font-weight: 700; color: var(--navy); }

.related-section { padding: 0 5% 50px; max-width: 1180px; margin: 0 auto; }
.related-section h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 20px; }
.related-section h2 span {
  background: linear-gradient(135deg, #EC4899, #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.q-text-sm {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
  margin-bottom: 14px;
  padding-left: 14px;
  position: relative;
}
.q-text-sm::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 22px;
  color: var(--border);
  font-family: var(--font-display);
}
.q-author-sm { font-size: 12px; font-weight: 700; color: var(--muted); }

/* Author page */
.author-hero { padding: 8px 5% 0; max-width: 1180px; margin: 0 auto; }
.author-hero-card { background: var(--white); border: 1.5px solid var(--border); border-radius: 24px; overflow: hidden; margin-bottom: 28px; }
.author-hero-banner {
  height: 140px;
  background: linear-gradient(135deg, #0F1F5C 0%, #1A6FBF 55%, #00B8C8 100%);
  position: relative;
  overflow: hidden;
}
.author-hero-banner::before {
  content: '"';
  position: absolute;
  right: 40px;
  top: -30px;
  font-size: 200px;
  color: rgba(255, 255, 255, .06);
  font-family: var(--font-display);
  line-height: 1;
}
.author-hero-body { padding: 0 32px 28px; position: relative; }
.author-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.author-hero-identity {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.author-avatar-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A6FBF, #00B8C8);
  border: 4px solid var(--white);
  box-shadow: 0 4px 24px rgba(26, 46, 107, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-top: -44px;
  margin-bottom: 0;
  flex-shrink: 0;
  object-fit: cover;
}
.author-meta-block {
  min-width: 0;
  padding-bottom: 4px;
}
.author-name-big {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.2;
}
.author-sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.author-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px 10px;
}
.author-bio-text { font-size: 14px; color: var(--muted); line-height: 1.7; max-width: 680px; margin-top: 20px; }
.author-stat-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 0;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.author-stat-item .num { font-size: 1.3rem; font-weight: 800; color: var(--navy); display: block; line-height: 1; }
.author-stat-item .lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.author-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 0 5%; max-width: 1180px; margin: 0 auto 50px; }

.q-list { display: flex; flex-direction: column; gap: 16px; }
.q-row-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .28s cubic-bezier(.22, .68, 0, 1.2);
  cursor: pointer;
}
.q-row-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px -8px rgba(26, 46, 107, .14); border-color: transparent; }
.q-row-card-bar { height: 5px; }
.q-row-body { padding: 20px 24px; display: flex; align-items: flex-start; gap: 20px; }
.q-row-num { font-size: 22px; font-weight: 800; color: var(--border); min-width: 28px; line-height: 1.2; margin-top: 4px; font-family: var(--font-display); }
.q-row-content { flex: 1; min-width: 0; }
.q-row-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 14px;
  padding-left: 18px;
  position: relative;
}
.q-row-text::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -4px;
  font-size: 28px;
  color: var(--border);
  font-family: var(--font-display);
}
.q-row-source { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.q-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-row-card.hidden-card { display: none; }

.author-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer; text-decoration: none; }
.author-item:last-child { border-bottom: none; padding-bottom: 0; }
.author-item:hover .ai-name { color: var(--blue); }
.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  object-fit: cover;
}
.ai-info { min-width: 0; flex: 1; }
.ai-name { font-size: 13.5px; font-weight: 700; color: var(--navy); transition: color .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-sub { font-size: 11.5px; color: var(--muted); }
.ai-count { font-size: 11px; font-weight: 700; color: var(--teal); background: rgba(0, 184, 200, .1); border-radius: 6px; padding: 2px 8px; flex-shrink: 0; }

/* Authors directory */
.authors-section { background: var(--white); padding: 20px 5% 50px; }
.authors-wrap { max-width: 1180px; margin: 0 auto; }
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.author-directory-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.author-directory-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.author-directory-card .ai-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A6FBF, #00B8C8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  object-fit: cover;
}
.author-directory-card .ai-info { flex: 1; min-width: 0; }
.author-directory-card .ai-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.author-directory-card .ai-sub {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.author-directory-card .ai-count { margin-left: auto; }
.author-directory-card.is-featured {
  border-color: rgba(26, 111, 191, .25);
  background: linear-gradient(135deg, rgba(26, 111, 191, .04), rgba(0, 184, 200, .04));
}

.cat-bar-item { margin-bottom: 12px; }
.cat-bar-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 13px; }
.cat-bar-track { height: 7px; background: var(--border); border-radius: 50px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 50px; transition: width 1s ease; }

.sidebar-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sidebar-head h3 { font-size: 12.5px; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: .6px; }
.sidebar-body { padding: 16px 18px; }

@media (max-width: 900px) {
  .q-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1 1 100%;
    order: 2;
  }
  .filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
  }
  .filter-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
  }
  .filter-search {
    flex: 1 1 100%;
    order: 1;
    height: 46px;
  }
  .filter-select {
    width: 100%;
    height: 44px;
  }
  .random-btn {
    flex: 1 1 100%;
    order: 3;
    justify-content: center;
    height: 46px;
  }
}
@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .author-layout { grid-template-columns: 1fr; }
  .author-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 600px) {
  .q-grid { grid-template-columns: 1fr; }
  .detail-sidebar, .author-sidebar { grid-template-columns: 1fr; }
  .quote-card-inner { padding: 24px 20px; }
  .action-bar { padding: 16px 20px; }
  .author-hero-body { padding: 0 20px 22px; }
  .author-hero-top { flex-direction: column; align-items: stretch; }
  .author-hero-identity { align-items: center; }
  .author-stat-row { justify-content: flex-start; margin-top: 8px; gap: 14px; }

  .q-section { padding: 16px 4% 40px; }
  .qotd-banner {
    padding: 22px 18px;
    margin: 12px 0 18px;
    border-radius: 16px;
  }
  .qotd-text { font-size: 1.05rem; margin-bottom: 14px; }
  .qotd-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .qotd-actions { width: 100%; }
  .qotd-btn { flex: 1; justify-content: center; }

  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    margin-bottom: 18px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(26, 46, 107, .06);
  }
  .filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    order: unset;
    flex: unset;
  }
  .filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }
  .filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .55px;
  }
  .filter-search,
  .filter-select,
  .random-btn {
    width: 100%;
    order: unset;
    flex: unset;
  }
  .filter-search {
    height: 48px;
    padding: 0 16px;
    background: var(--bg);
  }
  .filter-search input { font-size: 15px; }
  .filter-select {
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
    background: var(--bg);
  }
  .random-btn {
    height: 48px;
    font-size: 14px;
    border-radius: 12px;
  }
  .results-count {
    margin: -4px 0 18px;
    padding: 0 4px;
    font-size: 14px;
  }
  .submit-cta {
    padding: 22px 20px;
    margin-bottom: 28px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .submit-cta-btn { width: 100%; text-align: center; }

  .quotes-page .page-hero {
    padding: 72px 4% 20px;
  }
  .quotes-page .page-hero h1 { font-size: 1.45rem; }
  .quotes-page .page-hero p { font-size: 13.5px; }
}
@media (max-width: 380px) {
  .filter-row { grid-template-columns: 1fr; }
}
