/* 4thewin - Tool Reviews Site Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e67e22;
    --secondary: #252d3d;
    --background: #1e2530;
    --surface: #252d3d;
    --text: #d4dae3;
    --text-muted: #8a95a8;
    --text-dim: #5a6577;
    --border: #3a4556;
    --hover: #2a3342;
}

body {
    font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background: var(--secondary);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Archivo', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    display: block;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(230, 126, 34, 0.1);
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--hover);
    border: 1px solid var(--border);
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.nav-item:hover .dropdown {
    display: block;
}

.dropdown a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    display: block;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown a:hover {
    background: var(--secondary);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 4rem 3rem;
}

/* Hero Section */
.hero {
    margin-bottom: 3rem;
}

.hero h1 {
    font-family: 'Archivo', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
}

/* Search Section */
.search-section {
    background: var(--secondary);
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 3rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    background: var(--primary);
    color: var(--background);
    border: none;
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
}

.search-btn:hover {
    background: #f39c12;
}

.filter-tabs {
    display: flex;
    gap: 1rem;
}

.filter-tab {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

/* Video List */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-item {
    background: var(--secondary);
    border-left: 4px solid var(--primary);
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2.5rem;
    padding: 2rem;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.content-item:hover {
    background: var(--hover);
    transform: translateX(8px);
}

.item-visual {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--hover) 0%, var(--background) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-label {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.item-heading {
    font-family: 'Archivo', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #fff;
    line-height: 1.3;
}

.item-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-time {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.item-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.3rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--background);
}

.btn-primary:hover {
    background: #f39c12;
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--secondary);
    border-top: 2px solid var(--primary);
    padding: 3rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-section h3 {
    font-family: 'Archivo', sans-serif;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom {
    max-width: 1600px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .content-item {
        grid-template-columns: 300px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-wrap {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .content-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}


/* Social Media Icons (inline SVG, see lib/icons.js) */
.social-icon {
    padding: 0.5rem !important;
}


/* One compact row on mobile; original navigation remains the no-JS fallback. */
.nav-toggle, .mobile-nav-wrap { display: none; }
.nav-group-toggle { background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.nav-link:focus-visible, .strip-dropdown a:focus-visible, .dropdown a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav-group-toggle[aria-expanded="true"] + .dropdown,
.nav-item:focus-within .dropdown { display: block; }
.strip-dropdown[hidden] { display: none; }
@media (max-width: 1100px) {
    header.nav-ready .header-wrap {
        position: relative; flex-direction: row; gap: 0.6rem; padding: 0 0.5rem; min-height: 46px;
    }
    header.nav-ready .logo { flex-shrink: 0; font-size: 1.1rem; line-height: 1.2; }
    header.nav-ready #site-navigation { display: none; }
    .mobile-nav-wrap { display: block; position: relative; min-width: 0; flex: 1; }
    .mobile-nav-strip {
        display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0;
        overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    }
    .mobile-nav-strip::-webkit-scrollbar { display: none; }
    .mobile-nav-strip > .nav-link {
        flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px;
        padding: 0 0.65rem; font-size: 0.82rem; white-space: nowrap;
    }
    .strip-group-toggle { background: none; border: 0; font-family: inherit; cursor: pointer; }
    .mobile-nav-wrap::before, .mobile-nav-wrap::after {
        content: ''; position: absolute; top: 0; bottom: 0; width: 16px; pointer-events: none; z-index: 1; opacity: 0;
    }
    .mobile-nav-wrap::before { left: 0; background: linear-gradient(to right, var(--secondary), transparent); }
    .mobile-nav-wrap::after { right: 0; background: linear-gradient(to left, var(--secondary), transparent); }
    .mobile-nav-wrap.has-before::before, .mobile-nav-wrap.has-more::after { opacity: 1; }
    .strip-dropdown {
        position: absolute; top: 100%; left: 0; right: 0; z-index: 2;
        max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
        padding: 0.5rem; background: var(--secondary); border-bottom: 2px solid var(--primary);
        box-shadow: 0 8px 16px #0005;
    }
    .strip-dropdown a { display: block; min-height: 44px; padding: 0.6rem 1rem; color: var(--text); text-decoration: none; }
    .strip-dropdown a:hover { background: var(--hover); }
}

/* Links in video descriptions and the Featured Products buttons (affiliate links are rel="sponsored"). */
.video-description { overflow-wrap: anywhere; }
.video-description a { color: #f0a35e; text-decoration: underline; overflow-wrap: anywhere; }
.video-description a:hover, .video-description a:focus { color: #ffc48a; }
.full-test-link { margin: 0 0 1rem; }
.full-test-link a { color: #f0a35e; text-decoration: underline; overflow-wrap: anywhere; }
.full-test-link a:hover, .full-test-link a:focus { color: #ffc48a; }
.full-test-link a:focus-visible { outline: 2px solid #ffc48a; outline-offset: 3px; }
.product-link { display: block; padding: 0.5rem 1rem; text-decoration: none; font-size: 0.85rem; font-weight: 600; text-align: center; color: #c3cad6; border: 1px solid #3a4556; transition: all 0.2s; }
.product-link-amazon { background: #e67e22; color: #1e2530; border-color: #e67e22; }

/* Video page layout: two columns on a wide screen, one on a phone or small tablet (it was a fixed
   1fr + 380px grid, which made the page 876px wide on a 390px phone and pushed the product column off screen). */
.video-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 3rem; margin-bottom: 3rem; }
.video-main { background: #252d3d; padding: 2rem; min-width: 0; }
.video-title { font-family: 'Archivo', sans-serif; font-size: 2.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 1rem; color: #fff; overflow-wrap: anywhere; }
.video-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; font-size: 0.9rem; color: #8a95a8; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid #3a4556; }
.video-aside { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
@media (max-width: 960px) {
  .video-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .video-title { font-size: 2rem; }
}
@media (max-width: 600px) {
  .video-main { padding: 1rem; }
  .video-title { font-size: 1.6rem; }
  .video-meta { margin-bottom: 1.25rem; padding-bottom: 1.25rem; }
}

/* Transcript under the video description */
.transcript-section { margin-top: 2rem; padding: 1.5rem; background: rgba(255, 255, 255, 0.03); border: 1px solid #3a4556; }
.transcript-section h2 { font-family: 'Archivo', sans-serif; font-size: 1.3rem; font-weight: 700; margin: 0 0 0.25rem; color: #e67e22; }
.transcript-note { font-size: 0.8rem; color: #8a95a8; margin: 0 0 1rem; }
.transcript-body { max-height: 420px; overflow-y: auto; line-height: 1.8; color: #c3cad6; font-size: 0.95rem; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: #e67e22 transparent; }
.transcript-body:focus-visible { outline: 2px solid #e67e22; outline-offset: 2px; }
.transcript-body p { margin: 0 0 1rem; }
.transcript-body p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .transcript-section { padding: 1rem; } .transcript-body { max-height: 320px; } }

/* Listing pages (PR 4b): numbered pagination under the video list */
.pagination { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 2rem 0; }
.page-link { display: inline-block; min-width: 2.5rem; padding: 0.6rem 0.9rem; text-align: center; text-decoration: none; color: #c3cad6; background: #252d3d; border: 1px solid #3a4556; font-weight: 600; }
a.page-link:hover, a.page-link:focus-visible { border-color: #e67e22; color: #fff; }
.page-current { background: #e67e22; border-color: #e67e22; color: #1e2530; }

/* Video pages (PR 4b): breadcrumb and "More like this" */
.breadcrumb { margin-bottom: 2rem; font-size: 0.9rem; color: #8a95a8; overflow-wrap: anywhere; }
.breadcrumb a { color: #8a95a8; text-decoration: none; }
.breadcrumb a:hover, .breadcrumb a:focus-visible { color: #e67e22; text-decoration: underline; }
.related-videos { background: #252d3d; padding: 1.5rem; border-left: 4px solid #3a4556; min-width: 0; }
.related-videos h2 { font-family: 'Archivo', sans-serif; font-size: 1.2rem; font-weight: 700; margin: 0 0 1rem; color: #fff; }
.series-nav { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.series-link { display: block; padding: 0.6rem 0.8rem; border: 1px solid #3a4556; color: #d4dae3; text-decoration: none; font-size: 0.9rem; line-height: 1.4; overflow-wrap: anywhere; }
.series-link:hover, .series-link:focus-visible { border-color: #e67e22; }
.series-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #e67e22; font-weight: 700; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.related-item { display: flex; gap: 0.75rem; align-items: flex-start; text-decoration: none; color: #d4dae3; }
.related-item:hover .related-title, .related-item:focus-visible .related-title { color: #e67e22; }
.related-thumb { flex: 0 0 auto; width: 120px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #1e2530; border: 1px solid #3a4556; }
.related-text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.related-title { font-size: 0.9rem; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.related-meta { font-size: 0.8rem; color: #8a95a8; }
@media (max-width: 600px) { .related-videos { padding: 1rem; } .related-thumb { width: 100px; } }

/* Listing cards (PR 4b): a long unbroken word (a hashtag run, a pasted URL) must not widen the card past the screen */
.content-item { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
@media (max-width: 1200px) { .content-item { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); } }
@media (max-width: 768px) { .content-item { grid-template-columns: minmax(0, 1fr); } }
.item-details { min-width: 0; }
.item-heading, .item-text { overflow-wrap: anywhere; }
/* ===== Home page: topics and latest sections (generate-home-page.js) ===== */
.home-topics { margin: 0 0 3rem; }
.home-topics h2, .home-latest h2 { font-family: 'Archivo', sans-serif; font-size: 1.6rem; font-weight: 700; color: #fff; margin-bottom: 1.25rem; }
.topic-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 2rem; }
.topic-group { background: var(--secondary); border-left: 4px solid var(--primary); padding: 1.5rem; min-width: 0; }
.topic-group h3 { font-family: 'Archivo', sans-serif; font-size: 0.85rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); margin-bottom: 1rem; }
.topic-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.topic-list a { color: #fff; font-weight: 700; text-decoration: none; display: inline-flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; align-items: baseline; }
.topic-list a:hover, .topic-list a:focus-visible { color: var(--primary); text-decoration: underline; }
.topic-count { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }
.topic-list p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin-top: 0.15rem; }
.home-latest { margin-top: 3.5rem; }
.home-latest-intro { color: var(--text-muted); margin: -0.75rem 0 1.5rem; }
.home-more, .home-deals-link { margin-top: 1.5rem; font-weight: 700; }
.home-more a, .home-deals-link a { color: var(--primary); }
.home-deals-link { margin-top: 3rem; }
@media (max-width: 600px) { .topic-group { padding: 1rem; } .home-topics h2, .home-latest h2 { font-size: 1.35rem; } }

/* ===== Performance (PR 8): self-hosted fonts, inline social icons, <img> thumbnails ===== */
/* Archivo and Karla: SIL Open Font License 1.1 (fonts/OFL-*.txt). One variable latin file each; the weight ranges
   cover the 500/700/900 and 400/600 the site uses. font-display: swap shows text at once in the fallback font. */
@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 500 900;
    font-display: swap;
    src: url('/fonts/archivo-v25-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Karla';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/fonts/karla-v33-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.social-svg { display: block; width: 1.25rem; height: 1.25rem; transition: transform 0.2s ease; }
.social-icon:hover .social-svg, .social-icon:focus-visible .social-svg { transform: scale(1.2); }
.social-youtube { color: #FF0000; }
.social-facebook { color: #1877F2; }
.social-instagram { color: #E4405F; }
@media (prefers-reduced-motion: reduce) { .social-svg, .content-item { transition: none; } .social-icon:hover .social-svg { transform: none; } }
.item-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.item-visual .video-duration { z-index: 1; }

/* Classes for what the video and listing generators used to style inline (smaller HTML, one place to change them) */
.video-embed { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 2rem; }
.video-embed iframe { border: 1px solid #3a4556; }
.video-kicker { font-size: 0.8rem; color: #e67e22; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 1rem; }
.expired-note { background: #3a2a1a; border-left: 4px solid #e67e22; color: #f3d9b8; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.95rem; }
.product-box { background: #252d3d; padding: 2rem; border-left: 4px solid #e67e22; }
.product-box-title { font-family: 'Archivo', sans-serif; font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; color: #fff; }
.product-item { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #3a4556; }
.product-name { font-weight: 600; color: #fff; margin-bottom: 0.5rem; font-size: 0.95rem; }
.product-brand { font-size: 0.8rem; color: #8a95a8; margin-bottom: 0.8rem; }
.product-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-title-link { color: inherit; font-size: inherit; line-height: inherit; }
.footer-disclosure { margin-top: 1rem; font-size: 0.85rem; color: #5a6577; }

/* Home page search and filters on a phone: the input shrinks and the tabs wrap, so the page never scrolls sideways
   (on 320-429px phones the 2rem padding, the button and three tabs made it 422-428px wide). */
.search-input { min-width: 0; }
.filter-tabs { flex-wrap: wrap; }
@media (max-width: 600px) {
    .search-section { padding: 1rem; }
    .search-bar { gap: 0.5rem; }
    .search-btn { padding: 0.9rem 1rem; }
    .filter-tab { padding: 0.6rem 1rem; }
}
@media (max-width: 480px) {
    /* "Comparisons," at 2.5rem is 345px wide: wider than a 320px phone */
    .hero h1 { font-size: 1.9rem; overflow-wrap: anywhere; }
}

/* Test-result pages (lib/test-results.js): a readable column; the results table scrolls inside its own region so the
   page itself never scrolls sideways on a phone. */
.tr-page { max-width: 56rem; margin: 0 auto; padding: 1rem 0 3rem; min-width: 0; }
.tr-page h1 { font-family: 'Archivo', sans-serif; font-size: 2.2rem; font-weight: 900; line-height: 1.2; margin: 0.5rem 0 1rem; color: #fff; overflow-wrap: anywhere; }
.tr-page h2 { font-family: 'Archivo', sans-serif; font-size: 1.4rem; font-weight: 700; margin: 2rem 0 0.75rem; color: #e67e22; }
.tr-page h3 { font-size: 1.1rem; margin: 1.25rem 0 0.25rem; color: #fff; }
.tr-page p, .tr-page li { line-height: 1.75; color: #d4dae3; overflow-wrap: anywhere; }
.tr-page a { color: #f0a35e; }
.tr-breadcrumb { font-size: 0.9rem; color: #8a95a8; }
.tr-breadcrumb a { color: #8a95a8; text-decoration: none; }
.tr-lead { font-size: 1.15rem; color: #fff; }
.tr-meta, .tr-source-kind { font-size: 0.85rem; color: #8a95a8; }
.tr-draft { background: #3a2a1a; border-left: 4px solid #e67e22; color: #f3d9b8; padding: 1rem 1.25rem; margin: 0 0 1.5rem; font-size: 0.95rem; overflow-wrap: anywhere; }
.tr-draft li { color: #f3d9b8; }
.tr-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #3a4556; margin: 1rem 0; }
.tr-table-scroll:focus-visible { outline: 2px solid #e67e22; outline-offset: 2px; }
.tr-table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: 0.95rem; }
.tr-table caption { caption-side: top; text-align: left; padding: 0.75rem; color: #8a95a8; font-size: 0.85rem; }
.tr-table th, .tr-table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid #3a4556; vertical-align: top; color: #d4dae3; line-height: 1.5; }
.tr-table th { background: #252d3d; color: #fff; white-space: nowrap; }
.tr-videos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.tr-videos a { display: block; text-decoration: none; }
.tr-videos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #252d3d; }
.tr-videos span { display: block; margin-top: 0.4rem; font-size: 0.9rem; color: #fff; }
.tr-videos small { color: #8a95a8; }
.tr-check-price ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tr-check-price p { font-size: 0.85rem; color: #8a95a8; }
.tr-index { list-style: none; padding: 0; }
.tr-index li { border-bottom: 1px solid #3a4556; padding: 0.5rem 0 1rem; }
.tr-index h2 { margin: 1rem 0 0.25rem; }
.tr-notice { margin-top: 2.5rem; padding: 1.25rem; border: 1px solid #3a4556; background: rgba(255, 255, 255, 0.03); }
.tr-notice h2 { margin-top: 0; }
.tr-notice p { font-size: 0.85rem; color: #8a95a8; }
@media (max-width: 600px) {
  .tr-page h1 { font-size: 1.6rem; }
  .tr-page h2 { font-size: 1.2rem; }
}

/* Deals pages (built by lib/deals-page.js): the deal cards, scoped to body.deals-page */
/* Keep fragment targets and overflow continuation links below the sticky header. */
.deals-page [id^="deal-"] { scroll-margin-top: 10rem; }
.deals-page .deal-card { background: #252d3d; border-left: 4px solid #e67e22; padding: 2rem; margin-bottom: 2rem; display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.deals-page .deal-image { flex: 0 1 320px; display: block; }
.deals-page .deal-image img { width: 100%; height: auto; display: block; border: 1px solid #3a4556; }
.deals-page .deal-body { flex: 1 1 360px; min-width: 0; }
.deals-page .deal-label { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 1.5px; padding: 0.3rem 0.7rem; margin-bottom: 0.8rem; }
.deals-page .deal-tier-warm { background: transparent; color: #e67e22; border: 1px solid #e67e22; }
.deals-page .deal-tier-hot { background: #f39c12; color: #1e2530; border: 1px solid #f39c12; }
.deals-page .deal-tier-super { background: #e67e22; color: #1e2530; border: 1px solid #e67e22; }
.deals-page .deal-badge { background: #1e2530; color: #d4dae3; border: 1px solid #3a4556; text-transform: uppercase; }
.deals-page .deal-label-expired { background: #3a2a1a; color: #f3d9b8; border: 1px solid #e67e22; }
.deals-page .deal-meta { font-size: 0.8rem; color: #e67e22; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 0.8rem; }
.deals-page .deal-title { font-family: 'Archivo', sans-serif; font-size: 1.9rem; font-weight: 700; margin-bottom: 1rem; color: #fff; overflow-wrap: break-word; }
.deals-page .deal-description { font-size: 1rem; color: #d4dae3; line-height: 1.7; margin-bottom: 1.5rem; white-space: pre-wrap; }
.deals-page .deal-coupon { background: #1e2530; padding: 1rem; margin-bottom: 1rem; border: 1px solid #3a4556; }
.deals-page .deal-coupon-label { color: #8a95a8; font-size: 0.85rem; }
.deals-page .deal-coupon-code { color: #e67e22; font-size: 1.2rem; font-weight: 700; margin-left: 1rem; }
.deals-page .deal-coupon-hint { color: #8a95a8; font-size: 0.85rem; margin-top: 0.4rem; }
.deals-page .deal-button { background: #e67e22; color: #1e2530; padding: 0.8rem 1.5rem; text-decoration: none; font-weight: 700; display: inline-block; }
.deals-page .deal-price { font-size: 0.85rem; color: #8a95a8; margin-top: 1rem; }
.deals-page .deals-empty { background: #252d3d; padding: 2rem; border-left: 4px solid #e67e22; }
.deals-page .deals-empty p { color: #8a95a8; }
.deals-page .expired-deals-heading { font-family: 'Archivo', sans-serif; font-size: 1.6rem; font-weight: 700; margin: 3rem 0 0.5rem; color: #fff; }
.deals-page .expired-deals-intro { color: #8a95a8; margin-bottom: 1.5rem; }

/* A normal YouTube link remains usable when JavaScript is unavailable. */
.video-embed { position: relative; background: #111; }
.video-play { display: flex; position: relative; width: 100%; height: 100%; align-items: center; justify-content: center; }
.video-play img { width: 100%; height: 100%; object-fit: contain; }
.video-play-label { position: absolute; padding: 1rem 1.5rem; border-radius: .3rem; color: #fff; background: #161616; font-weight: 700; }
.video-play:focus-visible { outline: 3px solid #e67e22; outline-offset: 3px; }
.video-embed iframe { width: 100%; height: 100%; }

.comparison-notes { padding: 1.25rem 0; border-top: 1px solid #3a4556; border-bottom: 1px solid #3a4556; margin-bottom: 1.5rem; }
.comparison-notes h2 { font-family: 'Archivo', sans-serif; font-size: 1.3rem; line-height: 1.4; }
.comparison-notes p { margin-top: 1rem; line-height: 1.8; }
.comparison-notes ul { margin: 1rem 0 0; padding-left: 1.5rem; }
