/* ==========================================================================
   FileCart — site theme on top of Bootstrap 5.3
   Ink navy + cobalt for structure, marigold reserved for download actions.
   ========================================================================== */

:root {
    --fc-ink: #14213D;
    --fc-ink-2: #23335A;
    --fc-cobalt: #1D4ED8;
    --fc-cobalt-dark: #173EAD;
    --fc-marigold: #FFB627;
    --fc-marigold-dark: #F0A20A;
    --fc-surface: #F4F6F9;
    --fc-paper: #FFFFFF;
    --fc-line: #DCE2EA;
    --fc-muted: #5B6577;
    --fc-radius: 10px;
    --fc-radius-sm: 6px;
    --fc-font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    --fc-display: "Unbounded", "Schibsted Grotesk", system-ui, sans-serif;
    --fc-ink-deep: #0E1830;
    --fc-on-ink: rgba(255,255,255,.72);
    --fc-shadow: 0 1px 2px rgba(20,33,61,.05), 0 8px 24px -16px rgba(20,33,61,.18);

    /* Bootstrap overrides */
    --bs-body-font-family: var(--fc-font);
    --bs-body-color: var(--fc-ink);
    --bs-body-bg: var(--fc-surface);
    --bs-primary: var(--fc-cobalt);
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: var(--fc-cobalt);
    --bs-link-color-rgb: 29, 78, 216;
    --bs-link-hover-color: var(--fc-cobalt-dark);
    --bs-link-hover-color-rgb: 23, 62, 173;
    --bs-border-color: var(--fc-line);
    --bs-border-radius: var(--fc-radius-sm);
    --bs-secondary-color: var(--fc-muted);
    --bs-emphasis-color: var(--fc-ink);
    color-scheme: light;
}

/* Safety net: nothing may widen the page. Set on <html> (not <body>) so every browser applies it to the viewport. */
html { overflow-x: hidden; }
@supports (overflow: clip) { html { overflow-x: clip; } }
body {
    background: var(--fc-surface);
    font-feature-settings: "ss01";
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--fc-ink); }
h1, .h1 { font-family: var(--fc-display); font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
.display-num { font-family: var(--fc-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
h2, .h2 { font-size: 1.375rem; }
h3, .h3 { font-size: 1.125rem; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.btn:hover, .platform-tab:hover, .brand:hover, .nav-link:hover, .list-group-item:hover, .page-link:hover { text-decoration: none; }
.tabular, .rank-meta, .table td.num { font-variant-numeric: lining-nums; }
:focus-visible { outline: 3px solid var(--fc-marigold); outline-offset: 2px; }
.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: var(--fc-paper); padding: .5rem 1rem; border-radius: var(--fc-radius-sm); }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: var(--fc-radius-sm); }
.btn-primary {
    --bs-btn-bg: var(--fc-cobalt); --bs-btn-border-color: var(--fc-cobalt);
    --bs-btn-hover-bg: var(--fc-cobalt-dark); --bs-btn-hover-border-color: var(--fc-cobalt-dark);
    --bs-btn-active-bg: var(--fc-cobalt-dark); --bs-btn-active-border-color: var(--fc-cobalt-dark);
}
.btn-ink {
    --bs-btn-color: #fff; --bs-btn-bg: var(--fc-ink); --bs-btn-border-color: var(--fc-ink);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--fc-ink-2); --bs-btn-hover-border-color: var(--fc-ink-2);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--fc-ink-2); --bs-btn-active-border-color: var(--fc-ink-2);
}
/* The one loud colour on the site: anything that downloads or searches. */
.btn-download {
    --bs-btn-color: var(--fc-ink); --bs-btn-bg: var(--fc-marigold); --bs-btn-border-color: var(--fc-marigold);
    --bs-btn-hover-color: var(--fc-ink); --bs-btn-hover-bg: var(--fc-marigold-dark); --bs-btn-hover-border-color: var(--fc-marigold-dark);
    --bs-btn-active-color: var(--fc-ink); --bs-btn-active-bg: var(--fc-marigold-dark); --bs-btn-active-border-color: var(--fc-marigold-dark);
    font-weight: 700;
}

/* ---------- Header: light site chrome, so each page's ink hero stands on its own ---------- */
.site-header {
    background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--fc-line);
    position: sticky; top: 0; z-index: 1030;
}
.site-bar { display: flex; align-items: center; gap: 1.5rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fc-ink); flex: 0 0 auto; }
.brand:hover { color: var(--fc-ink); }
.brand-mark {
    display: grid; place-items: center; width: 2.1rem; height: 2.1rem;
    background: var(--fc-marigold); color: var(--fc-ink); border-radius: 9px; font-size: 1rem;
}
.brand-name { font-family: var(--fc-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.site-search {
    flex: 1; max-width: 640px; display: flex; align-items: center; gap: .6rem;
    background: var(--fc-surface); border: 1px solid var(--fc-line); border-radius: 12px; padding: .3rem .3rem .3rem .9rem;
}
.site-search:focus-within { background: #fff; border-color: var(--fc-cobalt); box-shadow: 0 0 0 .2rem rgba(29,78,216,.12); }
.site-search > i { color: var(--fc-muted); }
.site-search input[type=search] { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; font-weight: 500; color: var(--fc-ink); padding: .35rem 0; }
.site-search input::placeholder { color: #8A93A5; text-overflow: ellipsis; }
.site-search .btn { padding: .4rem 1rem; border-radius: 9px; }
.account-nav { display: flex; align-items: center; gap: 1.1rem; font-size: .925rem; margin-left: auto; flex: 0 0 auto; }
.account-nav a { white-space: nowrap; }
.account-nav a:not(.btn) { color: var(--fc-ink); font-weight: 500; }
.account-nav a:not(.btn):hover { color: var(--fc-cobalt); text-decoration: none; }

.nav-bar { display: flex; align-items: center; gap: 1rem; padding: 0 0 .55rem; overflow-x: auto; scrollbar-width: none; }
.nav-bar::-webkit-scrollbar { display: none; }
.platform-pills { display: flex; gap: .25rem; flex: 0 0 auto; }
.platform-pill {
    display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px;
    color: var(--fc-muted); font-weight: 600; font-size: .875rem; white-space: nowrap;
}
.platform-pill:hover { color: var(--fc-ink); background: var(--fc-surface); text-decoration: none; }
.platform-pill.is-current { background: var(--fc-ink); color: #fff; }
.nav-divider { flex: 0 0 1px; height: 1.25rem; background: var(--fc-line); }
.section-nav { display: flex; gap: 1.25rem; flex: 0 0 auto; font-size: .875rem; }
.section-nav a { color: var(--fc-muted); font-weight: 500; white-space: nowrap; padding: .35rem 0; border-bottom: 2px solid transparent; }
.section-nav a:hover { color: var(--fc-ink); text-decoration: none; }
.section-nav a.active { color: var(--fc-ink); border-bottom-color: var(--fc-marigold); }

@media (max-width: 767.98px) {
    .site-bar { flex-wrap: wrap; gap: .6rem 1rem; }
    .site-search { order: 3; flex-basis: 100%; max-width: none; }
    .platform-pill span { display: none; }
    .platform-pill { padding: .4rem .65rem; }
}

/* ---------- Main ---------- */
.site-main { padding: 2rem 0 3rem; min-height: 60vh; }
.site-main > .container + .container { margin-top: 0; }

/* Page hero (replaces .jumbotron): continues the ink masthead full-bleed on every page */
.page-hero, .jumbotron {
    position: relative; isolation: isolate;
    /* Full-bleed without overflow: stretch to the viewport edges, then pad the content back to the container. */
    margin: -2rem calc(50% - 50vw + var(--sbw, 0px) / 2) 2rem; padding: 2.25rem calc(50vw - var(--sbw, 0px) / 2 - 50%) 2.75rem;
    background: var(--fc-ink); color: #fff; border: 0; border-radius: 0;
}
.page-hero::after, .jumbotron::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 28px 28px; background-position: center top;
    mask-image: linear-gradient(to bottom, transparent, #000 30%, transparent 100%);
}
.page-hero h1, .jumbotron h1, .page-hero h2, .page-hero h3 { color: #fff; margin-bottom: .5rem; }
.page-hero p, .jumbotron p { color: var(--fc-on-ink); font-size: 1.1rem; max-width: 62ch; margin-bottom: 0; }
.page-hero :where(a:not(.btn)) { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }
.page-hero :where(a:not(.btn)):hover { text-decoration-color: var(--fc-marigold); }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.4); }
.page-hero .breadcrumb a { text-decoration: none; color: rgba(255,255,255,.75); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero .breadcrumb-item.active { color: rgba(255,255,255,.5); }
.page-hero .hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1rem; color: var(--fc-on-ink); font-size: .95rem; }
.page-hero .hero-meta a { color: #fff; }
.page-hero .hero-meta i { color: var(--fc-marigold); margin-right: .2rem; }
.page-hero .nav-pills { --bs-nav-pills-link-active-bg: var(--fc-marigold); --bs-nav-pills-link-active-color: var(--fc-ink); --bs-nav-link-color: rgba(255,255,255,.8); --bs-nav-link-hover-color: #fff; }
.page-hero .btn-outline-secondary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.35); --bs-btn-hover-bg: rgba(255,255,255,.1); --bs-btn-hover-border-color: #fff; --bs-btn-hover-color: #fff; }
.page-hero .text-body-secondary { color: rgba(255,255,255,.6) !important; }
.page-hero .badge.text-bg-secondary, .page-hero .badge.text-bg-light { background: rgba(255,255,255,.14) !important; color: #fff !important; }

/* Panels: the site's main content container */
.data-block {
    background: var(--fc-paper);
    border: 1px solid var(--fc-line);
    border-radius: 14px;
    box-shadow: var(--fc-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
/* clip (not hidden) keeps the rounded corners without turning the panel into a scroll container,
   so sticky save bars inside it follow the window as intended. */
@supports (overflow: clip) { .data-block { overflow: clip; } }
.data-block > header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .9rem 1.25rem; border-bottom: 1px solid var(--fc-line); flex-wrap: wrap;
}
.data-block > header h2, .data-block > header h3 { font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.data-block > section, .data-block > .data-body { padding: 1.1rem 1.25rem; }
.data-block > section > :last-child { margin-bottom: 0; }
.data-block > section > .table, .data-block > section > .table-responsive { margin: -1.1rem -1.25rem; width: calc(100% + 2.5rem); max-width: none; }
.data-block > section > .table-responsive > .table { margin: 0; }
.data-block .table > :not(caption) > * > * { padding: .65rem 1.25rem; }
.data-header-actions { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; font-size: .9rem; }
.row > * > .data-block:last-child { margin-bottom: 0; }
.data-block.is-featured { border-color: var(--fc-marigold); box-shadow: inset 4px 0 0 var(--fc-marigold); }
.data-block.is-quiet { background: transparent; box-shadow: none; }

/* Ranked and plain item lists */
.rank-list, .item-list { list-style: none; margin: 0; padding: 0; }
.rank-list { counter-reset: rank; }
.rank-list > li, .item-list > li {
    display: flex; align-items: baseline; gap: .75rem;
    padding: .55rem 0; border-bottom: 1px dashed var(--fc-line);
}
.rank-list > li:last-child, .item-list > li:last-child { border-bottom: 0; }
.rank-list > li::before {
    counter-increment: rank; content: counter(rank);
    flex: 0 0 1.6rem; color: var(--fc-muted); font-weight: 700; font-size: .9rem; text-align: right; padding-right: .25rem;
}
.rank-list > li:nth-child(-n+3)::before { color: var(--fc-cobalt); }
.rank-list a, .item-list a { color: var(--fc-ink); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list a:hover, .item-list a:hover { color: var(--fc-cobalt); }
.rank-meta { color: var(--fc-muted); font-size: .875rem; white-space: nowrap; }

/* Platform tiles */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.widget-block, .platform-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
    padding: 1rem 1.1rem; background: var(--fc-paper); border: 1px solid var(--fc-line); border-radius: var(--fc-radius);
    color: var(--fc-ink); font-weight: 700;
}
.widget-block i, .widget-block .fa, .platform-tile i { font-size: 1.6rem; color: var(--fc-cobalt); }
.widget-block:hover, .platform-tile:hover { border-color: var(--fc-cobalt); color: var(--fc-ink); text-decoration: none; }

/* Product listing rows (search, category, top lists) */
.product-row {
    display: grid; grid-template-columns: 56px 1fr auto; gap: 1rem; align-items: start;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--fc-line);
}
.product-row:hover { background: #FAFBFD; }
.product-row h3 a { color: var(--fc-ink); }
.product-row h3 a:hover { color: var(--fc-cobalt); }
.product-row:last-child { border-bottom: 0; }
.product-icon { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 14px; border: 1px solid var(--fc-line); background: var(--fc-paper); object-fit: contain; display: grid; place-items: center; color: var(--fc-muted); }
.product-icon.monogram { border: 0; font-family: var(--fc-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--mono-fg); background: var(--mono-bg); box-shadow: inset 0 0 0 1px rgba(20,33,61,.06), inset 0 -10px 18px -12px var(--mono-fg); }
.mono-0 { --mono-bg: #DFE7FF; --mono-fg: #1D4ED8; }
.mono-1 { --mono-bg: #D3F2EC; --mono-fg: #0F766E; }
.mono-2 { --mono-bg: #ECE4FF; --mono-fg: #6D28D9; }
.mono-3 { --mono-bg: #FFE1E7; --mono-fg: #BE123C; }
.mono-4 { --mono-bg: #FFEDC2; --mono-fg: #9A5800; }
.mono-5 { --mono-bg: #DBF4E0; --mono-fg: #15803D; }
.mono-6 { --mono-bg: #D8F0FF; --mono-fg: #0369A1; }
.mono-7 { --mono-bg: #E6EAF1; --mono-fg: #334155; }
.product-icon.icon-sm { width: 36px; height: 36px; border-radius: 10px; font-size: .78rem; letter-spacing: -0.04em; }
.product-icon.icon-lg { width: 96px; height: 96px; border-radius: 24px; font-size: 2rem; }
.product-icon.icon-xl { width: 112px; height: 112px; border-radius: 28px; font-size: 2.4rem; }
.product-row h3 { font-size: 1.05rem; margin: 0 0 .2rem; }
.product-row p { margin: 0; color: var(--fc-muted); font-size: .95rem; }
.product-row .product-facts { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .85rem; color: var(--fc-muted); margin-top: .35rem; }
@media (max-width: 575.98px) {
    .product-row { grid-template-columns: 44px 1fr; }
    .product-row > :last-child { grid-column: 2; }
    .product-icon { width: 44px; height: 44px; }
}

/* Product page download panel */
.download-panel > section:not(:has(*)) { display: none; }
.download-panel > section > .alert:first-child, .download-panel > section > div:first-child { margin-top: 0 !important; }
.download-panel .btn-download { font-size: 1.15rem; padding: .95rem 1rem; box-shadow: 0 10px 24px -12px rgba(240,162,10,.9); }
.spec-table { margin: 0; }
.spec-table th { color: var(--fc-muted); font-weight: 500; width: 1%; white-space: nowrap; }
.price-tag { font-weight: 800; font-size: 1.4rem; }

/* Category navigation */
.list-group { border-radius: 14px; box-shadow: var(--fc-shadow); }
.list-group-item { border-color: var(--fc-line); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.list-group-item .badge { background: var(--fc-surface) !important; color: var(--fc-muted) !important; font-weight: 600; border-radius: 999px; }
.list-group-item.active .badge { background: rgba(255,255,255,.18) !important; color: #fff !important; }
.list-group-item:hover:not(.active):not(.is-empty) { background: #FAFBFD; color: var(--fc-cobalt); }
.list-group-item.active { background: var(--fc-cobalt); border-color: var(--fc-cobalt); }
.list-group-item.is-empty { color: #A3ABBA; }

/* Breadcrumbs */
.breadcrumb { font-size: .9rem; margin-bottom: .75rem; --bs-breadcrumb-divider-color: var(--fc-muted); }
.breadcrumb-item.active { color: var(--fc-muted); }

/* Forms */
.form-label { font-weight: 600; font-size: .925rem; }
.form-control, .form-select { border-color: var(--fc-line); }
.form-control:focus, .form-select:focus { border-color: var(--fc-cobalt); box-shadow: 0 0 0 .2rem rgba(29,78,216,.15); }
.form-text { color: var(--fc-muted); }

/* Tables */
.table { --bs-table-striped-bg: rgba(20,33,61,.025); }
.table > thead th { font-size: .85rem; color: var(--fc-muted); font-weight: 600; border-bottom-color: var(--fc-line); }

/* Badges */
.tag-chip { display: inline-block; padding: .15rem .55rem; margin: 0 .25rem .3rem 0; border: 1px solid var(--fc-line); border-radius: 999px; background: var(--fc-surface); color: var(--fc-ink); font-size: .85rem; }
.tag-chip:hover { border-color: var(--fc-cobalt); color: var(--fc-cobalt); text-decoration: none; }
.badge { font-weight: 600; }
.badge-new { background: var(--fc-marigold); color: var(--fc-ink); }

/* Screenshots */
.shot { display: block; border: 1px solid var(--fc-line); border-radius: var(--fc-radius-sm); overflow: hidden; background: var(--fc-surface); }
.shot img { display: block; width: 100%; height: auto; }

/* Pagination */
.pagination { --bs-pagination-color: var(--fc-ink); --bs-pagination-active-bg: var(--fc-cobalt); --bs-pagination-active-border-color: var(--fc-cobalt); --bs-pagination-border-color: var(--fc-line); }

/* Admin toolbar */
.admin-bar { background: #FFF6E0; border-bottom: 1px solid #F5DFA6; font-size: .875rem; }
.admin-bar .container { display: flex; flex-wrap: wrap; gap: .25rem .9rem; padding-top: .5rem; padding-bottom: .5rem; }
.admin-bar strong { color: #8A5A00; margin-right: .25rem; }
.admin-bar a { color: var(--fc-ink); }
.admin-bar a.active { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Footer: ink bookend to the masthead */
.site-footer { background: var(--fc-ink); color: var(--fc-on-ink); padding: 3.5rem 0 1.5rem; font-size: .925rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 767.98px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.brand-footer, .brand-footer:hover { color: #fff; }
.footer-note { color: var(--fc-on-ink); margin: .9rem 0 0; max-width: 30ch; }
.footer-heading { font-size: .9rem; font-weight: 700; margin-bottom: .75rem; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer nav a { color: var(--fc-on-ink); }
.site-footer nav a:hover { color: #fff; }
.footer-legal { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); font-size: .85rem; }
.footer-legal a { color: inherit; }
.site-main { padding-bottom: 1rem; }

/* ==========================================================================
   Homepage
   ========================================================================== */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.5rem; align-items: stretch; }
@media (max-width: 991.98px) { .home-hero { grid-template-columns: 1fr; gap: 1.75rem; } }
.home-hero > div:first-child { align-self: center; }
.home-hero h1 { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4rem); line-height: 1.02; letter-spacing: -0.035em; margin: .25rem 0 1.1rem; }
.home-hero h1 .hl { color: var(--fc-marigold); }
.home-hero .lede { font-size: 1.15rem; color: var(--fc-on-ink); max-width: 46ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; margin-top: 2rem; }
.hero-stat .display-num { font-size: 2.1rem; color: #fff; display: block; }
@media (max-width: 575.98px) {
    .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
    .hero-stat .display-num { font-size: 1.55rem; }
    .hero-stat span:last-child { font-size: .8rem; }
}
.hero-stat span:last-child { color: var(--fc-on-ink); font-size: .9rem; }

.live-panel {
    background: var(--fc-ink-deep); border: 1px solid rgba(255,255,255,.08); border-radius: 18px;
    padding: 1.25rem 1.25rem .5rem; display: flex; flex-direction: column; min-width: 0;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.live-head a { color: var(--fc-on-ink) !important; text-decoration: none !important; }
.live-head a:hover { color: #fff !important; }
.live-head h2 { font-size: .95rem; color: #fff; margin: 0; display: flex; align-items: center; gap: .55rem; }
.live-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #3DDC97; box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.55); } 70% { box-shadow: 0 0 0 .6rem rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.live-chart { margin: .75rem -1.25rem 0; height: 92px; }
.live-chart .area-chart { width: 100%; height: 100%; display: block; }
.area-fill { fill: rgba(96,140,255,.14); }
.area-line { fill: none; stroke: var(--fc-marigold); stroke-width: 2px; stroke-linejoin: round; }
.live-total { display: flex; align-items: baseline; gap: .6rem; margin-top: .9rem; color: var(--fc-on-ink); font-size: .9rem; }
.live-total .display-num { color: #fff; font-size: 1.6rem; }
.live-feed { list-style: none; margin: .75rem 0 0; padding: 0; }
.live-feed li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-top: 1px solid rgba(255,255,255,.07); }
.live-feed a { color: #fff; text-decoration: none; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-feed a:hover { color: var(--fc-marigold); text-decoration: none; }
.live-feed time { color: rgba(255,255,255,.5); font-size: .8rem; white-space: nowrap; }
.live-feed .product-icon { border-color: transparent; }
/* the one orchestrated moment: the feed fills in on load */
@media (prefers-reduced-motion: no-preference) {
    .live-feed li { animation: feed-in .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 90ms + 250ms); }
    @keyframes feed-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.section-title h2 { font-family: var(--fc-display); font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); letter-spacing: -0.02em; margin: 0; }
.section-title a { font-weight: 600; white-space: nowrap; }

/* Podium: the week's top three */
.podium { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 767.98px) { .podium { grid-template-columns: 1fr; } }
.podium-card {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .9rem;
    padding: 1.25rem; background: var(--fc-paper); border: 1px solid var(--fc-line); border-radius: 18px; box-shadow: var(--fc-shadow);
    color: var(--fc-ink);
}
.podium-card:hover { border-color: var(--fc-cobalt); text-decoration: none; color: var(--fc-ink); }
.podium-rank { position: absolute; right: 1rem; top: .35rem; font-family: var(--fc-display); font-weight: 800; font-size: 5rem; line-height: 1; color: #E8ECF3; pointer-events: none; }
.podium-card:first-child { background: var(--fc-ink); border-color: var(--fc-ink); color: #fff; box-shadow: 0 24px 48px -28px rgba(20,33,61,.8); }
.podium-card:first-child:hover { border-color: var(--fc-marigold); color: #fff; }
.podium-card:first-child .podium-rank { color: var(--fc-marigold); font-size: 6.5rem; opacity: .95; }
.podium-card:first-child h3 { color: #fff; font-size: 1.4rem; }
.podium-card:first-child p { color: var(--fc-on-ink); }
.podium-card:first-child .podium-count { color: var(--fc-on-ink); }
.podium-card:first-child .podium-count .display-num { color: var(--fc-marigold); font-size: 1.75rem; }
.podium-card h3, .podium-card p { padding-right: 3.5rem; }
.podium-card h3 { font-size: 1.15rem; margin: 0; position: relative; }
.podium-card p { margin: 0; color: var(--fc-muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; position: relative; }
.podium-count { margin-top: auto; display: flex; align-items: baseline; gap: .4rem; color: var(--fc-muted); font-size: .85rem; position: relative; }
.podium-count .display-num { font-size: 1.35rem; color: var(--fc-ink); }
.podium-card .product-icon { position: relative; }

/* Icon lists (homepage columns) */
.icon-list { list-style: none; margin: 0; padding: 0; }
.icon-list li { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--fc-line); }
.icon-list li:last-child { border-bottom: 0; }
.icon-list .rank-no { flex: 0 0 1.4rem; text-align: right; color: var(--fc-muted); font-weight: 700; font-size: .85rem; }
.icon-list .name { flex: 1; min-width: 0; }
.icon-list .name a { display: block; color: var(--fc-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-list .name a:hover { color: var(--fc-cobalt); text-decoration: none; }
.icon-list .name small { display: block; color: var(--fc-muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Category shelf */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.shelf a {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .8rem 1rem; background: var(--fc-paper); border: 1px solid var(--fc-line); border-radius: 12px;
    color: var(--fc-ink); font-weight: 600;
}
.shelf a:hover { border-color: var(--fc-cobalt); color: var(--fc-cobalt); text-decoration: none; }
.shelf .count { color: var(--fc-muted); font-weight: 500; font-size: .85rem; }

/* Product page hero */
.product-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; }
@media (max-width: 767.98px) { .product-hero { grid-template-columns: auto minmax(0, 1fr); } .product-hero .hero-cta { grid-column: 1 / -1; } }
.product-hero .product-icon { border-color: rgba(255,255,255,.12); }
.product-hero h1 { margin: 0 0 .35rem; }
.product-hero h1 .version { color: rgba(255,255,255,.5); font-weight: 500; }
.hero-cta { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; min-width: 220px; }
.hero-cta .btn-download { font-size: 1.15rem; padding: .95rem 1.75rem; box-shadow: 0 14px 30px -14px rgba(255,182,39,.8); }
.hero-cta small { color: rgba(255,255,255,.55); text-align: center; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.1); }
@media (max-width: 575.98px) { .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-strip > div { padding: 1rem 1rem 0 0; }
.stat-strip .display-num { display: block; color: #fff; font-size: 1.45rem; }
.stat-strip span:last-child { color: var(--fc-on-ink); font-size: .85rem; }

/* ==========================================================================
   Page kit (used by every inner page)
   ========================================================================== */

/* Hero with a side column: copy left, stats/actions right */
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
@media (max-width: 767.98px) { .hero-split { grid-template-columns: 1fr; gap: 1.25rem; } }
.hero-split .hero-stats { margin-top: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.page-hero .hero-icon { width: 3rem; height: 3rem; border-radius: 12px; display: inline-grid; place-items: center; background: rgba(255,255,255,.08); color: var(--fc-marigold); font-size: 1.35rem; margin-bottom: 1rem; }

/* Compact hero whose following card overlaps its bottom edge (forms, auth, static pages) */
.page-hero.is-compact { padding-bottom: 5.5rem; }
.page-hero.is-compact p { max-width: 56ch; }
.page-hero.text-center p { margin-left: auto; margin-right: auto; }
.stat-tile .display-num .fa-solid { font-size: 1.4rem; color: var(--fc-cobalt); }
.overlap { position: relative; margin-top: -6rem; z-index: 1; }
.overlap > .data-block, .overlap .data-block:first-child { box-shadow: 0 30px 60px -36px rgba(20,33,61,.45), var(--fc-shadow); }
.auth-card { max-width: 460px; margin-left: auto; margin-right: auto; }
.auth-card > section { padding: 1.75rem; }
.auth-foot { text-align: center; color: var(--fc-muted); font-size: .925rem; margin-top: 1rem; }

/* Forms placed inside the ink hero (search refine, filters) */
.page-hero .form-label, .page-hero .form-check-label { color: rgba(255,255,255,.8); }
.page-hero .form-control, .page-hero .form-select { background-color: rgba(255,255,255,.96); border-color: transparent; }
.page-hero .form-check-input { border-color: rgba(255,255,255,.4); background-color: transparent; }
.page-hero .form-check-input:checked { background-color: var(--fc-marigold); border-color: var(--fc-marigold); }

/* Pills inside the hero (period / sort switches) */
.hero-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.hero-tabs a { padding: .4rem .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85) !important; text-decoration: none !important; font-weight: 600; font-size: .875rem; }
.hero-tabs a:hover { border-color: #fff; color: #fff !important; }
.hero-tabs a.active, .hero-tabs a[aria-current] { background: var(--fc-marigold); border-color: var(--fc-marigold); color: var(--fc-ink) !important; }

/* Ranked product rows (charts below the podium) */
.product-row.has-rank { grid-template-columns: 2.25rem 56px minmax(0, 1fr) auto; }
.product-row .row-rank { font-family: var(--fc-display); font-weight: 700; font-size: 1.15rem; color: var(--fc-muted); text-align: right; padding-top: .9rem; }
.product-row .row-stat { text-align: right; white-space: nowrap; }
.product-row .row-stat .display-num { display: block; font-size: 1.2rem; color: var(--fc-ink); }
.product-row .row-stat small { color: var(--fc-muted); }
@media (max-width: 575.98px) { .product-row.has-rank { grid-template-columns: 1.5rem 44px minmax(0, 1fr); } .product-row.has-rank > :last-child { grid-column: 3; text-align: left; } }

/* Stat tiles (dashboards: manage listings, admin) */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-tile { background: var(--fc-paper); border: 1px solid var(--fc-line); border-radius: 14px; padding: 1.1rem 1.25rem; box-shadow: var(--fc-shadow); color: var(--fc-ink); display: block; }
a.stat-tile:hover { border-color: var(--fc-cobalt); text-decoration: none; color: var(--fc-ink); }
.stat-tile .display-num { display: block; font-size: 1.9rem; margin-bottom: .2rem; }
.stat-tile span:last-child { color: var(--fc-muted); font-size: .9rem; }
.stat-tile.is-alert { border-color: var(--fc-marigold); box-shadow: inset 4px 0 0 var(--fc-marigold), var(--fc-shadow); }
.overlap.stat-tiles .stat-tile { box-shadow: 0 24px 48px -30px rgba(20,33,61,.5), var(--fc-shadow); }

/* Empty states */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state .empty-icon { width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 18px; display: grid; place-items: center; background: var(--fc-surface); color: var(--fc-cobalt); font-size: 1.6rem; }
.empty-state h2, .empty-state h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.empty-state p { color: var(--fc-muted); max-width: 44ch; margin: 0 auto 1.25rem; }

/* Long forms: section description on the left, fields on the right */
.form-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem 2.5rem; padding: 1.75rem 0; border-top: 1px solid var(--fc-line); }
.form-section:first-of-type { border-top: 0; padding-top: .25rem; }
@media (max-width: 767.98px) { .form-section { grid-template-columns: 1fr; gap: 1rem; } }
.form-section > header h2 { font-size: 1.05rem; margin-bottom: .35rem; }
.form-section > header p { color: var(--fc-muted); font-size: .925rem; margin: 0; }
.form-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: .75rem; padding: 1rem 1.25rem; margin: 0 -1.25rem -1.1rem; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-top: 1px solid var(--fc-line); }
/* In an unpadded section (tables that run edge to edge) the bar needs no negative margins to reach the edges. */
.data-block > section.p-0 .form-actions, .data-block > .p-0 > .form-actions { margin: 0; }
.form-actions { align-items: center; }
.form-actions > .me-auto { margin-right: auto; }

/* Readable long text (legal, blog, help) */
.prose { max-width: 70ch; font-size: 1.05rem; line-height: 1.7; }
.prose h2 { font-family: var(--fc-display); font-size: 1.25rem; letter-spacing: -0.02em; margin: 2.25rem 0 .75rem; }
.prose h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }

/* A–Z bar and filter chips */
.letter-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1.25rem; }
.letter-bar a { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.07); color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: .875rem; }
.letter-bar a:hover { background: rgba(255,255,255,.16); }
.letter-bar a.active, .letter-bar a[aria-current] { background: var(--fc-marigold); color: var(--fc-ink) !important; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--fc-line); background: var(--fc-paper); color: var(--fc-ink); font-weight: 600; font-size: .875rem; }
.chip:hover { border-color: var(--fc-cobalt); color: var(--fc-cobalt); text-decoration: none; }
.chip.is-current, .chip[aria-current] { background: var(--fc-ink); border-color: var(--fc-ink); color: #fff; }
.chip .count { color: var(--fc-muted); font-weight: 500; }
.chip.is-current .count { color: rgba(255,255,255,.65); }
.page-hero .chip { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.page-hero .chip:hover { border-color: #fff; }
.page-hero .chip.is-current { background: var(--fc-marigold); border-color: var(--fc-marigold); color: var(--fc-ink); }
.page-hero .chip .count { color: rgba(255,255,255,.55); }

/* Review cards */
.review-card { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--fc-line); display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .9rem; }
.review-card:last-child { border-bottom: 0; }
.review-card .avatar { width: 40px; height: 40px; border-radius: 50%; font-size: .85rem; }
.review-card header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin-bottom: .35rem; }
.review-card header strong { font-weight: 700; }
.review-card header time, .review-card header .text-body-secondary { font-size: .85rem; color: var(--fc-muted); }
.review-score { display: inline-flex; align-items: center; gap: .15rem; color: var(--fc-marigold-dark); font-size: .8rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
.product-icon.avatar { width: 40px; height: 40px; border-radius: 50%; font-size: .85rem; }
.product-icon.avatar-xl { width: 96px; height: 96px; border-radius: 50%; font-size: 2rem; }
.fa-solid.count, .count .fa-solid { font-weight: 900; }
.page-hero .btn-outline-danger { --bs-btn-color: #FF9AA8; --bs-btn-border-color: rgba(255,154,168,.45); --bs-btn-hover-bg: #E03A52; --bs-btn-hover-border-color: #E03A52; --bs-btn-hover-color: #fff; }
.data-block .table .table > :not(caption) > * > * { padding: .4rem .6rem; }
.overlap .stat-tiles .stat-tile { box-shadow: 0 24px 48px -30px rgba(20,33,61,.5), var(--fc-shadow); }
@media (max-width: 575.98px) {
    .product-hero { grid-template-columns: 1fr; gap: 1rem; }
    .product-hero .product-icon.icon-xl, .product-hero .product-icon.icon-lg, .product-hero .product-icon.avatar-xl { width: 72px; height: 72px; font-size: 1.6rem; border-radius: 18px; }
    .product-hero .product-icon.avatar-xl { border-radius: 50%; }
}
.select-cat { min-width: 13rem; }
.input-narrow { max-width: 12rem; }

/* --------------------------------------------------------------------------
   Star ratings (lib/rating.php)
   -------------------------------------------------------------------------- */
:root { --fc-star: var(--fc-marigold); --fc-star-empty: #D5DBE4; }

/* Read-only meter: five stars filled to --stars (0–5) */
.star-meter {
    --size: 1.15rem;
    display: inline-block; vertical-align: middle; line-height: 1;
    font-size: var(--size); letter-spacing: .08em;
    background: linear-gradient(90deg, var(--fc-star) calc(var(--stars, 0) / 5 * 100%), var(--fc-star-empty) 0);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.star-meter::before { content: "★★★★★"; }
.star-meter.is-sm { --size: .95rem; }
.star-meter.is-lg { --size: 1.6rem; }
.podium-card:first-child { --fc-star-empty: rgba(255,255,255,.22); }

.rating-now { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .5rem; }
.rating-score { font-family: var(--fc-display); font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.rating-count { color: var(--fc-muted); font-size: .9rem; }
.podium-card:first-child .rating-count { color: var(--fc-on-ink); }

/* Ratings section on the product page: three different things, three different looks. */
.ratings { display: grid; gap: 1rem; }

/* 1. The crowd: big average + breakdown bars */
.crowd-rating { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem 1.1rem; align-items: center; }
.crowd-score { display: grid; justify-items: start; gap: .2rem; }
.crowd-num { font-family: var(--fc-display); font-weight: 700; font-size: 2.6rem; line-height: .95; letter-spacing: -0.04em; color: var(--fc-ink); font-variant-numeric: lining-nums; }
.crowd-count { font-size: .8rem; color: var(--fc-muted); }
.crowd-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.crowd-dist li { display: grid; grid-template-columns: .7rem minmax(0, 1fr); align-items: center; gap: .4rem; font-size: .72rem; line-height: 1; color: var(--fc-muted); font-variant-numeric: tabular-nums; }
.crowd-dist i { display: block; height: 6px; border-radius: 99px; background: #E9EDF3; overflow: hidden; }
.crowd-dist b { display: block; height: 100%; border-radius: inherit; background: var(--fc-star); transition: width .5s ease; }
.crowd-rating.is-empty .crowd-num { color: var(--fc-star-empty); }

/* 2. You: a blue pill with outline stars */
.rate-pill fieldset { display: flex; align-items: center; gap: .25rem .45rem; flex-wrap: wrap; margin: 0; padding: .3rem .4rem .3rem .9rem; border: 1px solid #C9D6F8; border-radius: 999px; background: #F3F6FF; min-width: 0; }
.rate-pill legend { float: left; width: auto; margin: 0; padding: 0; font-size: .82rem; font-weight: 600; color: var(--fc-cobalt); }
.rate-pill .rate-stars { display: inline-flex; }
.rate-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rate-pill .rate-stars label { display: inline-grid; place-items: center; width: 1.55rem; height: 1.85rem; cursor: pointer; border-radius: 50%; font-size: 1.15rem; line-height: 1; transition: transform .12s ease; }
/* Outline stars by default; solid up to the chosen one, or up to the hovered one while previewing. */
.rate-pill { --on: var(--fc-cobalt); --off: #7D97DE; }
.rate-pill.has-vote { --on: #fff; --off: rgba(255,255,255,.5); }
.rate-pill .rate-stars label::before { content: "☆"; color: var(--off); }
.rate-pill .rate-stars:not(:hover):has(.rate-input:checked) label::before,
.rate-pill .rate-stars:hover label::before { content: "★"; color: var(--on); }
.rate-pill .rate-stars:not(:hover) .rate-input:checked + label ~ label::before,
.rate-pill .rate-stars label:hover ~ label::before { content: "☆"; color: var(--off); }
.rate-pill .rate-stars label:hover { transform: scale(1.18); }
.rate-pill .rate-input:focus-visible + label { outline: 3px solid var(--fc-marigold); outline-offset: 0; }
.rate-word { font-size: .82rem; font-weight: 700; color: var(--fc-cobalt); white-space: nowrap; }
.rate-pill.has-vote fieldset { background: var(--fc-cobalt); border-color: var(--fc-cobalt); }
.rate-pill.has-vote legend, .rate-pill.has-vote .rate-word { color: #fff; }
.rate-pill .rating-note { display: block; margin: .3rem 0 0 .9rem; font-size: .78rem; color: var(--fc-muted); }
.rate-pill .rating-note:empty { display: none; }
.rate-pill.is-saving .rate-stars { opacity: .55; pointer-events: none; }
.rate-pill.is-saved .rate-input:checked + label { animation: rate-pop .35s ease; }
@keyframes rate-pop { 50% { transform: scale(1.35); } }

/* 3. The editor: a score seal */
.editor-seal { display: flex; align-items: center; gap: .75rem; padding-top: 1rem; border-top: 1px dashed var(--fc-line); }
.seal { --pct: 0; flex: none; position: relative; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%;
    background: conic-gradient(var(--fc-marigold) calc(var(--pct) * 1%), #E9EDF3 0); }
.seal::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--fc-ink); }
.seal-num { position: relative; margin-top: -.3rem; font-family: var(--fc-display); font-weight: 700; font-size: 1.15rem; line-height: 1; color: #fff; letter-spacing: -0.03em; }
.seal-of { position: absolute; bottom: .5rem; font-size: .55rem; font-weight: 600; color: rgba(255,255,255,.65); }
.seal-text { display: grid; line-height: 1.25; }
.seal-text strong { font-size: .92rem; color: var(--fc-ink); }
.seal-text small { font-size: .78rem; color: var(--fc-muted); }

@media (prefers-reduced-motion: reduce) {
    .rate-pill .rate-stars label { transition: none; }
    .rate-pill .rate-stars label:hover { transform: none; }
    .rate-pill.is-saved .rate-input:checked + label { animation: none; }
    .crowd-dist b { transition: none; }
}

/* --------------------------------------------------------------------------
   Analytics dashboard (/stats)
   -------------------------------------------------------------------------- */
.an-hero-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.an-hero-top h1 { margin-bottom: .35rem; }
.an-hero-top p { margin: 0; }
.an-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; }
.an-custom summary { list-style: none; cursor: pointer; color: rgba(255,255,255,.85); font-weight: 600; font-size: .875rem; padding: .4rem .9rem; border: 1px dashed rgba(255,255,255,.3); border-radius: 999px; }
.an-custom summary::-webkit-details-marker { display: none; }
.an-custom[open] summary { border-style: solid; border-color: var(--fc-marigold); color: #fff; }
.an-custom-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; margin-top: .6rem; color: var(--fc-on-ink); font-size: .85rem; }
.an-custom-form label { display: grid; gap: .2rem; }
.an-compare { display: inline-flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.85) !important; font-size: .875rem; font-weight: 600; text-decoration: none !important; margin-left: auto; }
.an-switch { width: 2.1rem; height: 1.2rem; border-radius: 999px; background: rgba(255,255,255,.2); position: relative; transition: background .15s; }
.an-switch::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: .9rem; height: .9rem; border-radius: 50%; background: #fff; transition: transform .15s; }
.an-compare[aria-checked="true"] .an-switch { background: var(--fc-marigold); }
.an-compare[aria-checked="true"] .an-switch::after { transform: translateX(.9rem); }

.an-live-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: an-pulse 2s infinite; vertical-align: middle; }
.an-live-dot.is-big { width: .9rem; height: .9rem; }
@keyframes an-pulse { 70% { box-shadow: 0 0 0 .5rem rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

.an-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.an-filters-label { color: var(--fc-muted); font-size: .85rem; margin-right: .2rem; }
.an-filter { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: var(--fc-paper); border: 1px solid var(--fc-cobalt); color: var(--fc-ink) !important; font-size: .85rem; font-weight: 600; text-decoration: none !important; box-shadow: var(--fc-shadow); }
.an-filter:hover { background: #EEF2FF; }
.an-filter-key { color: var(--fc-muted); font-weight: 500; }
.an-filter-clear { font-size: .85rem; }

.an-rt-strip { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; margin-bottom: 1rem; background: var(--fc-paper); border: 1px solid var(--fc-line); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow); color: var(--fc-ink) !important; text-decoration: none !important; }
.an-rt-strip:hover { border-color: var(--fc-cobalt); }
.an-rt-mini { display: inline-flex; align-items: flex-end; gap: 2px; height: 1.4rem; margin-left: auto; }
.an-rt-mini i { width: 4px; background: #93A9E8; border-radius: 1px; }
.an-rt-more { color: var(--fc-cobalt); font-weight: 600; font-size: .9rem; }

.an-main { padding: 0; }
.an-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--fc-line); }
.an-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: 1.1rem 1.25rem; background: none; border: 0; border-right: 1px solid var(--fc-line); text-align: left; color: var(--fc-ink); font: inherit; position: relative; min-width: 0; }
.an-kpi:last-child { border-right: 0; }
button.an-kpi { cursor: pointer; }
button.an-kpi:hover { background: var(--fc-surface); }
.an-kpi.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--fc-cobalt); }
.an-kpi-label { color: var(--fc-muted); font-size: .85rem; font-weight: 500; }
.an-kpi.is-active .an-kpi-label { color: var(--fc-cobalt); }
.an-kpi-value { font-size: 1.65rem; }
.an-delta { font-size: .8rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; font-variant-numeric: lining-nums; }
.an-delta.is-up { color: #15803D; background: #DCFCE7; }
.an-delta.is-down { color: #B91C1C; background: #FEE2E2; }
.an-delta.is-flat { color: var(--fc-muted); background: var(--fc-surface); }
.an-chart { position: relative; height: 300px; padding: 1.25rem 1.25rem .5rem; }
.an-chart-note { margin: 0; padding: 0 1.25rem 1rem; color: var(--fc-muted); font-size: .85rem; }
@media (max-width: 991.98px) {
    .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .an-kpi:nth-child(3n) { border-right: 0; }
    .an-kpi:nth-child(-n+3) { border-bottom: 1px solid var(--fc-line); }
}
@media (max-width: 575.98px) {
    .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .an-kpi { padding: .9rem 1rem; border-bottom: 1px solid var(--fc-line); }
    .an-kpi:nth-child(3n) { border-right: 1px solid var(--fc-line); }
    .an-kpi:nth-child(2n) { border-right: 0; }
    .an-kpi-value { font-size: 1.35rem; }
    .an-chart { height: 240px; padding: 1rem .5rem .5rem; }
    .an-compare { margin-left: 0; }
}

.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.25rem; align-items: start; }
.an-grid > .data-block { margin: 0; min-width: 0; }
@media (max-width: 991.98px) { .an-grid { grid-template-columns: minmax(0, 1fr); } }
.an-panel header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.an-tabs { display: flex; flex-wrap: wrap; gap: .15rem; }
.an-tabs button { border: 0; background: none; padding: .3rem .6rem; border-radius: var(--fc-radius-sm); color: var(--fc-muted); font-size: .85rem; font-weight: 600; }
.an-tabs button:hover { color: var(--fc-ink); background: var(--fc-surface); }
.an-tabs button[aria-selected="true"] { color: var(--fc-cobalt); background: #EEF2FF; }

.an-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.an-table th { padding: .55rem 1.25rem; color: var(--fc-muted); font-size: .78rem; font-weight: 600; text-align: left; border-bottom: 1px solid var(--fc-line); }
.an-table td { padding: .2rem 1.25rem; height: 2.4rem; border-bottom: 1px solid #EEF1F5; }
.an-table tr:last-child td { border-bottom: 0; }
.an-table .num { text-align: right; white-space: nowrap; width: 1%; font-variant-numeric: tabular-nums lining-nums; padding-left: .5rem; }
.an-table td.num:nth-child(2) { font-weight: 700; }
.an-label { position: relative; max-width: 0; width: 100%; }
.an-label > a, .an-label > span:not(.an-bar) { position: relative; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fc-ink); padding: .1rem .5rem; }
.an-label > a:hover { color: var(--fc-cobalt); }
.an-label small { display: block; color: var(--fc-muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.an-bar { position: absolute; left: .75rem; top: .3rem; bottom: .3rem; max-width: calc(100% - 1rem); background: #E6ECFB; border-radius: 4px; }
.an-path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; }
.an-favicon { width: 16px; height: 16px; vertical-align: -3px; border-radius: 3px; }
.an-flag { font-size: 1.05rem; }
.an-ico { color: var(--fc-muted); width: 1.1rem; text-align: center; }
.an-empty { margin: 0; padding: 1.5rem 1.25rem; color: var(--fc-muted); font-size: .9rem; }
.an-more { display: block; padding: .6rem 1.25rem; border-top: 1px solid var(--fc-line); font-size: .85rem; font-weight: 600; }

/* Realtime */
.an-rt-hero section { padding: 1.5rem; }
.an-rt-now { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.an-rt-now .display-num { font-size: 3.5rem; }
.an-rt-caption { color: var(--fc-muted); }
.an-rt-caption small { display: block; font-size: .8rem; }
.an-rt-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 1.25rem; }
.an-rt-bars i { flex: 1; background: var(--fc-cobalt); border-radius: 3px 3px 0 0; opacity: .85; transition: height .4s ease; }
.an-rt-bars i:last-child { opacity: 1; background: #16A34A; }
.an-rt-axis { display: flex; justify-content: space-between; margin-top: .4rem; color: var(--fc-muted); font-size: .8rem; }
.an-feed { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.an-feed li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .5rem 1.25rem; border-bottom: 1px solid #EEF1F5; }
.an-feed li:last-child { border-bottom: 0; }
.an-feed-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-feed-ago { color: var(--fc-muted); font-size: .8rem; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .an-live-dot { animation: none; } .an-rt-bars i, .an-switch, .an-switch::after { transition: none; } }

/* --------------------------------------------------------------------------
   Review moderation (admin-reviews.php)
   -------------------------------------------------------------------------- */
.rv-buckets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767.98px) { .rv-buckets { grid-template-columns: minmax(0, 1fr); } }
.rv-bucket { position: relative; border-top: 4px solid var(--rv-c); }
.rv-bucket small { display: block; margin-top: .35rem; color: var(--fc-muted); font-size: .8rem; line-height: 1.35; }
.rv-bucket.is-current { border-color: var(--rv-c); box-shadow: 0 0 0 2px var(--rv-c), var(--fc-shadow); }
.rv-bucket.is-current .display-num { color: var(--rv-c); }
.is-spam { --rv-c: #DC2626; }
.is-suspicious { --rv-c: #D97706; }
.is-genuine { --rv-c: #16A34A; }
.rv-purge { border-left: 4px solid #DC2626; }
.rv-purge section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.rv-purge section > div { flex: 1 1 420px; }
.rv-per-page { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-left: auto; }
.data-block > header:has(.rv-per-page) { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.rv-table td { padding: .9rem 1rem; border-color: #EEF1F5; }
.rv-text { max-width: 72ch; overflow-wrap: anywhere; }
.rv-meta { margin-top: .4rem; color: var(--fc-muted); font-size: .8rem; }
.rv-score { display: inline-grid; place-items: center; min-width: 2.6rem; padding: .2rem .5rem; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; background: var(--rv-c); }
.rv-reasons { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .25rem; justify-items: end; }
.rv-reasons li { font-size: .75rem; color: var(--fc-ink); background: var(--fc-surface); border: 1px solid var(--fc-line); border-radius: 999px; padding: .1rem .55rem; white-space: nowrap; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }

/* Share row (product page) */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.share-label { color: var(--fc-muted); font-weight: 500; margin-right: .25rem; }
.share-btn { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--fc-line); background: var(--fc-paper); color: var(--fc-ink) !important; text-decoration: none !important; font-size: .92rem; transition: border-color .12s, color .12s, background .12s; }
.share-btn:hover { border-color: var(--fc-cobalt); color: var(--fc-cobalt) !important; }
.share-btn.share-native { background: var(--fc-ink); border-color: var(--fc-ink); color: #fff !important; }
.share-note { font-size: .85rem; color: #15803D; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .share-btn { transition: none; } }
