/* ============================================================
   TinyReno - Main Stylesheet v2
   "Warm Workshop" — DIY content, approachable & premium
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Warm palette */
    --amber: #d97706;
    --amber-dark: #b45309;
    --amber-light: #fef3c7;
    --amber-glow: #fde68a;
    --sage: #059669;
    --sage-dark: #047857;
    --sage-light: #d1fae5;
    --rust: #dc2626;
    --rust-light: #fee2e2;

    /* Neutrals */
    --warm-50: #fafaf9;
    --warm-100: #f5f5f4;
    --warm-200: #e7e5e4;
    --warm-300: #d6d3d1;
    --warm-400: #a8a29e;
    --warm-500: #78716c;
    --warm-600: #57534e;
    --warm-700: #44403c;
    --warm-800: #292524;
    --warm-900: #1c1917;

    /* Semantic */
    --primary: var(--amber);
    --primary-dark: var(--amber-dark);
    --primary-light: var(--amber-light);
    --accent: var(--sage);
    --accent-light: var(--sage-light);
    --bg: #fffefb;
    --bg-alt: var(--warm-50);
    --bg-card: #ffffff;
    --text: var(--warm-800);
    --text-light: var(--warm-600);
    --text-muted: var(--warm-400);
    --border: var(--warm-200);
    --border-light: var(--warm-100);

    /* Spacing */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
    --shadow-xl: 0 20px 50px rgba(0,0,0,.12);
    --max-width: 1200px;
    --header-h: 68px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 480px; }
.container-narrow { max-width: 780px; }

/* --- Skip Link --- */
.skip-link {
    position: absolute; top: -100px; left: 10px; z-index: 999;
    background: var(--primary); color: #fff; padding: 8px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 10px; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; color: var(--warm-900); }
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 18px; font-weight: 600; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
    cursor: pointer; border: 2px solid transparent; transition: all .2s;
    text-decoration: none; line-height: 1.4; letter-spacing: -0.01em;
}
.btn-primary {
    background: var(--primary); color: #fff;
    box-shadow: 0 2px 8px rgba(217,119,6,.25);
}
.btn-primary:hover {
    background: var(--primary-dark); color: #fff;
    box-shadow: 0 4px 14px rgba(217,119,6,.35);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent; border-color: var(--border); color: var(--text);
}
.btn-outline:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-light);
}
.btn-ghost {
    background: transparent; border-color: transparent; color: var(--text-light);
}
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-danger { color: var(--rust); border-color: var(--rust); }
.btn-danger:hover { background: var(--rust); color: #fff; }

/* --- Badge / Tag --- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-accent { background: var(--accent-light); color: var(--sage-dark); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-light); }

/* --- Header --- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,254,251,.92);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h);
}
.logo {
    display: flex; align-items: center;
    text-decoration: none; flex-shrink: 0;
    line-height: 0;
}
.logo-wordmark {
    display: block; height: 40px; width: auto;
}
.logo-icon {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--amber), var(--amber-dark));
    color: #fff; font-size: 18px; box-shadow: 0 2px 8px rgba(217,119,6,.3);
}
.nav-wrapper { display: flex; align-items: center; gap: 20px; }
.main-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.main-nav a {
    padding: 7px 4px; border-radius: var(--radius); font-size: 13px; font-weight: 500;
    color: var(--text-light); white-space: nowrap; transition: all .2s;
    display: inline-flex; align-items: center; gap: 2px;
}
.main-nav a:hover { background: var(--primary-light); color: var(--primary-dark); }
.main-nav a.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
@supports (background: color-mix(in srgb, red, blue)) {
    .main-nav a:hover { background: color-mix(in srgb, var(--nav-accent, var(--primary)) 12%, transparent); color: var(--nav-accent, var(--primary-dark)); }
    .main-nav a.active { background: color-mix(in srgb, var(--nav-accent, var(--primary)) 15%, transparent); color: var(--nav-accent, var(--primary-dark)); font-weight: 600; }
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.mobile-menu-toggle {
    display: none; flex-direction: column; gap: 5px; background: none;
    border: none; cursor: pointer; padding: 8px;
}
.mobile-menu-toggle span {
    display: block; width: 22px; height: 2px; background: var(--text);
    border-radius: 2px; transition: all .2s;
}

/* User Menu */
.user-menu { position: relative; }
.user-toggle {
    display: flex; align-items: center; gap: 8px; padding: 6px 14px;
    background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer; font-size: 13px; font-weight: 500; transition: all .2s;
}
.user-toggle:hover { border-color: var(--warm-300); }
.user-avatar-sm {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--amber-dark));
    color: #fff; font-size: 12px; font-weight: 700;
}
.user-dropdown {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); min-width: 200px; z-index: 200; overflow: hidden;
}
.user-dropdown a {
    display: flex; align-items: center; gap: 8px; padding: 12px 16px;
    font-size: 13px; color: var(--text); transition: background .15s;
}
.user-dropdown a:hover { background: var(--bg-alt); }
.user-menu.open .user-dropdown { display: block; }

/* --- Hero (v2 - two column) --- */
.hero {
    background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 30%, #fff7ed 70%, #fef2f2 100%);
    padding: 80px 0 64px; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(217,119,6,.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; bottom: -30%; left: -10%;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(5,150,105,.05) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
    position: relative; z-index: 1;
}
.hero-text h1 {
    font-size: clamp(32px, 5vw, 48px); font-weight: 900; line-height: 1.1;
    margin-bottom: 16px; letter-spacing: -0.03em;
}
.hero-text h1 .highlight {
    background: linear-gradient(135deg, var(--amber), #ea580c);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-text .hero-sub {
    font-size: 18px; color: var(--text-light); line-height: 1.6;
    margin-bottom: 28px; max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
    display: flex; align-items: center; justify-content: center;
}
.hero-illustration {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    max-width: 360px;
}
.hero-icon-card {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px 12px; background: rgba(255,255,255,.8);
    border-radius: var(--radius-lg); box-shadow: var(--shadow);
    backdrop-filter: blur(4px); transition: all .3s;
}
.hero-icon-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
}
.hero-icon-card .icon { font-size: 32px; }
.hero-icon-card .label { font-size: 11px; font-weight: 600; color: var(--text-light); text-align: center; }

/* --- Scroll Reveal (v0.13.4, v0.15 rootMargin fix) --- */
/* Sections opt-in via .reveal class; IntersectionObserver adds .is-visible.
   Default (no-JS): sections fully visible — never blank. JS path (when
   js-reveal-armed is set on <html> by main.js immediately on parse):
   hide all sections until the JS reveals them. The first pass in main.js
   reveals any section already within 1 mobile screen of viewport top so
   opening the homepage never leaves a blank fold below the marquee. */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
/* When JS is present and ready, hide all .reveal sections immediately.
   Without this class, CSS shows everything (no-JS fallback). */
html.js-reveal-armed .reveal {
    opacity: 0;
    transform: translateY(24px);
}
.reveal.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
/* Respect users who prefer reduced motion — skip the animation */
@media (prefers-reduced-motion: reduce) {
    .reveal, html.js-reveal-armed .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Sections --- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 8px; flex-wrap: wrap; gap: 12px;
}
.section-header h2 { margin-bottom: 0; }
.section-subtitle { color: var(--text-light); font-size: 15px; margin-bottom: 28px; }
.section-link {
    font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px;
    white-space: nowrap;
}
.section-link::after { content: '→'; transition: transform .2s; }
.section-link:hover::after { transform: translateX(3px); }

/* --- Featured Hero Card --- */
.featured-hero {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
    background: #fff; border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-lg); margin-bottom: 48px;
    border: 1px solid var(--border);
}
.featured-hero-image {
    aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt);
    position: relative;
}
.featured-hero-image img {
    width: 100%; height: 100%; object-fit: cover; transition: transform .4s;
}
.featured-hero:hover .featured-hero-image img { transform: scale(1.04); }
.featured-hero-image .placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 80px; background: linear-gradient(135deg, var(--primary-light), #fef9c3);
}
.featured-hero-body {
    padding: 40px; display: flex; flex-direction: column; justify-content: center;
}
.featured-hero-body .badge { margin-bottom: 12px; }
.featured-hero-body h2 {
    font-size: clamp(20px, 2.5vw, 26px); font-weight: 700; margin-bottom: 12px;
    line-height: 1.3;
}
.featured-hero-body h2 a { color: var(--warm-900); }
.featured-hero-body h2 a:hover { color: var(--primary-dark); }
.featured-hero-body .excerpt {
    color: var(--text-light); font-size: 15px; line-height: 1.6; margin-bottom: 20px;
}
.featured-hero-body .meta {
    display: flex; gap: 16px; font-size: 13px; color: var(--text-muted);
}

/* --- Article Grid --- */
.article-grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.article-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
}
.article-card:hover {
    box-shadow: var(--shadow-lg); transform: translateY(-3px);
    border-color: var(--warm-300);
}
.card-image {
    display: block; aspect-ratio: 16/10; overflow: hidden;
    background: var(--bg-alt); position: relative;
}
.card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.article-card:hover .card-image img { transform: scale(1.05); }
.card-image-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 48px; background: linear-gradient(135deg, var(--primary-light), #fef9c3);
    color: var(--primary);
}
.card-image .card-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0,0,0,.7); color: #fff; font-size: 10px; font-weight: 600;
    padding: 4px 10px; border-radius: 50px; text-transform: uppercase; letter-spacing: .5px;
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-channel {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .5px; color: var(--primary-dark); margin-bottom: 8px;
}
.card-title {
    font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 8px;
}
.card-title a { color: var(--warm-800); }
.card-title a:hover { color: var(--primary-dark); }
.card-excerpt {
    font-size: 13px; color: var(--text-light); line-height: 1.55;
    margin-bottom: auto; padding-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex; gap: 14px; font-size: 12px; color: var(--text-muted);
    padding-top: 12px; border-top: 1px solid var(--border-light);
}
.card-meta-item { display: flex; align-items: center; gap: 4px; }

/* Featured card variant */
.featured-card { border-color: var(--amber-glow); }
.featured-card .card-image { aspect-ratio: 16/9; }
.featured-card .card-title { font-size: 18px; }

/* --- Article Page (v2) --- */
.article-layout {
    display: grid; grid-template-columns: 1fr 300px; gap: 48px;
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.article-main { min-width: 0; }
.article-sidebar { padding-top: 40px; }

.article-hero {
    margin-bottom: 32px; border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-md);
}
.article-hero img { width: 100%; display: block; }

.article-header { margin-bottom: 32px; }
.article-header .badge-row {
    display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.article-header h1 {
    font-size: clamp(26px, 4vw, 38px); font-weight: 800;
    line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.02em;
}
.article-meta-bar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.article-meta-bar .author {
    display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500;
}
.article-meta-bar .author-avatar {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    background: var(--primary-light);
}
.article-meta-bar .meta-divider { color: var(--warm-300); }
.article-meta-bar .meta-text { font-size: 13px; color: var(--text-muted); }

/* Reading progress bar */
.reading-progress {
    position: fixed; top: var(--header-h); left: 0; height: 3px;
    background: linear-gradient(90deg, var(--amber), #ea580c);
    z-index: 99; transition: width .1s linear;
}

/* Article content */
.article-content {
    font-size: 17px; line-height: 1.85; color: var(--warm-700);
}
.article-content h2 {
    font-size: 26px; font-weight: 700; margin: 40px 0 16px;
    padding-top: 8px; color: var(--warm-900);
}
.article-content h3 {
    font-size: 20px; font-weight: 600; margin: 28px 0 12px;
    color: var(--warm-800);
}
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol {
    margin: 0 0 20px 24px; padding: 0;
}
.article-content li { margin-bottom: 8px; padding-left: 4px; }
.article-content li::marker { color: var(--primary); }
.article-content img {
    border-radius: var(--radius-lg); margin: 24px 0;
    box-shadow: var(--shadow-md);
}
.article-content blockquote {
    border-left: 4px solid var(--primary); padding: 16px 24px; margin: 24px 0;
    background: var(--primary-light); border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic; color: var(--text-light); font-size: 16px;
}
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content table {
    width: 100%; border-collapse: collapse; margin: 20px 0;
    font-size: 14px; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.article-content th {
    background: var(--warm-100); font-weight: 600; text-align: left;
    padding: 12px 16px; border-bottom: 2px solid var(--border);
}
.article-content td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-light);
}
.article-content tr:last-child td { border-bottom: none; }

/* Tip box */
.tip-box {
    background: var(--accent-light); border: 1px solid #a7f3d0;
    border-radius: var(--radius-lg); padding: 20px 24px; margin: 24px 0;
    display: flex; gap: 12px;
}
.tip-box .tip-icon { font-size: 24px; flex-shrink: 0; }
.tip-box .tip-content { font-size: 15px; color: var(--sage-dark); }
.tip-box .tip-content strong { display: block; margin-bottom: 4px; }

/* Warning box */
.warn-box {
    background: var(--rust-light); border: 1px solid #fecaca;
    border-radius: var(--radius-lg); padding: 20px 24px; margin: 24px 0;
    display: flex; gap: 12px;
}
.warn-box .warn-icon { font-size: 24px; flex-shrink: 0; }
.warn-box .warn-content { font-size: 15px; color: #991b1b; }
.warn-box .warn-content strong { display: block; margin-bottom: 4px; }

/* Article footer */
.article-footer {
    margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
}
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.article-share {
    display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-light);
}
.article-share a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; font-size: 16px;
    background: var(--bg-alt); transition: all .2s;
}
.article-share a:hover { background: var(--primary-light); transform: translateY(-2px); }
.article-share .share-x { color: #000; font-weight: 900; }
.article-share .share-fb { color: #1877F2; font-weight: 700; font-family: Georgia, serif; font-size: 18px; }
.article-share .share-pin { color: #E60023; font-weight: 800; font-size: 18px; }

/* Author Card */
.author-card {
    display: flex; gap: 20px; padding: 28px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); margin: 40px 0;
}
.author-card .author-avatar-lg {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
    flex-shrink: 0; background: var(--primary-light);
}
.author-card h4 { font-size: 18px; margin-bottom: 4px; }
.author-card .author-role { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.author-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* --- Sidebar --- */
.sidebar-section {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px;
}
.sidebar-section h4 {
    font-size: 14px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--text-muted); margin-bottom: 16px;
}
.sidebar-article-list { display: flex; flex-direction: column; gap: 14px; }
.sidebar-article {
    display: flex; gap: 12px; padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.sidebar-article:last-child { padding-bottom: 0; border-bottom: none; }
.sidebar-article .thumb {
    width: 64px; height: 48px; border-radius: var(--radius-sm);
    object-fit: cover; flex-shrink: 0; background: var(--bg-alt);
}
.sidebar-article .info { flex: 1; min-width: 0; }
.sidebar-article .info .title {
    font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar-article .info .title a { color: var(--text); }
.sidebar-article .info .title a:hover { color: var(--primary-dark); }
.sidebar-article .info .date { font-size: 11px; color: var(--text-muted); }

/* TOC */
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 6px; }
.toc-list a {
    font-size: 13px; color: var(--text-light); display: block;
    padding: 6px 10px; border-radius: var(--radius-sm); transition: all .15s;
    border-left: 2px solid transparent;
}
.toc-list a:hover, .toc-list a.active {
    background: var(--primary-light); color: var(--primary-dark);
    border-left-color: var(--primary);
}

/* Newsletter sidebar */
.sidebar-newsletter {
    background: linear-gradient(135deg, var(--primary-light), #fef9c3);
    border: 1px solid var(--amber-glow);
}
.sidebar-newsletter p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.sidebar-newsletter input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 13px; margin-bottom: 8px;
    font-family: inherit;
}
.sidebar-newsletter input:focus { outline: none; border-color: var(--primary); }

/* --- Comments (v2) --- */
.comments-section { margin-top: 48px; }
.comments-section h2 {
    font-size: 22px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px;
}
.comment-form { margin-bottom: 28px; }
.comment-form textarea {
    width: 100%; padding: 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-family: inherit; font-size: 14px;
    resize: vertical; margin-bottom: 12px; transition: border-color .2s;
    background: var(--bg-alt);
}
.comment-form textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217,119,6,.1); background: #fff;
}
.comment-login-prompt {
    padding: 28px; text-align: center; background: var(--bg-alt);
    border-radius: var(--radius-lg); border: 1px dashed var(--border);
}

.comment-list { display: flex; flex-direction: column; gap: 20px; }
.comment {
    display: flex; gap: 14px; padding: 20px; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: border-color .2s;
}
.comment:hover { border-color: var(--warm-300); }
.comment-avatar img, .comment-avatar .avatar-placeholder {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
}
.avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--amber-glow));
    color: var(--primary-dark); font-weight: 700; font-size: 16px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
    font-size: 13px;
}
.comment-header strong { font-size: 14px; }
.comment-time { color: var(--text-muted); font-size: 12px; }
.comment-content { font-size: 14px; line-height: 1.6; color: var(--warm-700); }
.btn-reply {
    background: none; border: none; color: var(--text-muted); font-size: 12px;
    cursor: pointer; padding: 4px 0; margin-top: 6px; font-weight: 500;
    transition: color .2s;
}
.btn-reply:hover { color: var(--primary); }
.comment-replies {
    margin-top: 16px; margin-left: 24px; padding-left: 20px;
    border-left: 2px solid var(--primary-light);
    display: flex; flex-direction: column; gap: 12px;
}

/* --- Channel Page (v2) --- */
.channel-hero {
    padding: 64px 0 40px;
    background: linear-gradient(160deg, var(--bg-alt) 0%, #fff 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.channel-hero-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.channel-hero .icon-lg { font-size: 48px; margin-bottom: 12px; }
.channel-hero h1 { margin-bottom: 8px; }
.channel-hero .desc { font-size: 16px; color: var(--text-light); max-width: 600px; margin-bottom: 16px; }
.channel-stats { display: flex; gap: 24px; font-size: 13px; color: var(--text-muted); }
.channel-stats span { display: flex; align-items: center; gap: 4px; }

/* Channel hero with AI-generated background image */
.channel-hero--image {
    color: #fff;
    padding: 96px 0 56px;
    background: #1a1a1a; /* dark fallback before image loads */
    border-bottom: none;
    position: relative;
    min-height: 340px;
}
.channel-hero--image .channel-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
}
.channel-hero--image .channel-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.channel-hero--image .channel-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
}
.channel-hero--image h1 { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.channel-hero--image .desc { color: rgba(255,255,255,0.95); text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.channel-hero--image .channel-stats { color: rgba(255,255,255,0.9); }
.channel-hero--image .channel-stats span { color: rgba(255,255,255,0.95); }
.channel-hero--image .channel-hero-icon { color: #fff; }
.channel-hero--image .channel-hero-icon .icon { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.channel-hero--image .breadcrumb a { color: rgba(255,255,255,0.85); }
.channel-hero--image .breadcrumb li:not(:last-child)::after { color: rgba(255,255,255,0.5); }
.channel-hero--image .breadcrumb span { color: #fff; }

/* Per-channel accent (left edge tint) */
.channel-hero--image::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--channel-accent, #fff);
    z-index: 3;
}

.channel-layout {
    max-width: var(--max-width); margin: 0 auto; padding: 40px 24px;
}

/* --- Breadcrumb --- */
.breadcrumb { padding: 20px 0; }
.breadcrumb ol {
    display: flex; list-style: none; gap: 8px; font-size: 13px; flex-wrap: wrap;
    align-items: center;
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li:not(:last-child)::after { content: '/'; color: var(--warm-300); font-size: 14px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb span { color: var(--text-muted); }

/* --- Pagination --- */
.pagination { padding: 40px 0 0; }
.pagination ul {
    display: flex; justify-content: center; gap: 6px; list-style: none;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; transition: all .2s;
}
.pagination a { color: var(--text); border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pagination span.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(217,119,6,.3);
}

/* --- Auth Pages --- */
.auth-page { padding: 64px 0; }
.auth-card {
    max-width: 440px; margin: 0 auto; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 40px; box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 26px; text-align: center; margin-bottom: 8px; }
.auth-sub { text-align: center; color: var(--text-light); margin-bottom: 28px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-switch { margin-top: 24px; text-align: center; font-size: 14px; color: var(--text-light); }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-family: inherit; font-size: 14px;
    transition: all .2s; background: var(--bg-alt);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217,119,6,.1); background: #fff;
}
.form-row { display: flex; gap: 16px; }
.form-group-grow { flex: 1; }
.form-check label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; font-size: 14px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.form-fieldset {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
    display: flex; flex-direction: column; gap: 16px;
}
.form-fieldset legend { font-weight: 600; padding: 0 8px; font-size: 14px; }
.form-actions { display: flex; gap: 12px; padding-top: 8px; }

/* --- Alerts --- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(135deg, var(--warm-800), var(--warm-900));
    color: #fff; padding: 72px 24px; text-align: center;
    position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(217,119,6,.15) 0%, transparent 60%);
    pointer-events: none;
}
.cta-section h2 { color: #fff; font-size: 32px; margin-bottom: 12px; }
.cta-section p { color: #a8a29e; font-size: 16px; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.newsletter-form {
    display: flex; gap: 10px; max-width: 460px; margin: 0 auto;
}
.newsletter-form input {
    flex: 1; padding: 14px 18px; border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius); font-family: inherit; font-size: 15px;
    background: rgba(255,255,255,.1); color: #fff;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form input:focus { outline: none; border-color: var(--amber); background: rgba(255,255,255,.15); }
.newsletter-form .btn-primary { background: #fff; color: var(--warm-900); border-color: #fff; box-shadow: none; }
.newsletter-form .btn-primary:hover { background: var(--amber-glow); }

/* --- Empty State --- */
.empty-state {
    text-align: center; padding: 80px 20px; color: var(--text-light);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { font-size: 15px; }

/* --- Footer --- */
.site-footer {
    background: var(--warm-900); color: #a8a29e;
    padding: 64px 0 32px; margin-top: 0;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
    margin-bottom: 40px;
}
.footer-brand .footer-logo {
    margin-bottom: 12px;
    display: flex; align-items: center;
}
.footer-logo-img {
    display: block; height: 48px; width: auto;
}
.footer-brand .footer-logo .logo-icon {
    width: 36px; height: 36px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--amber), var(--amber-dark));
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.footer-tagline { font-size: 14px; color: var(--amber); margin-bottom: 10px; font-weight: 500; }
.footer-desc { font-size: 13px; line-height: 1.7; }
.footer-links h4 { color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #78716c; font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #292524; padding-top: 24px;
    text-align: center; font-size: 13px; color: #57534e;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-text .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { display: none; }
    .featured-hero { grid-template-columns: 1fr; }
    .featured-hero-body { padding: 28px; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { display: none; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero { padding: 48px 0 40px; }
    .hero-text h1 { font-size: 28px; }
    .section { padding: 40px 0; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }

    .mobile-menu-toggle { display: flex; }
    .nav-wrapper {
        display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--border); padding: 20px;
        flex-direction: column; box-shadow: var(--shadow-xl);
    }
    .nav-wrapper.open { display: flex; }
    .main-nav { flex-direction: column; width: 100%; }
    .main-nav a { padding: 10px 14px; font-size: 14px; justify-content: flex-start; }
    .header-actions { flex-direction: column; width: 100%; }
    .header-actions .btn { width: 100%; justify-content: center; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .newsletter-form { flex-direction: column; }
    .form-row { flex-direction: column; }
    .author-card { flex-direction: column; text-align: center; align-items: center; }
    .comment { padding: 16px; }
    .comment-replies { margin-left: 16px; padding-left: 14px; }
    .auth-card { padding: 28px 20px; }
    .channel-hero { padding: 32px 0 24px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 36px 0 32px; }
    .hero-text h1 { font-size: 24px; }
    .hero-text .hero-sub { font-size: 15px; }
    .section { padding: 32px 0; }
    .section-header h2 { font-size: 20px; }
    .card-title { font-size: 15px; }
    .article-header h1 { font-size: 22px; }
    .article-content { font-size: 16px; }
    .article-content h2 { font-size: 22px; }
    .cta-section h2 { font-size: 24px; }
}

/* ============================================================
   CHANNEL-SPECIFIC LAYOUTS (v3 Homepage)
   ============================================================ */

/* --- Channel Navigation Strip (v0.13.5 marquee → v0.13.8 swipe → v0.14 Slick → v0.15 Swiper) --- */
/* v0.15: Slick dropped (jQuery-only, mobile feel poor on Android) → Swiper 4.3.3.
   Swiper wraps the strip in .swiper-container + .swiper-wrapper; we add .swiper class
   to the strip directly (Swiper auto-promotes single-child swipers). */
.channel-nav-marquee {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
/* Swiper wraps cards in .swiper-wrapper; explicit flex + nowrap. */
.channel-nav-strip.swiper { overflow: hidden; }
.channel-nav-strip.swiper .swiper-wrapper { display: flex; flex-wrap: nowrap; }
/* Override Swiper default .swiper-slide sizing — we control width via calc() below. */
.channel-nav-card.swiper-slide { width: calc((min(1200px, 100vw) - 48px - 5 * 12px) / 6) !important; flex-shrink: 0; }
.channel-nav-marquee:hover .channel-nav-strip,
.channel-nav-marquee.is-paused .channel-nav-strip { /* Swiper autoplay handles pause */ }

.channel-nav-card {
    flex: 0 0 auto;
    width: calc((min(1200px, 100vw) - 48px - 5 * 12px) / 6);
    /* Fallback for very narrow screens: min width so cards don't squeeze. */
    min-width: 140px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px 12px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    position: relative; overflow: hidden;
}
.channel-nav-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--amber), var(--amber-dark));
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.channel-nav-card:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-md);
    border-color: var(--amber-glow);
}
.channel-nav-card:hover::before { transform: scaleX(1); }
.channel-nav-card .cn-icon {
    display: flex; align-items: center; justify-content: center;
    height: 70px; margin-bottom: 2px;
}
.channel-nav-card .cn-icon img {
    display: block; max-width: 80px; max-height: 80px;
    width: auto; height: auto; object-fit: contain;
}
.channel-nav-card .cn-name {
    font-size: 13px; font-weight: 600; color: var(--warm-800);
    text-align: center;
}
.channel-nav-card .cn-count {
    font-size: 11px; color: var(--text-muted); font-weight: 500;
}

/* ============================================================
   CHANNEL 2: Quick Fixes — Step Cards (horizontal scroll, v0.13.6 carousel wrapper)
   ============================================================ */
.qf-carousel {
    position: relative;
}
.qf-viewport {
    overflow: hidden;
    margin: 0 -4px;
    padding: 4px 4px 16px;
}
.step-cards-scroll {
    display: flex; gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.step-cards-scroll::-webkit-scrollbar { display: none; }

.qf-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 24px; line-height: 1;
    color: var(--warm-800);
    cursor: pointer; z-index: 5;
    box-shadow: var(--shadow-md);
    transition: all .2s;
}
.qf-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.05); box-shadow: var(--shadow-lg); }
.qf-arrow:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.qf-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.qf-prev { left: -8px; }
.qf-next { right: -8px; }
@media (max-width: 640px) {
    .qf-arrow { display: none; } /* On phones, native swipe is enough */
}

.qf-dots {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 4px;
}
.qf-dot {
    width: 8px; height: 8px;
    padding: 0; border: none;
    background: var(--warm-300); border-radius: 50%;
    cursor: pointer;
    transition: all .25s;
}
.qf-dot:hover { background: var(--warm-500); }
.qf-dot.is-active {
    background: var(--primary);
    width: 24px; border-radius: 4px;
}
.qf-dot:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.step-card {
    flex: 0 0 280px; scroll-snap-align: start;
    display: flex; flex-direction: column; gap: 12px;
    padding: 24px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none; color: inherit;
    position: relative; transition: all .25s;
    overflow: hidden;
}
.step-card::after {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 120px; height: 120px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    opacity: .5;
}
.step-card:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-lg);
    border-color: var(--amber-glow);
}
.step-card .step-number {
    font-size: 32px; font-weight: 900; line-height: 1;
    color: var(--amber); opacity: .35; font-family: 'Inter', monospace;
    position: relative; z-index: 1;
}
.step-card .step-icon {
    font-size: 36px; line-height: 1;
    position: relative; width: 100%; aspect-ratio: 16/9;
    border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light), #fef9c3);
}
.step-card .step-icon .icon { position: absolute; inset: 0; margin: auto; width: 32px; height: 32px; }
.step-card .step-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.step-card .step-title {
    font-size: 16px; font-weight: 700; line-height: 1.35;
    color: var(--warm-900); position: relative; z-index: 1;
}
.step-card .step-excerpt {
    font-size: 13px; color: var(--text-light); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; position: relative; z-index: 1;
}
.step-card .step-meta {
    margin-top: auto; font-size: 12px; color: var(--text-muted);
    padding-top: 8px; border-top: 1px solid var(--border-light);
    position: relative; z-index: 1;
}

/* ============================================================
   CHANNEL 1: Rental Hacks — Image+Text List
   ============================================================ */
.media-list { display: flex; flex-direction: column; gap: 16px; }
.media-item {
    display: grid; grid-template-columns: 200px 1fr; gap: 24px;
    padding: 20px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none; color: inherit;
    transition: all .25s;
}
.media-item:hover {
    transform: translateX(4px); box-shadow: var(--shadow-md);
    border-color: var(--amber-glow);
}
.media-item .media-thumb {
    aspect-ratio: 4/3; border-radius: var(--radius);
    overflow: hidden; background: var(--bg-alt);
    position: relative;
}
.media-item .media-thumb-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.media-item .media-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; font-size: 56px;
    background: linear-gradient(135deg, var(--primary-light), #fef9c3);
}
.media-item .media-body { display: flex; flex-direction: column; gap: 8px; }
.media-item h3 {
    font-size: 18px; font-weight: 700; line-height: 1.35;
    color: var(--warm-900);
}
.media-item p { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.media-item .media-meta { font-size: 12px; color: var(--text-muted); margin-top: auto; }

/* ============================================================
   CHANNEL 3: Smart Styling — Visual Grid (v0.13.7: 3D tilt on hover)
   ============================================================ */
.visual-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: 1fr 1fr;
    gap: 16px; height: 520px;
    /* Container needs perspective so nested 3D transforms render correctly */
    perspective: 1200px;
}
.visual-card {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    text-decoration: none; color: #fff; display: block;
    /* transform-style: preserve-3d lets the .visual-card-bg's inner scale
       feel like part of the same tilted surface. */
    transform-style: preserve-3d;
    transition: transform .25s ease, box-shadow .25s ease;
    /* Will-change avoids repaint thrash on mousemove */
    will-change: transform;
}
.visual-card:hover { box-shadow: var(--shadow-lg); }
.visual-card-lg { grid-column: span 2; grid-row: span 2; }
.visual-card-bg {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
    transition: transform .4s;
}
.visual-card:nth-child(2) .visual-card-bg { background: linear-gradient(135deg, #047857, #059669); }
.visual-card:nth-child(3) .visual-card-bg { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.visual-card:nth-child(4) .visual-card-bg { background: linear-gradient(135deg, #6d28d9, #7c3aed); }
.visual-card:hover .visual-card-bg { transform: scale(1.05); }
.visual-card-bg::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.15) 0%, transparent 60%);
}
.visual-emoji { font-size: 80px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.visual-card-lg .visual-emoji { font-size: 120px; }
.visual-card-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block;
}
.visual-card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px; background: linear-gradient(transparent, rgba(0,0,0,.85));
    color: #fff; z-index: 1;
}
.visual-card-overlay h3 {
    font-size: 16px; font-weight: 700; line-height: 1.35; margin-bottom: 6px;
    color: #fff;
}
.visual-card-lg .visual-card-overlay h3 { font-size: 22px; }
.visual-tag {
    display: inline-block; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px; opacity: .85;
}

/* ============================================================
   CHANNEL 4: Surface Magic — Tutorial Cards
   ============================================================ */
.tutorial-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.tutorial-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 24px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none; color: inherit;
    transition: all .25s; position: relative;
}
.tutorial-card:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-md);
    border-color: var(--amber-glow);
}
.tutorial-card .tutorial-badge {
    position: absolute; top: 16px; right: 16px;
    padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
}
.tutorial-card .badge-easy { background: var(--accent-light); color: var(--sage-dark); }
.tutorial-card .badge-medium { background: var(--primary-light); color: var(--amber-dark); }
.tutorial-card .badge-hard { background: var(--rust-light); color: #991b1b; }
.tutorial-card .tutorial-icon {
    font-size: 40px;
    position: relative; width: 100%; aspect-ratio: 16/9;
    border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
}
.tutorial-card .tutorial-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.tutorial-card .tutorial-icon .icon { width: 48px; height: 48px; }
.tutorial-card h3 {
    font-size: 17px; font-weight: 700; line-height: 1.35;
    color: var(--warm-900); padding-right: 60px;
}
.tutorial-card p {
    font-size: 13px; color: var(--text-light); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tutorial-card .tutorial-footer {
    display: flex; gap: 16px; margin-top: auto; padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 12px; color: var(--text-muted);
}

/* ============================================================
   CHANNEL 5: Comfort Upgrades — Product Cards
   ============================================================ */
.product-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.product-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    text-decoration: none; color: inherit; transition: all .25s;
}
.product-card:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-md);
    border-color: var(--amber-glow);
}
.product-icon-wrap {
    height: 140px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #d1fae5 100%);
    overflow: hidden; position: relative;
}
.product-card:nth-child(2) .product-icon-wrap { background: linear-gradient(135deg, #fef3c7, #fed7aa); }
.product-card:nth-child(3) .product-icon-wrap { background: linear-gradient(135deg, #ede9fe, #fce7f3); }
.product-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.product-emoji { font-size: 72px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.1)); }
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.product-body h3 {
    font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--warm-900);
}
.product-body p {
    font-size: 13px; color: var(--text-light); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-meta {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--border-light);
    font-size: 13px;
}
.product-price { font-weight: 700; color: var(--sage-dark); }
.product-rating { color: var(--amber); font-size: 12px; letter-spacing: 1px; }

/* ============================================================
   CHANNEL 6: Versus — Comparison Cards
   ============================================================ */
.versus-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.versus-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 24px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none; color: inherit;
    transition: all .25s; position: relative; overflow: hidden;
}
.versus-card::before {
    content: 'VS'; position: absolute; top: -20px; right: -10px;
    font-size: 100px; font-weight: 900; color: var(--primary-light);
    opacity: .25; line-height: 1; font-family: 'Inter', sans-serif;
    pointer-events: none;
}
.versus-card:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-md);
    border-color: var(--amber);
}
.versus-header {
    display: flex; justify-content: space-between; align-items: center;
    position: relative; z-index: 1;
}
.versus-category {
    display: inline-block; padding: 3px 10px;
    background: var(--primary-light); color: var(--primary-dark);
    border-radius: 50px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px;
}
.versus-card .versus-title {
    font-size: 17px; font-weight: 700; line-height: 1.35;
    color: var(--warm-900); position: relative; z-index: 1;
}
.versus-card .versus-excerpt {
    font-size: 13px; color: var(--text-light); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    position: relative; z-index: 1;
}
.versus-card .versus-vs {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
    padding-top: 16px; border-top: 1px solid var(--border-light);
    position: relative; z-index: 1;
}
.versus-card .vs-item {
    flex: 1; padding: 10px 12px; background: var(--bg-alt);
    border-radius: var(--radius); text-align: center;
    font-size: 13px; font-weight: 600; color: var(--warm-800);
    border: 1px solid var(--border);
}
.versus-card .vs-divider {
    font-size: 11px; font-weight: 800; color: var(--amber);
    text-transform: uppercase; letter-spacing: 1px;
}

/* ============================================================
   RESPONSIVE — Channel layouts
   ============================================================ */
@media (max-width: 1024px) {
    .channel-nav-strip { grid-template-columns: repeat(3, 1fr); }
    .visual-grid {
        grid-template-columns: 1fr 1fr; grid-template-rows: 200px 200px;
        height: auto;
    }
    .visual-card-lg { grid-column: span 2; grid-row: span 1; }
    .visual-card-lg .visual-emoji { font-size: 80px; }
    .tutorial-grid, .product-grid, .versus-grid { grid-template-columns: 1fr 1fr; }
    .media-item { grid-template-columns: 150px 1fr; }
}

@media (max-width: 768px) {
    .channel-nav-strip { grid-template-columns: repeat(2, 1fr); }
    .step-card { flex: 0 0 240px; padding: 20px; }
    .media-item { grid-template-columns: 1fr; gap: 12px; }
    .media-item .media-thumb { aspect-ratio: 16/9; }
    .visual-grid {
        grid-template-columns: 1fr; grid-template-rows: 280px 160px 160px 160px;
    }
    .visual-card-lg { grid-column: span 1; grid-row: span 1; }
    .visual-card-lg .visual-emoji { font-size: 80px; }
    .tutorial-grid, .product-grid, .versus-grid { grid-template-columns: 1fr; }
    
    /* Mobile header: row1 = logo + hamburger, row2 = search, row3 = nav (collapsed) */
    .site-header { height: auto; }
    .header-inner {
        flex-wrap: wrap; height: auto; padding: 12px 0 8px; gap: 10px;
    }
    .logo { flex: 1 1 auto; }
    .header-search {
        order: 3; width: 100%; max-width: 100%; min-width: 0;
        margin: 0; height: 40px;
    }
    .header-search-btn { padding: 6px 20px; }
    .mobile-menu-toggle { order: 2; }
    .nav-wrapper {
        order: 4; width: 100%; flex-basis: 100%;
    }
}


/* ============================================================
   SEARCH BUTTON + MODAL
   ============================================================ */

/* Search button in header */
.search-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius);
    background: transparent; border: 1px solid var(--border);
    color: var(--text-light); cursor: pointer; flex-shrink: 0;
    transition: all .2s;
}
.search-toggle:hover {
    background: var(--primary-light); border-color: var(--primary);
    color: var(--primary-dark); transform: scale(1.05);
}
.search-toggle svg { display: block; }

/* Search Modal Overlay */
.search-modal {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(28, 25, 23, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 80px 20px 20px;
    animation: fadeIn .2s ease;
}
.search-modal.open { display: flex; justify-content: center; align-items: flex-start; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-modal-inner {
    width: 100%; max-width: 640px; background: #fff;
    border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
    padding: 28px; position: relative;
    animation: slideDown .25s cubic-bezier(.4,0,.2,1);
}
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.search-modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border: none; background: var(--bg-alt);
    border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--text-muted);
    transition: all .2s;
}
.search-modal-close:hover { background: var(--border); color: var(--text); }

.search-modal-form { display: flex; flex-direction: column; gap: 16px; }
.search-modal-form .search-input-wrap {
    margin: 0; position: relative; display: flex; align-items: center;
}
.search-modal-form .search-input-icon {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none; flex-shrink: 0;
    width: 20px; height: 20px;
}
.search-modal-form .search-input-wrap input {
    font-size: 16px; padding: 14px 16px 14px 48px;
    border-radius: var(--radius); border: 2px solid var(--border);
    background: var(--bg-alt); width: 100%;
}
.search-modal-form .search-input-wrap input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217,119,6,.12); background: #fff;
}
.search-modal-channels {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--border-light);
}
.search-modal-channels .sm-label {
    font-size: 12px; color: var(--text-muted); font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px; margin-right: 4px;
}
.search-modal-channels .sm-channel {
    padding: 5px 12px; border-radius: 50px;
    background: var(--bg-alt); color: var(--text-light); text-decoration: none;
    font-size: 13px; font-weight: 500; transition: all .15s;
}
.search-modal-channels .sm-channel:hover {
    background: var(--primary-light); color: var(--primary-dark);
}
.search-modal-hint {
    font-size: 12px; color: var(--text-muted); text-align: center;
    padding-top: 8px; border-top: 1px dashed var(--border-light);
}
.search-modal-hint kbd {
    display: inline-block; padding: 2px 6px;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 4px; font-family: monospace; font-size: 11px;
    box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-page { padding: 32px 0 64px; }

.search-header { text-align: center; margin-bottom: 48px; }
.search-header h1 { margin-bottom: 8px; }
.search-sub { color: var(--text-light); font-size: 16px; margin-bottom: 32px; }

.search-form-large {
    max-width: 720px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 16px;
}
.search-form-large .search-input-wrap {
    position: relative; display: flex; align-items: center;
    background: #fff; border: 2px solid var(--border);
    border-radius: var(--radius-lg); padding: 4px 4px 4px 16px;
    box-shadow: var(--shadow); transition: all .2s;
}
.search-form-large .search-input-wrap:focus-within {
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(217,119,6,.12);
}
.search-form-large .search-input-icon {
    font-size: 20px; color: var(--text-muted); margin-right: 8px; flex-shrink: 0;
}
.search-form-large input[type="text"] {
    flex: 1; padding: 14px 8px; border: none; outline: none;
    font-size: 17px; font-family: inherit; background: transparent; color: var(--text);
}
.search-form-large .search-clear {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-muted); text-decoration: none; flex-shrink: 0;
    transition: all .2s;
}
.search-form-large .search-clear:hover { background: var(--bg-alt); color: var(--text); }

.search-filters {
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
    padding: 12px 16px; background: var(--bg-alt);
    border-radius: var(--radius); justify-content: center;
}
.filter-label {
    font-size: 13px; font-weight: 600; color: var(--text-light);
}
.filter-select {
    padding: 8px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); background: #fff; font-size: 14px;
    font-family: inherit; cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.filter-select:disabled { opacity: .55; cursor: not-allowed; }
.search-filters .btn-primary { padding: 8px 24px; }

.search-results-meta {
    margin-bottom: 24px; padding: 12px 16px;
    background: var(--bg-alt); border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}
.search-results-meta p { font-size: 14px; color: var(--text-light); margin: 0; }
.search-results-meta strong { color: var(--warm-900); }
.filter-remove {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--border-light); color: var(--text-muted);
    text-decoration: none; font-size: 14px; margin-left: 8px;
    transition: all .15s;
}
.filter-remove:hover { background: var(--rust); color: #fff; }

mark { background: var(--primary-light); color: var(--primary-dark); padding: 0 2px; border-radius: 2px; }

.search-empty, .no-results {
    padding: 40px 0; text-align: center;
}
.no-results .empty-icon { font-size: 64px; margin-bottom: 16px; }
.no-results h3 { margin-bottom: 8px; }
.no-results p { color: var(--text-light); margin-bottom: 24px; }

.suggestions-section h3 { font-size: 18px; margin-bottom: 16px; }
.suggestion-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 48px; }
.suggestion-tag {
    padding: 8px 16px; background: var(--bg-alt); color: var(--text);
    border-radius: 50px; font-size: 14px; text-decoration: none;
    border: 1px solid var(--border); transition: all .2s;
}
.suggestion-tag:hover {
    background: var(--primary-light); color: var(--primary-dark);
    border-color: var(--primary); transform: translateY(-2px);
}

.popular-section h3 { font-size: 18px; margin-bottom: 20px; text-align: left; }

.channel-quick-links {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 600px; margin: 0 auto;
}
.channel-quick-link {
    display: flex; align-items: center; gap: 8px;
    padding: 14px; background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius); text-decoration: none; color: var(--text);
    transition: all .2s; font-size: 14px; font-weight: 500;
}
.channel-quick-link:hover {
    border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark);
}
.channel-quick-link .cn-icon { font-size: 24px; }

@media (max-width: 768px) {
    .search-modal { padding: 20px; }
    .search-modal-inner { padding: 20px; }
    .search-filters { flex-direction: column; align-items: stretch; }
    .filter-label { display: none; }
    .filter-select, .search-filters .btn-primary { width: 100%; }
    .channel-quick-links { grid-template-columns: 1fr 1fr; }
    .search-results-meta p { font-size: 13px; }
}


/* ============================================================
   HEADER SEARCH BOX (inline with nav)
   ============================================================ */
.header-search {
    display: flex; align-items: center;
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 50px; padding: 2px 2px 2px 14px;
    height: 38px; min-width: 200px; max-width: 280px;
    flex: 1 1 220px; transition: all .2s;
}
.header-search:focus-within {
    background: #fff; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217,119,6,.12);
}
.header-search-icon {
    font-size: 14px; color: var(--text-muted); flex-shrink: 0;
    margin-right: 8px;
}
.header-search input[type="text"] {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font-size: 13px; font-family: inherit; color: var(--text);
    padding: 0;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search-btn {
    background: var(--primary); color: #fff; border: none;
    border-radius: 50px; padding: 6px 16px; font-size: 12px;
    font-weight: 700; font-family: inherit; cursor: pointer;
    text-transform: uppercase; letter-spacing: .5px;
    transition: all .15s; margin-left: 4px;
}
.header-search-btn:hover { background: var(--primary-dark); }

@media (max-width: 1024px) {
    .header-search { min-width: 160px; max-width: 220px; }
}
@media (max-width: 768px) {
    .header-search {
        width: 100%; max-width: 100%; min-width: 0;
        order: 99; margin-top: 12px;
    }
}

/* ============================================================
   SVG ICON SYSTEM (sprite-based, no layout shift)
   Usage: <svg class="icon icon-wrench"><use href="images/icons/sprite.svg#wrench"/></svg>
   Color via `color: var(--primary)` on parent. `currentColor` in fill.
   ============================================================ */
.icon {
    display: inline-block; vertical-align: middle;
    width: 1em; height: 1em;
    flex-shrink: 0; pointer-events: none;
    fill: currentColor;
}
.icon-sm { width: 14px; height: 14px; font-size: 14px; }
.icon-md { width: 18px; height: 18px; font-size: 18px; }
.icon-lg { width: 24px; height: 24px; font-size: 24px; }
.icon-xl { width: 32px; height: 32px; font-size: 32px; }

/* LOGO */
.logo-icon { width: 32px; height: 32px; color: var(--primary); flex-shrink: 0; }

/* ============================================================
   NAV SEARCH TRIGGER (icon button, left of channel links)
   ============================================================ */
.nav-search-trigger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    background: var(--bg-alt, #f5f1ea);
    border: 1.5px solid var(--border, #e8e0d3);
    border-radius: 50%;
    cursor: pointer; transition: all .2s;
    margin-right: 6px;
    flex-shrink: 0;
}
.nav-search-trigger:hover {
    background: var(--primary, #e67e22);
    border-color: var(--primary, #e67e22);
    transform: scale(1.05);
}
.nav-search-trigger:hover img { filter: brightness(0) invert(1); }
.nav-search-trigger img { display: block; }

.nav-channel-icon {
    vertical-align: middle;
    /*margin-right: 6px;*/
    margin-top: -2px;
    flex-shrink: 0;
}

/* Logo icon (PNG) */
.logo-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
}

/* ============================================================
   SEARCH MODAL v2 — title, channel chips, history
   ============================================================ */
.search-modal-title {
    margin: 0 0 16px;
    font-size: 20px; font-weight: 700;
    color: var(--text, #2c2416);
}
.search-modal-close {
    display: flex; align-items: center; justify-content: center;
}
.search-modal-section {
    display: flex; flex-direction: column; gap: 8px;
}
.sm-section-label {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; font-weight: 600;
    color: var(--text-muted, #8a7e6b);
    text-transform: uppercase; letter-spacing: .5px;
}
.sm-clear-history {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted, #8a7e6b);
    font-size: 12px; font-weight: 600; padding: 2px 6px;
    text-transform: uppercase; letter-spacing: .5px;
    transition: color .2s;
}
.sm-clear-history:hover { color: var(--primary, #e67e22); }

.search-modal-channels {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.sm-channel {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; background: var(--bg-alt, #f5f1ea);
    border: 1.5px solid var(--border, #e8e0d3);
    border-radius: 50px; color: var(--text, #2c2416);
    font-size: 13px; font-weight: 500;
    text-decoration: none; transition: all .2s;
    cursor: pointer;
}
.sm-channel:hover {
    background: #fff; border-color: var(--primary, #e67e22);
    color: var(--primary, #e67e22);
}
.sm-channel.active {
    background: var(--primary, #e67e22);
    border-color: var(--primary, #e67e22);
    color: #fff;
}
.sm-channel img { display: block; }
.sm-channel.active img { filter: brightness(0) invert(1); }

.search-modal-history {
    display: flex; flex-direction: column; gap: 4px;
    max-height: 220px; overflow-y: auto;
}
.sm-history-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    color: var(--text, #2c2416);
    text-decoration: none; font-size: 14px;
    border-radius: var(--radius-sm, 6px);
    transition: background .15s;
}
.sm-history-item:hover { background: var(--bg-alt, #f5f1ea); }
.sm-history-item img { opacity: .55; flex-shrink: 0; }

.search-modal-actions {
    display: flex; gap: 8px; padding-top: 4px;
}
.search-modal-actions .btn { flex: 1; padding: 12px; font-size: 15px; }
/* Search modal hint */
.search-modal-hint {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-muted, #8a7e6b);
    padding-top: 4px;
}
.search-modal-hint img { opacity: .65; }

/* Hero / button PNG icons */
.btn-icon { vertical-align: middle; margin-top: -2px; margin-right: 4px; }
.section-title-icon { vertical-align: middle; margin-right: 6px; margin-top: -4px; }
.search-modal-hint kbd {
    background: var(--bg-alt, #f5f1ea);
    border: 1px solid var(--border, #e8e0d3);
    border-radius: 4px; padding: 1px 6px;
    font-size: 11px; font-family: inherit; font-weight: 600;
}

@media (max-width: 768px) {
    .nav-search-trigger { width: 32px; height: 32px; margin-right: 4px; }
    .nav-channel-icon { width: 16px; height: 16px; margin-right: 4px; }
    .main-nav { font-size: 14px; gap: 4px; }
    .main-nav a { padding: 6px 8px; }
    .nav-search-trigger--inline { display: none; }
    .header-search-icon-only { display: inline-flex; }
}
/* Desktop: hide the standalone one (inside-nav one is shown) */
@media (min-width: 769px) {
    .header-search-icon-only { display: none; }
    .nav-search-trigger--inline { display: inline-flex; }
}


/* ========================================================================
   CHANNEL MODULES — Quick Fixes (v0.6)
   Inserted by templates/channel/quick-fixes.tpl.php above the article grid.
   Uses --channel-accent CSS var set inline by the template.
   ======================================================================== */

.qf-troubleshoot {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    --channel-accent: #D97706;
}

.qf-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--warm-900);
}
.qf-header h2 .icon { color: var(--channel-accent); }
.qf-subtitle {
    color: var(--warm-600);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* --- chip filter bar --- */
.qf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--warm-100);
}
.qf-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--warm-200);
    border-radius: 999px;
    background: #fff;
    color: var(--warm-700);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}
.qf-chip:hover {
    border-color: var(--channel-accent);
    color: var(--channel-accent);
}
.qf-chip.is-active {
    background: var(--channel-accent);
    border-color: var(--channel-accent);
    color: #fff;
}
.qf-chip.is-active .icon { color: #fff; }
.qf-chip-count {
    background: rgba(255,255,255,0.25);
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.qf-chip:not(.is-active) .qf-chip-count {
    background: var(--warm-100);
    color: var(--warm-600);
}

/* --- issue list --- */
.qf-issue-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.qf-issue {
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}
.qf-issue:hover {
    border-color: var(--channel-accent);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08);
    transform: translateY(-1px);
}

.qf-issue-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}
.qf-issue-cat {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--warm-100);
    color: var(--warm-700);
}
.qf-issue-cat--noise    { background: #dbeafe; color: #1d4ed8; }
.qf-issue-cat--leak     { background: #cffafe; color: #0e7490; }
.qf-issue-cat--damage   { background: #fed7aa; color: #c2410c; }
.qf-issue-cat--electric { background: #fef3c7; color: #b45309; }
.qf-issue-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--warm-500);
}
.qf-issue-time .icon { color: var(--warm-400); }

.qf-issue-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.3;
}
.qf-issue-title a {
    color: var(--warm-900);
    text-decoration: none;
}
.qf-issue-title a:hover { color: var(--channel-accent); }

.qf-issue-excerpt {
    color: var(--warm-600);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.qf-issue-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--warm-100);
    font-size: 0.8rem;
}

/* --- 5-star difficulty widget --- */
.qf-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
}
.qf-rating-label {
    margin-left: 0.4rem;
    color: var(--warm-500);
    font-size: 0.75rem;
}
.qf-star {
    cursor: pointer;
    color: var(--warm-300);
    transition: color 0.12s ease;
}
.qf-star.is-on { color: var(--channel-accent); }
.qf-star:hover,
.qf-star.is-hover { color: var(--channel-accent); }

.qf-issue-cost {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--warm-600);
}
.qf-issue-cost .icon { color: var(--warm-400); }

.qf-issue-link {
    margin-left: auto;
    color: var(--channel-accent);
    font-weight: 600;
    text-decoration: none;
}
.qf-issue-link:hover { text-decoration: underline; }

/* Mobile: tighter spacing, single column always */
@media (max-width: 768px) {
    .qf-troubleshoot { padding: 0 1rem; margin: 1.5rem auto; }
    .qf-issue { padding: 1rem; }
    .qf-issue-foot { gap: 0.5rem; }
    .qf-issue-link { margin-left: 0; width: 100%; text-align: right; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .qf-issue, .qf-chip, .qf-star { transition: none; }
    .qf-issue:hover { transform: none; }
}


/* ========================================================================
   CHANNEL MODULES v0.10 — 5 sibling styles for the 5 new templates
   Each module uses --channel-accent CSS var set inline by the template.
   BEM naming: rh- / ss- / sm- / cu- / vs- (no overlap with qf-*).
   ======================================================================== */

/* ---------- shared module scaffolding ---------- */
.rh-deposit, .ss-style, .sm-surface, .cu-comfort, .vs-arena {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    --channel-accent: #059669;
}
.rh-header h2, .ss-header h2, .sm-header h2, .cu-header h2, .vs-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--warm-900);
}
.rh-header h2 .icon, .ss-header h2 .icon, .sm-header h2 .icon,
.cu-header h2 .icon, .vs-header h2 .icon { color: var(--channel-accent); }
.rh-subtitle, .ss-subtitle, .sm-subtitle, .cu-subtitle, .vs-subtitle {
    color: var(--warm-600);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* ========================================================================
   RENTAL HACKS (.rh-*)
   ======================================================================== */
.rh-trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.rh-card {
    background: #fff;
    border: 1px solid var(--warm-200);
    border-left: 4px solid var(--channel-accent);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rh-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.10);
}
.rh-card-icon { color: var(--channel-accent); }
.rh-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0.25rem 0;
    color: var(--warm-900);
}
.rh-card-desc {
    color: var(--warm-600);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}
.rh-card-link {
    margin-top: 0.5rem;
    color: var(--channel-accent);
    font-weight: 600;
    font-size: 0.85rem;
}

.rh-tools {
    background: var(--warm-50);
    border-radius: 12px;
    padding: 1.5rem;
}
.rh-tools h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    color: var(--warm-900);
}
.rh-tools h3 .icon { color: var(--channel-accent); }
.rh-tools-sub {
    color: var(--warm-600);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.rh-tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
}
.rh-tool {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: 8px;
    font-size: 0.9rem;
}
.rh-tool--essential { border-left: 3px solid var(--channel-accent); }
.rh-tool--recommended { border-left: 3px solid var(--channel-accent); opacity: 0.85; }
.rh-tool--optional { border-left: 3px solid var(--warm-300); opacity: 0.7; }
.rh-tool-icon { color: var(--channel-accent); }
.rh-tool-name { flex: 1; font-weight: 600; color: var(--warm-900); }
.rh-tool-count { color: var(--warm-500); font-size: 0.8rem; }
.rh-tool-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: var(--warm-100);
    color: var(--warm-700);
}

/* ========================================================================
   SMART STYLING (.ss-*)
   ======================================================================== */
/* v0.15.4: Swiper 4.3.3 marquee — strip is now .swiper, removed overflow-x:auto + scroll-snap (Swiper manages layout internally) */
.ss-strip {
    overflow: hidden;
    position: relative;
    padding: 0.5rem 0 1.5rem;
    margin-bottom: 2rem;
}
.ss-strip.swiper { overflow: hidden; }
.ss-strip.swiper .swiper-wrapper { display: flex; flex-wrap: nowrap; }
/* Swiper default sizes slides — override to keep our 200px card width + flex shrink */
.ss-card.swiper-slide { width: 200px !important; flex-shrink: 0; }
.ss-card {
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    cursor: grab;
}
.ss-card:hover {
    border-color: var(--channel-accent);
    transform: translateY(-2px);
}
.ss-card--empty { opacity: 0.5; cursor: default; }
.ss-card--empty:hover { transform: none; border-color: var(--warm-200); }
.ss-card-icon { color: var(--channel-accent); margin-bottom: 0.25rem; }
.ss-card-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--warm-900);
    margin: 0;
}
.ss-card-desc {
    color: var(--warm-600);
    font-size: 0.82rem;
    line-height: 1.4;
    flex: 1;
}
.ss-card-count {
    font-size: 0.75rem;
    color: var(--channel-accent);
    font-weight: 600;
    margin-top: 0.25rem;
}

.ss-budget h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--warm-900);
}
.ss-budget h3 .icon { color: var(--channel-accent); }
.ss-budget-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.ss-tier {
    background: #fff;
    border: 1.5px solid var(--warm-200);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ss-tier:hover {
    border-color: var(--channel-accent);
    transform: translateY(-1px);
}
.ss-tier.is-active {
    background: var(--channel-accent);
    border-color: var(--channel-accent);
    color: #fff;
}
.ss-tier.is-active .ss-tier-count,
.ss-tier.is-active .ss-tier-desc { color: rgba(255,255,255,0.9); }
.ss-tier-label {
    font-size: 1.1rem;
    font-weight: 700;
}
.ss-tier-count {
    font-size: 0.75rem;
    color: var(--warm-500);
    font-weight: 600;
}
.ss-tier-desc {
    font-size: 0.82rem;
    color: var(--warm-600);
    line-height: 1.4;
}

/* ========================================================================
   SURFACE MAGIC (.sm-* — channel module; .sm- pre-existing for small mobile
   is .sm-only / .sm-hidden etc., no collision with our .sm-* module classes)
   ======================================================================== */
.sm-materials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.sm-card {
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sm-card:hover {
    border-color: var(--channel-accent);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.10);
}
.sm-card--empty { opacity: 0.5; }
.sm-card-icon { color: var(--channel-accent); }
.sm-card-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--warm-900);
    margin: 0;
}
.sm-card-desc {
    color: var(--warm-600);
    font-size: 0.85rem;
    line-height: 1.4;
    flex: 1;
}
.sm-card-stats {
    margin: 0;
    padding: 0.5rem 0;
    border-top: 1px solid var(--warm-100);
    font-size: 0.8rem;
}
.sm-card-stats > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}
.sm-card-stats dt { color: var(--warm-500); margin: 0; }
.sm-card-stats dd { color: var(--warm-900); margin: 0; font-weight: 600; }
.sm-skill { color: var(--warm-300); display: inline-block; line-height: 1; }
.sm-skill.is-on { color: var(--channel-accent); }
.sm-skill + .sm-skill { margin-left: -4px; }
.sm-card-count {
    font-size: 0.75rem;
    color: var(--channel-accent);
    font-weight: 600;
}

.sm-process {
    background: var(--warm-50);
    border-radius: 12px;
    padding: 1.5rem;
}
.sm-process h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--warm-900);
}
.sm-process h3 .icon { color: var(--channel-accent); }
.sm-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    counter-reset: smstep;
}
.sm-step {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}
.sm-step-num {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--channel-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sm-step-icon { color: var(--channel-accent); }
.sm-step-label { font-weight: 700; color: var(--warm-900); font-size: 0.95rem; }
.sm-step-desc { font-size: 0.8rem; color: var(--warm-600); line-height: 1.4; }

/* ========================================================================
   COMFORT UPGRADES (.cu-*)
   ======================================================================== */
.cu-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.cu-card {
    perspective: 1200px;
    height: 200px;
    cursor: pointer;
}
.cu-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}
.cu-card.is-flipped .cu-card-inner { transform: rotateY(180deg); }
.cu-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--warm-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
}
.cu-card-back { transform: rotateY(180deg); }
.cu-card-front { color: var(--warm-900); }
.cu-card-back { background: var(--channel-accent); color: #fff; border-color: var(--channel-accent); }
.cu-card-icon { color: var(--channel-accent); }
.cu-card-back .cu-card-icon { color: #fff; }
.cu-card-label {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}
.cu-card-score {
    font-size: 0.85rem;
    color: var(--warm-600);
}
.cu-card-score strong { color: var(--channel-accent); font-size: 1.05rem; }
.cu-card-back .cu-card-score { color: rgba(255,255,255,0.85); }
.cu-card-back .cu-card-score strong { color: #fff; }

.cu-card-blurb {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}
.cu-card-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}
.cu-card-bar-label { flex: 0 0 60px; text-align: left; }
.cu-card-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}
.cu-card-bar-fill {
    height: 100%;
    background: #fff;
    transition: width 1s ease;
}
.cu-card-bar-pct { flex: 0 0 36px; text-align: right; font-weight: 700; }

/* ========================================================================
   VERSUS (.vs-*)
   ======================================================================== */
.vs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.vs-pk {
    background: #fff;
    border: 1px solid var(--warm-200);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.25rem;
    align-items: stretch;
    transition: all 0.2s ease;
}
.vs-pk:hover {
    border-color: var(--channel-accent);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}
.vs-pk-side {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.vs-pk-side--a { border-right: 1px dashed var(--warm-200); padding-right: 1rem; }
.vs-pk-side--b { padding-left: 1rem; }
.vs-pk-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--warm-500);
    font-weight: 700;
}
.vs-pk-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--warm-900);
    margin: 0;
    line-height: 1.3;
}
.vs-pk-side--a .vs-pk-title { color: var(--channel-accent); }
.vs-pk-rating { display: flex; gap: 0; line-height: 1; }
.vs-pk-star { color: var(--warm-300); display: inline-block; }
.vs-pk-star.is-on { color: var(--channel-accent); }
.vs-pk-star + .vs-pk-star { margin-left: -4px; }
.vs-pk-excerpt {
    font-size: 0.88rem;
    color: var(--warm-600);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}
.vs-pk-points {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}
.vs-pk-pro { color: var(--warm-900); }
.vs-pk-con { color: var(--warm-600); }
.vs-pk-link {
    margin-top: auto;
    color: var(--channel-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}
.vs-pk-link:hover { text-decoration: underline; }

.vs-pk-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}
.vs-pk-vs {
    background: var(--channel-accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.05em;
}

/* ---------- mobile breakpoints (shared across modules) ---------- */
@media (max-width: 768px) {
    .rh-deposit, .ss-style, .sm-surface, .cu-comfort, .vs-arena {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }
    .rh-trio { grid-template-columns: 1fr; }
    .rh-tools-list { grid-template-columns: 1fr; }
    .ss-budget-tiers { grid-template-columns: 1fr; }
    .sm-steps { grid-template-columns: repeat(2, 1fr); }
    .cu-matrix { grid-template-columns: 1fr; }
    .cu-card { height: 180px; }
    .vs-pk { grid-template-columns: 1fr; }
    .vs-pk-side--a { border-right: none; border-bottom: 1px dashed var(--warm-200); padding-right: 0; padding-bottom: 1rem; }
    .vs-pk-side--b { padding-left: 0; padding-top: 1rem; }
    .vs-pk-divider { padding: 0.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    .rh-card, .ss-card, .sm-card, .cu-card-inner, .vs-pk { transition: none; }
    .cu-card.is-flipped .cu-card-inner { transform: none; }
}
