.explore-page { width: 100%; min-width: 0; max-width: 1500px; margin: 0 auto; padding: 26px 38px 56px; }
.explore-header .ff-page-title { margin: 0; font-size: clamp(2.15rem, 3.2vw, 3rem); line-height: 1.05; }
.explore-header .ff-page-title span, .discovery-card h2 span, .results-title span { color: var(--ff-primary-hover); text-shadow: var(--ff-glow-violet); }
.explore-header p { margin: 5px 0 14px; color: var(--ff-text-secondary); font-size: .92rem; }
.explore-search { position: relative; display: flex; align-items: center; max-width: 820px; margin-bottom: 10px; }
.explore-search > span { position: absolute; left: 17px; z-index: 1; color: var(--ff-text); font-size: 1.2rem; }
.explore-search .ff-control { width: 100%; min-width: 0; height: 48px; padding-left: 50px; border-color: rgba(124, 58, 237, .75); background: rgba(6, 10, 23, .85); box-shadow: 0 0 22px rgba(124, 58, 237, .06); }
.explore-search .ff-control:focus, .explore-search .ff-control:focus-visible { border-color: rgba(168, 85, 247, .86); box-shadow: var(--ff-glow-violet); outline: 0; }
.explore-mode-row { display: flex; align-items: center; gap: 10px; min-height: 42px; margin: 0 0 6px; flex-wrap: wrap; }
.explore-mode-toggle { width: auto; min-height: 36px; display: inline-flex; align-items: center; gap: 9px; border-color: rgba(154, 160, 179, .28); padding: 0 12px; color: var(--ff-text-secondary); text-decoration: none; background: rgba(8, 13, 26, .74); }
.explore-mode-toggle > span { width: 30px; height: 18px; position: relative; flex: 0 0 auto; border: 1px solid rgba(154, 160, 179, .4); border-radius: 999px; background: rgba(255, 255, 255, .05); transition: var(--ff-transition); }
.explore-mode-toggle > span::after { position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 999px; content: ""; background: currentColor; transition: var(--ff-transition); }
.explore-mode-toggle strong { color: inherit; font-size: .78rem; font-weight: 700; }
.explore-mode-toggle.is-active { border-color: rgba(124, 58, 237, .66); color: #f5f0ff; background: rgba(68, 35, 130, .42); box-shadow: 0 0 18px rgba(124, 58, 237, .14); }
.explore-mode-toggle.is-active > span { border-color: rgba(168, 85, 247, .7); background: rgba(124, 58, 237, .55); }
.explore-mode-toggle.is-active > span::after { left: 15px; color: #fff; }
.selected-row { display: flex; min-height: 44px; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.selected-row .ff-label { margin-right: 8px; color: var(--ff-text-secondary); }
.selected-row a, .tag-cloud a { text-decoration: none; }
.selected-row .ff-tag, .tag-cloud .ff-tag { max-width: 100%; overflow-wrap: anywhere; }
.no-tag-mark::before { display: none; }
.clear-link { padding: 8px; color: var(--ff-primary-hover); }
.discovery-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 16px; margin: 6px 0 10px; }
.discovery-card { min-height: 132px; padding: 16px 18px; background: rgba(7, 13, 27, .82); }
.discovery-card h2 { margin: 0 0 12px; font-size: 1.35rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud .ff-tag { min-height: 32px; padding-inline: 12px; font-size: .78rem; }
.results-title { margin: 8px 0 12px; font: 400 1.4rem/1.2 var(--ff-font-serif); }
.story-grid .empty-state { grid-column: 1 / -1; text-align: center; padding: 54px 24px; }
.empty-spark { color: var(--ff-primary-hover); font-size: 2rem; }
.empty-state h3 { margin: 8px 0; }
.empty-state p { color: var(--ff-text-secondary); }

/* Explore has a brighter editorial treatment in the light theme while keeping
   the shared component anatomy and all dark-theme behavior intact. */
.ff-theme-light.explore-page,
.ff-theme-light .explore-page { position: relative; }
.ff-theme-light .explore-page::before {
    position: fixed;
    z-index: -1;
    inset: var(--ff-shell-top) 0 0 var(--ff-shell-left);
    content: "";
    pointer-events: none;
    background:
        radial-gradient(circle at 86% 5%, rgba(167, 139, 250, .18), transparent 28%),
        radial-gradient(circle at 58% 0, rgba(224, 231, 255, .7), transparent 32%),
        linear-gradient(180deg, #fbfaff 0, #fff 42%);
}
.ff-theme-light .explore-header .ff-page-title { color: #14152d; letter-spacing: -.025em; }
.ff-theme-light .explore-header p { color: #656b8e; }
.ff-theme-light .explore-search { max-width: none; }
.ff-theme-light .explore-search > span { color: #62688f; }
.ff-theme-light .explore-search .ff-control,
body[data-theme="light"] .explore-search .ff-control {
    border-color: #ddd9ef;
    color: #242644;
    background: #fff;
    box-shadow: 0 5px 18px rgba(76, 55, 133, .035);
}
.ff-theme-light .explore-mode-toggle {
    border-color: #ded9ef;
    color: #555b80;
    background: #fff;
}
.ff-theme-light .explore-mode-toggle.is-active {
    border-color: #a78bfa;
    color: #5b21b6;
    background: #f5f1ff;
    box-shadow: none;
}
.ff-theme-light .selected-row .ff-label { color: #3f4568; }
.ff-theme-light .clear-link { color: #6d28d9; }
.ff-theme-light .discovery-card {
    border-color: #e3e0f1;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 26px rgba(67, 51, 117, .045);
}
.ff-theme-light .discovery-card h2,
.ff-theme-light .results-title { color: #24213f; }
.ff-theme-light .tag-cloud .ff-tag {
    border-color: #e4e0f3;
    color: #4e5278;
    background: #fbfaff;
}
.ff-theme-light .tag-cloud .ff-tag:hover { border-color: #a78bfa; color: #6d28d9; }
.ff-theme-light .tag-cloud .ff-tag-active,
.ff-theme-light .selected-row .ff-tag-active {
    border-color: #a78bfa;
    color: #6d28d9;
    background: #f5f1ff;
    box-shadow: none;
}
@media (max-width: 1050px) {
    .explore-page { padding: 26px 24px 48px; }
    .discovery-grid { grid-template-columns: 1fr; }
    .explore-search { max-width: none; }
}
@media (max-width: 700px) {
    .explore-page { padding: 22px 16px 40px; }
    .selected-row { align-items: flex-start; }
    .discovery-card { padding: 16px; }
    .ff-theme-light .explore-page::before { inset: calc(var(--ff-shell-top) + 54px) 0 0; }
}
