/* --- DUKE STYLE THEME --- */

/* 1. DEFINE COLOR & FONT VARIABLES */
:root {
    /* Dark Mode (Default) */
    --bg-color: #1a1a1a;
    --surface-color: #252525;
    --border-color: #3f3f3f;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent-primary: #ffcc00;
    --accent-primary-hover: #e6b800;
    --shadow-color: rgba(0, 0, 0, 0.3);

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body.light-mode {
    --bg-color: #f7f7f7;
    --surface-color: #ffffff;
    --border-color: #e5e5e5;
    --text-primary: #1a1a1a;
    --text-secondary: #525252;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

/* 2. APPLY BASE STYLES */
body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .font-bold {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
}

/* 3. COMPONENT STYLES */
.main-nav {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}
.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.125rem; /* text-lg */
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}
.nav-link:hover {
    color: var(--text-primary);
}
.nav-link.active {
    background-color: var(--accent-primary);
    color: #1a1a1a;
}

.search-filter-box {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}
.search-input, .rank-select {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-secondary); }
.search-button {
    background-color: var(--accent-primary);
    color: #1a1a1a;
}
.search-button:hover { background-color: var(--accent-primary-hover); }

#paddles-container {
    border: 1px solid var(--border-color);
}
#paddles-table-body tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}
#paddles-table-body tr:hover {
    background-color: var(--surface-color);
}
th {
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.pdp-section {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}
.pdp-image-container {
    background-color: var(--surface-color);
}
.spec-bar-bg { background-color: var(--bg-color); border: 1px solid var(--border-color); position: relative; }
.spec-bar-fill { background-color: var(--accent-primary); }
.spec-item-row { border-bottom: 1px solid var(--border-color); }

.cta-primary {
    background-color: var(--accent-primary);
    color: #1a1a1a;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease;
}
.cta-primary:hover { background-color: var(--accent-primary-hover); }

.cta-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.cta-secondary:hover {
    background-color: var(--accent-primary);
    color: #1a1a1a;
}

.discount-module {
    background-color: var(--bg-color);
    border: 1px dashed var(--accent-primary);
}
.discount-text { color: var(--accent-primary); }
.copy-btn {
    background-color: var(--accent-primary);
    color: #1a1a1a;
    transition: background-color 0.2s ease;
}
.copy-btn:hover { background-color: var(--accent-primary-hover); }
.copy-btn-footnote {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    vertical-align: middle;
}
.copy-btn-footnote:hover {
    background-color: var(--surface-color);
    color: var(--text-primary);
}

#back-to-list-btn {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-family: var(--font-heading);
    font-weight: 600;
    transition: all 0.2s ease;
}
#back-to-list-btn:hover {
    background-color: var(--accent-primary);
    color: #1a1a1a;
}

#theme-toggle-btn {
    background-color: var(--surface-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 14px 0 var(--shadow-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out;
}
#theme-toggle-btn:hover {
    transform: translateY(-2px);
    color: var(--text-primary);
    box-shadow: 0 6px 20px 0 var(--shadow-color);
}
#theme-toggle-btn svg { display: none; }

.view { display: none; }
.view.active { display: block; }

/* Star Rating Styles */
.star-rating { display: inline-flex; }
.star { width: 1.25rem; height: 1.25rem; position: relative; }
.star svg { width: 100%; height: 100%; }
.star.filled { color: var(--accent-primary); }
.star.empty { color: var(--border-color); }
.star.half { position: relative; color: var(--accent-primary); }
.star.half::before { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 100%; background-color: var(--border-color); clip-path: inset(0 0 0 50%); }

/* Blog Styles */
.article-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px 0 var(--shadow-color);
}
.back-link {
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    transition: opacity 0.2s ease;
}
.back-link:hover { opacity: 0.8; }
.article-content h1, .article-content h2, .article-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}
.article-content p {
    margin-bottom: 1em;
    line-height: 1.7;
}
.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1em;
    list-style-position: outside;
}
.article-content li {
    margin-bottom: 0.5em;
}
.article-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}
/* Blog article body: elements markdown can emit that had no styling. */
.article-content h4, .article-content h5, .article-content h6 {
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}
.article-content strong { color: var(--text-primary); }
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5em 0;
}
.article-content blockquote {
    border-left: 3px solid var(--accent-primary);
    padding: 0.25em 0 0.25em 1rem;
    margin: 1.5em 0;
    color: var(--text-primary);
    font-style: italic;
}
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.925rem;
}
.article-content th, .article-content td {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    text-align: left;
}
.article-content th {
    background-color: var(--surface-color);
    font-family: var(--font-heading);
    color: var(--text-primary);
}
.article-content code {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    font-size: 0.9em;
}
.article-content pre {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5em 0;
}
.article-content pre code { border: none; background: none; padding: 0; }
.article-content hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2em 0;
}

/* Text-on-background accent. The brand yellow is fine on dark backgrounds
   but fails contrast on white (about 1.5:1), so light mode uses a deep amber
   for text while buttons and badges keep the yellow. */
:root { --link-color: var(--accent-primary); }
body.light-mode { --link-color: #8a5a00; }
.discount-text, .article-content a, .back-link { color: var(--link-color); }

/* ===================================================================
   Static-site components (rankings, brand pages, methodology, PDP).
   Built on the theme variables above so dark and light mode both work.
   =================================================================== */

.site-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--link-color);
    letter-spacing: -0.01em;
}
.main-nav .nav-link { font-size: 1rem; padding: 0.4rem 0.85rem; }

a { text-underline-offset: 2px; }
main a:not([class]) { color: var(--link-color); }
main a:not([class]):hover { text-decoration: underline; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li { color: var(--text-secondary); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; opacity: 0.6; }
.breadcrumbs a { color: var(--link-color); }
.breadcrumbs a:hover { color: var(--text-primary); text-decoration: underline; }

.page-meta { font-size: 0.875rem; color: var(--text-secondary); }
.eyebrow { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.eyebrow a { color: var(--link-color); }

.answer-box {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    line-height: 1.65;
}
.answer-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--link-color);
    margin-bottom: 0.35rem;
}
.answer-box a { color: var(--link-color); font-weight: 600; }
.answer-lead { color: var(--text-primary); line-height: 1.65; }

.pick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
@media (min-width: 768px) { .pick-list { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; } }
.pick-label { display: inline-block; min-width: 7.5rem; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.pick-value { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
.pick-more { font-size: 0.75rem; font-weight: 400 !important; color: var(--text-secondary) !important; text-decoration: underline; margin-left: 0.25rem; }

.insight-callout {
    font-size: 0.925rem;
    padding: 0.75rem 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
}
.insight-callout a { color: var(--link-color); }

.link-grid { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.link-grid a {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.link-grid a:hover { border-color: var(--accent-primary); background-color: var(--surface-color); }

.link-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.link-card .font-bold { color: var(--text-primary); }
.link-card:hover { transform: translateY(-2px); border-color: var(--accent-primary); }

/* Data tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: 0.5rem; -webkit-overflow-scrolling: touch; }
.data-table { border-collapse: collapse; min-width: 100%; }
.data-table th, .data-table td { padding: 0.6rem 0.75rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border-color); }
.data-table thead th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    background-color: var(--surface-color);
    position: sticky; top: 0;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background-color: var(--surface-color); }
.data-table tbody th { font-weight: 600; color: var(--text-primary); }
.data-table .col-highlight { color: var(--link-color); font-weight: 700; }
.data-table thead .col-highlight { color: var(--link-color); }
.data-table .col-rank { color: var(--text-secondary); font-weight: 700; width: 2.5rem; }
.data-table .col-paddle { white-space: normal; min-width: 11rem; }
.data-table .col-paddle a { color: var(--text-primary); font-weight: 600; }
.data-table .col-paddle a:hover { color: var(--link-color); text-decoration: underline; }
.brand-sub { display: block; font-size: 0.75rem; color: var(--text-secondary); }
.na { opacity: 0.45; }
.data-table tr.current-row td { background-color: var(--surface-color); }
tr[hidden] { display: none; }

/* Paddle page */
.score-context { font-size: 0.75rem; color: var(--text-secondary); margin: 0.15rem 0 0 5rem; }
.spec-table { border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; }
.spec-table th { font-weight: 500; color: var(--text-secondary); width: 40%; }
.spec-table td { color: var(--text-primary); font-weight: 600; }
.pros-box, .cons-box { background-color: var(--surface-color); border: 1px solid var(--border-color); }
.pros-box { border-top: 3px solid #22c55e; }
.cons-box { border-top: 3px solid #f97316; }
.pros-list, .cons-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.pros-list li, .cons-list li { padding-left: 1.4rem; position: relative; margin-bottom: 0.5rem; line-height: 1.5; }
.pros-list li::before { content: "+"; position: absolute; left: 0; font-weight: 800; color: #22c55e; }
.cons-list li::before { content: "\2212"; position: absolute; left: 0; font-weight: 800; color: #f97316; }
.rank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.rank-badge {
    display: inline-block; min-width: 2.5rem; text-align: center;
    background-color: var(--accent-primary); color: #1a1a1a;
    font-family: var(--font-heading); font-weight: 700; font-size: 0.8rem;
    border-radius: 9999px; padding: 0.1rem 0.5rem;
}

/* Ranking cards */
.rank-card { background-color: var(--surface-color); border: 1px solid var(--border-color); }
.rank-number {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--accent-primary); color: #1a1a1a;
    font-family: var(--font-heading); font-weight: 800;
}
.rank-card h3 a { color: var(--text-primary); }
.rank-card h3 a:hover { color: var(--link-color); text-decoration: underline; }
.rank-value { color: var(--link-color); }
.score-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.score-chip {
    font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 9999px;
    border: 1px solid var(--border-color); color: var(--text-primary); font-weight: 600;
}
.score-chip span { color: var(--text-secondary); font-weight: 400; margin-right: 0.15rem; }
.card-points { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.card-points li { padding-left: 1.2rem; position: relative; margin-bottom: 0.3rem; line-height: 1.45; }
.card-points li.pro::before { content: "+"; position: absolute; left: 0; font-weight: 800; color: #22c55e; }
.card-points li.con::before { content: "\2212"; position: absolute; left: 0; font-weight: 800; color: #f97316; }

/* FAQ */
.faq-list { border: 1px solid var(--border-color); border-radius: 0.5rem; overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--border-color); }
.faq-item summary {
    cursor: pointer; list-style: none; padding: 0.85rem 1rem;
    font-family: var(--font-heading); font-weight: 600; color: var(--text-primary);
    display: flex; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--link-color); font-weight: 800; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 1rem 1rem; line-height: 1.65; }

/* Brand promo */
.promo-box { background-color: var(--surface-color); border: 1px dashed var(--accent-primary); }
.promo-code { background-color: var(--bg-color); color: var(--link-color); font-size: 1.15rem; border: 1px solid var(--border-color); }

/* Methodology */
.prose-block p { line-height: 1.7; }
.def-list dt { font-family: var(--font-heading); font-weight: 600; color: var(--text-primary); margin-top: 1rem; }
.def-list dd { margin: 0.25rem 0 0; line-height: 1.65; }
.insight-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.insight-list li { padding: 0.75rem 1rem; background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: 0.5rem; line-height: 1.6; }
.insight-list strong { color: var(--text-primary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border-color); }
.footer-heading { font-family: var(--font-heading); font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--text-primary); text-decoration: underline; }
.disclosure { font-size: 0.75rem; line-height: 1.6; max-width: 48rem; }
@media (max-width: 767px) {
    .pick-label { display: block; min-width: 0; margin-bottom: 0.1rem; }
    .score-context { margin-left: 0; }
}

/* Links that should look exactly like the surrounding text (homepage paddle
   names, the brand under a paddle's name) — real links for crawlers, no
   visual change for visitors. */
.row-link, .brand-link { color: inherit; text-decoration: none; }
.row-link:hover, .brand-link:hover { text-decoration: underline; }

/* "How it compares" — closed by default so paddle pages look as they always have. */
.compare-details { background-color: var(--surface-color); border: 1px solid var(--border-color); }
.compare-details > summary {
    cursor: pointer; list-style: none; padding: 1rem 1.25rem;
    font-family: var(--font-heading); font-weight: 600; color: var(--text-primary);
    display: flex; justify-content: space-between; align-items: center;
}
.compare-details > summary::-webkit-details-marker { display: none; }
.compare-details > summary::after { content: "+"; color: var(--link-color); font-weight: 800; font-size: 1.25rem; }
.compare-details[open] > summary::after { content: "\2212"; }
.compare-details[open] > summary { border-bottom: 1px solid var(--border-color); }
.compare-body { padding: 0.25rem 1.25rem 1.25rem; }
.compare-body .answer-lead { margin-top: 1rem; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; }
.site-footer .disclosure { max-width: 36rem; }

/* Under a buy button that carries a promo code */
.code-hint { color: var(--text-secondary); }

/* PaddleDB score line under the brand name on paddle pages */
.pdb-score { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; font-size: 0.875rem; }
.pdb-score-badge {
    display: inline-flex; align-items: baseline; gap: 0.1rem;
    background-color: var(--accent-primary); color: #1a1a1a;
    font-family: var(--font-heading); font-weight: 700; font-size: 1rem;
    padding: 0.15rem 0.6rem; border-radius: 9999px; line-height: 1.4;
}
.pdb-score-badge span { font-size: 0.7rem; font-weight: 600; opacity: 0.75; }
.pdb-score-label { font-family: var(--font-heading); font-weight: 600; color: var(--text-primary); }
.pdb-score-rank { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.pdb-score-rank:hover { color: var(--text-primary); }

/* Data license page lists */
.license-list { list-style: disc; padding-left: 1.25rem; margin: 0; }
.license-list li { margin-bottom: 0.5rem; line-height: 1.65; }

/* ===================================================================
   Blog posts: takeaways, contents, live data blocks, author box.
   =================================================================== */
.takeaway-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.takeaway-list li { padding-left: 1.4rem; position: relative; line-height: 1.6; }
.takeaway-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--link-color); font-weight: 700; }

.post-toc { border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 0.9rem 1.1rem; margin-bottom: 2rem; font-size: 0.925rem; }
.post-toc-title { font-family: var(--font-heading); font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; }
.post-toc ol { margin: 0; padding-left: 1.2rem; list-style: decimal; }
.post-toc li { margin-bottom: 0.25rem; }
.post-toc a { color: var(--link-color); }

.post-hero img { display: block; }
.article-content h2 { font-size: 1.5rem; scroll-margin-top: 1rem; }
.article-content h3 { font-size: 1.2rem; }

.data-block { margin: 2rem 0; }
.data-block-title { font-family: var(--font-heading); font-weight: 600; color: var(--text-primary); margin-bottom: 0.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.data-block-live { font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--link-color); border: 1px solid var(--border-color); border-radius: 9999px; padding: 0.05rem 0.5rem; }
.data-block-foot { font-size: 0.85rem; margin-top: 0.5rem; }
.data-block-foot a { color: var(--link-color); }
.article-content .data-block table { margin: 0; font-size: 0.875rem; }
.article-content .data-block th, .article-content .data-block td { border: 0; border-bottom: 1px solid var(--border-color); }

.paddle-card { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 1rem; }
.paddle-card-img { width: 96px; height: 144px; object-fit: contain; flex: none; margin: 0 !important; border-radius: 0.375rem; }
.paddle-card-brand { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin: 0 !important; }
.paddle-card-name { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; margin: 0 !important; }
.paddle-card-name a { color: var(--text-primary) !important; text-decoration: none !important; }
.paddle-card-name a:hover { text-decoration: underline !important; }
.paddle-card p { margin-bottom: 0; }
.paddle-card-cta a { text-decoration: none !important; }
.paddle-card-cta .cta-primary { color: #1a1a1a !important; }

.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.related-list a { color: var(--link-color); font-weight: 500; }

.author-box { background-color: var(--surface-color); border: 1px solid var(--border-color); }
.author-box a { color: var(--text-primary); }
.author-photo { width: 56px; height: 56px; border-radius: 9999px; object-fit: cover; flex: none; }
.author-photo-lg { width: 96px; height: 96px; border-radius: 9999px; object-fit: cover; flex: none; }

/* ── Promo codes: brand page hero, /deals list, paddle deal cards ─────────── */
.promo-hero { background-color: var(--surface-color); border: 1px dashed var(--accent-primary); text-align: center; max-width: 36rem; margin-left: auto; margin-right: auto; }
.promo-hero-label { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--text-primary); }
.promo-hero-row { display: flex; justify-content: center; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.promo-code-lg { font-size: 1.5rem; letter-spacing: 0.12em; padding: 0.35rem 1rem; border-radius: 0.375rem; font-weight: 700; }
.promo-hero-cta { color: #1a1a1a !important; text-decoration: none !important; }
.promo-hero-link { color: var(--link-color); }
.promo-hero-facts { color: var(--text-secondary); }
.howto-steps { list-style: decimal; padding-left: 1.4rem; line-height: 1.7; }
.howto-steps li + li { margin-top: 0.4rem; }
.other-discounts { list-style: disc; padding-left: 1.4rem; line-height: 1.7; }
.other-discounts li + li { margin-top: 0.4rem; }
.other-discounts strong { color: var(--text-primary); }

.deal-list { border: 1px solid var(--border-color); border-radius: 0.5rem; overflow: hidden; }
/* Fixed columns so every row lines up, whatever the brand name or code length. */
.deal-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem 15rem 8.5rem; align-items: center; column-gap: 1rem; padding: 0.8rem 1rem; }
.deal-row + .deal-row { border-top: 1px solid var(--border-color); }
.deal-row-featured { background-color: var(--surface-color); }
.deal-brand { min-width: 0; }
.deal-brand-name { font-family: var(--font-heading); font-weight: 700; color: var(--text-primary); overflow-wrap: anywhere; }
.deal-brand-name a { color: var(--text-primary); text-decoration: none; }
.deal-brand-name a:hover { text-decoration: underline; }
.deal-brand-sub { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.1rem; }
.deal-discount { font-weight: 700; color: var(--link-color); line-height: 1.3; min-width: 0; }
.deal-code { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; min-width: 0; }
.deal-code .promo-code { font-size: 0.95rem; letter-spacing: 0.06em; padding: 0.15rem 0.55rem; border-radius: 0.3rem; overflow-wrap: anywhere; min-width: 0; }
.deal-code .copy-btn-footnote { flex: none; }
.deal-action { min-width: 0; }
.deal-shop { display: block; width: 100%; text-decoration: none !important; }
a.cta-primary.deal-shop { color: #1a1a1a !important; }
@media (max-width: 860px) {
  .deal-row { column-gap: 0.75rem; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand discount" "code action"; row-gap: 0.6rem; }
  .deal-brand { grid-area: brand; }
  .deal-discount { grid-area: discount; text-align: right; max-width: 10rem; justify-self: end; }
  .deal-code { grid-area: code; }
  .deal-action { grid-area: action; width: 8.5rem; justify-self: end; }
}

.deal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.deal-card { display: flex; gap: 1rem; background-color: var(--surface-color); border: 1px solid var(--border-color); }
.deal-card-img { width: 72px; height: 108px; object-fit: contain; flex: none; border-radius: 0.375rem; }
.deal-card-body { flex: 1; min-width: 0; }
.deal-card-name { font-family: var(--font-heading); font-weight: 700; }
.deal-card-name a { color: var(--text-primary); text-decoration: none; }
.deal-card-name a:hover { text-decoration: underline; }
.deal-card-price { margin-top: 0.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.deal-card-price strong { color: var(--text-primary); }
.deal-card .cta-primary { color: #1a1a1a !important; text-decoration: none !important; }
.deal-card .cta-secondary { text-decoration: none !important; }

/* Four nav items (with Deals) need tighter spacing on phones. */
@media (max-width: 480px) {
  .main-nav.space-x-6 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }
  .main-nav .nav-link { padding: 0.35rem 0.6rem; font-size: 0.95rem; }
}

/* Editable pages (methodology, data license) */
.page-content ul:not(.insight-list) { list-style: disc; padding-left: 1.25rem; }
.page-content ol { list-style: decimal; padding-left: 1.4rem; }
.page-content .insight-list { padding-left: 0; margin-left: 0; list-style: none; }
.page-content .def-list { margin-bottom: 1rem; }

/* Blog featured images: fixed 16:9 frame (see mediaFrame in generate-blog.js).
   whole = full image on white (product shots); blur = full image over a blurred
   copy of itself (portrait photos); fill = covers the frame (wide photos). */
.media-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background-color: var(--surface-color); }
.media-frame-img { position: relative; display: block; width: 100%; height: 100%; }
.media-frame-whole { background-color: #ffffff; }
.media-frame-whole .media-frame-img { object-fit: contain; padding: 0.75rem; }
.media-frame-blur .media-frame-img { object-fit: contain; }
.media-frame-bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(26px) brightness(0.8); transform: scale(1.1); }
.media-frame-fill .media-frame-img { object-fit: cover; }
.post-hero .media-frame { border-radius: 0.5rem; }
.article-card .media-frame { border-bottom: 1px solid var(--border-color); }

/* Paddle page specs grid: four labelled groups (see pdpSpecs in generate-pages.js). */
.spec-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem 1.5rem; font-size: 0.875rem; }
.spec-group-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--link-color); padding-bottom: 0.35rem; margin-bottom: 0.15rem; border-bottom: 2px solid var(--border-color); }
.spec-groups dd { overflow-wrap: anywhere; }
.spec-na { font-weight: 500; opacity: 0.55; }
.spec-note { color: var(--text-secondary); }
@media (max-width: 1023px) { .spec-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; } }
@media (max-width: 560px) { .spec-groups { grid-template-columns: minmax(0, 1fr); } }

/* Homepage table: clickable column headers that rank the table. */
.th-sort { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; }
.th-sort:hover { color: var(--link-color); }
.th-sort:focus-visible { outline: 2px solid var(--link-color); outline-offset: 3px; border-radius: 2px; }
.th-sort-arrow { font-size: 0.6rem; opacity: 0.35; }
.th-sort.is-active { color: var(--link-color); }
.th-sort.is-active .th-sort-arrow { opacity: 1; }

/* Homepage table on phones: the paddle column stays put and the score for
   the current sort sits right next to it (script.js moves that column), so
   it fits on screen. The other scores scroll in from the right, and a fade on
   the right edge shows there's more until you reach the end. */
.table-fade-wrap { position: relative; }
.table-fade-wrap::after {
    content: ''; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 2.75rem;
    pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
    background: linear-gradient(to right, rgba(0, 0, 0, 0), var(--bg-color));
    border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem;
}
.table-fade-wrap.has-more::after { opacity: 1; }
/* Short names (sheet column "shortName") replace the full name on phones only. */
.name-short { display: none; }
@media (max-width: 640px) {
    #paddle-table th, #paddle-table td { padding-left: 0.75rem; padding-right: 0.75rem; }
    #paddle-table th { letter-spacing: 0.03em; }
    #paddle-table [data-col="paddle"] {
        position: sticky; left: 0; z-index: 1; background-color: var(--bg-color);
        /* Leaves room for one score column (about 6.5rem) beside it, plus a peek of the next. */
        width: calc(100vw - 2rem - 2px - 8.25rem); min-width: calc(100vw - 2rem - 2px - 8.25rem); max-width: calc(100vw - 2rem - 2px - 8.25rem);
        white-space: normal; box-shadow: 1px 0 0 var(--border-color);
    }
    #paddles-table-body tr:hover [data-col="paddle"] { background-color: var(--surface-color); }
    #paddle-table .name-full { display: none; }
    #paddle-table .name-short { display: inline; }
    #paddle-table td[data-col="paddle"] img { width: 2.5rem; height: auto; }
    #paddle-table td[data-col="paddle"] .space-x-4 > * + * { margin-left: 0.75rem; }
    /* Names too long for the column wrap onto a second line (never "…"). For a
       one-line name on phones, fill in the sheet's shortName column. */
}

/* ── Black Friday page (lib/generate-sales.js) ───────────────────────────
   Deliberately quiet: one accent colour, text links instead of buttons,
   status as a small dot, lists and tables instead of boxed cards. */
.section-lede { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* Status: small dot + text */
.sale-status { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.sale-status::before { content: ''; width: 0.45rem; height: 0.45rem; border-radius: 50%; background-color: currentColor; flex: none; }
.sale-status-live { color: #16a34a; }
.sale-status-upcoming { color: var(--link-color); }
.sale-status-ended { color: var(--text-secondary); opacity: 0.8; }

/* Prices */
.sale-price { font-weight: 700; color: var(--text-primary); }
.sale-was { color: var(--text-secondary); font-size: 0.9em; }

/* Codes: plain monospace text + small Copy link */
.code-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0.04em; color: var(--text-primary); }
.copy-link { background: none; border: 0; padding: 0; margin-left: 0.25rem; font: inherit; font-size: 0.75rem; color: var(--link-color); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.code-note { display: block; font-size: 0.75rem; color: var(--text-secondary); }
.shop-link { font-weight: 600; white-space: nowrap; color: var(--link-color); }

/* Picks: a ranked list with hairline dividers */
.bf-picks { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border-color); }
.pick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.5rem; align-items: center; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border-color); }
.pick-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.pick-name { font-weight: 600; margin-top: 0.15rem; }
.pick-name a { color: var(--text-primary); }
.pick-score { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-left: 0.35rem; white-space: nowrap; }
.pick-buy { text-align: right; }
.pick-sub { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.1rem; }
.pick-shop { text-align: right; }
.pick-ended { opacity: 0.5; }
@media (max-width: 640px) {
  .pick-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "buy shop"; row-gap: 0.4rem; }
  .pick-main { grid-area: main; }
  .pick-buy { grid-area: buy; text-align: left; }
  .pick-shop { grid-area: shop; align-self: end; }
}

/* Filters: understated text tabs */
.sale-filters { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0.25rem 0 0.75rem; font-size: 0.875rem; }
.sale-filter { background: none; border: 0; padding: 0.2rem 0; font: inherit; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; }
.sale-filter:hover { color: var(--text-primary); }
.sale-filter.is-active { color: var(--text-primary); border-bottom-color: var(--accent-primary); }

/* Sale table (also the sale calendar) */
.sale-table th[scope="row"] { font-weight: 600; white-space: nowrap; vertical-align: top; }
.sale-table td { vertical-align: top; }
.sale-brand { display: block; }
.sale-brand a { color: var(--text-primary); }
.sale-table .sale-status { margin-top: 0.2rem; }
.sale-headline { display: block; color: var(--text-primary); font-weight: 500; }
.sale-extra { display: block; font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.15rem; }
.sale-dates { white-space: nowrap; color: var(--text-secondary); }
.sale-shop-cell { text-align: right; }
.sale-table tr[hidden] { display: none !important; }
@media (max-width: 700px) {
  .sale-table thead { display: none; }
  .sale-table, .sale-table tbody, .sale-table tr, .sale-table th, .sale-table td { display: block; width: 100%; }
  .sale-table tr { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); }
  .sale-table th[scope="row"], .sale-table td { border: 0 !important; padding: 0.15rem 0 !important; text-align: left; white-space: normal; }
  .sale-table th[scope="row"] { display: flex; justify-content: space-between; align-items: center; }
  .sale-table .sale-brand { display: inline; }
}
.sale-ended summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.sale-empty { color: var(--text-secondary); }

/* Key dates: one quiet row */
.key-dates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem 1.5rem; font-size: 0.9rem; }
.key-dates li { border-top: 1px solid var(--border-color); padding-top: 0.5rem; color: var(--text-primary); font-weight: 500; }
.key-dates span { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
@media (max-width: 640px) { .key-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Season links on /deals and brand pages */
.bf-banner, .bf-callout { display: block; padding: 0.55rem 0.9rem; margin-bottom: 1.25rem; border-left: 3px solid var(--accent-primary); background-color: var(--surface-color); border-radius: 0.25rem; color: var(--text-primary) !important; text-decoration: none !important; font-size: 0.875rem; }
.bf-banner:hover, .bf-callout:hover { border-left-color: var(--link-color); }
.bf-callout-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-right: 0.25rem; }

.data-table .promo-code { font-size: 0.85rem; padding: 0.1rem 0.45rem; border-radius: 0.3rem; letter-spacing: 0.06em; }

/* Average marker on rating bars (avgMarker in generate-pages.js) */
.spec-bar-avg { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background-color: #a3a3a3; pointer-events: none; }
.avg-legend { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; font-size: 0.72rem; color: var(--text-secondary); }
.avg-legend-mark { display: inline-block; width: 2px; height: 0.8rem; border-radius: 1px; background-color: #a3a3a3; }
