/* ============================================
   Tower Rush Expert Guide — Main Stylesheet
   Mobile-First, Responsive Design
   Colors: Orange #E8A835, Blue #5BB3E0, Dark #1a1a2e
   ============================================ */

/* --- CSS Variables --- */
:root {
    --color-primary: #8a5a10;
    --color-primary-dark: #6f470a;
    --color-secondary: #1e5b80;
    --color-secondary-dark: #173f5c;
    --color-bg: #e8f1f8;
    --color-bg-light: #d6e7f2;
    --color-bg-card: #f0f7fc;
    --color-bg-section: #dcedf7;
    --color-text: #1e3a4f;
    --color-text-muted: #44677d;
    --color-text-heading: #0f2a3d;
    --color-success: #246f46;
    --color-danger: #c0392b;
    --color-warning: #7a4f0d;
    --color-border: #b8d4e8;
    --color-link: #1e5b80;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-heading: var(--font-body);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(60, 50, 30, 0.12);
    --shadow-sm: 0 2px 12px rgba(60, 50, 30, 0.08);
    --max-width: 1140px;
    --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary); }
main p a,
main li a,
main td a,
.site-footer p a,
.site-footer li a,
.footer-disclaimer a,
.affiliate-disclosure a {
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* --- Skip Link --- */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 9999;
    background: var(--color-primary); color: var(--color-bg); padding: 8px 16px;
    font-weight: 600; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { left: 50%; transform: translateX(-50%); }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Header --- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(232, 241, 248, 0.97);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}
.header-container {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: 100%;
}
.header-logo img { height: 40px; width: auto; }
.main-nav { display: none; }
.nav-list { display: flex; gap: 4px; }
.nav-list a {
    color: var(--color-text); font-size: 0.9rem; font-weight: 500;
    padding: 8px 12px; border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}
.nav-list a:hover { background: var(--color-bg-light); color: var(--color-primary); }

.btn-play-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-bg); font-weight: 700; font-size: 0.85rem;
    padding: 8px 18px; border-radius: var(--radius-sm);
    text-transform: uppercase; letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.btn-play-header:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232, 168, 53, 0.4); color: var(--color-bg); }

/* Burger Menu */
.mobile-menu-btn {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
    z-index: 1001;
}
.burger-line {
    width: 24px; height: 2px; background: var(--color-text-heading);
    transition: transform 0.3s, opacity 0.3s;
}
.mobile-menu-btn[aria-expanded="true"] .burger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; }
.mobile-menu-btn[aria-expanded="true"] .burger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav Open */
.main-nav.nav--open {
    display: flex; position: fixed; top: var(--header-height); left: 0; right: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 16px; z-index: 999;
}
.main-nav.nav--open .nav-list { flex-direction: column; width: 100%; }
.main-nav.nav--open .nav-list a { padding: 12px 16px; font-size: 1rem; display: block; }

/* Desktop Nav */
@media (min-width: 900px) {
    .main-nav { display: flex; }
    .mobile-menu-btn { display: none; }
}

/* --- Buttons --- */
.btn {
    display: inline-block; padding: 12px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 1rem; text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    cursor: pointer; border: none; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-bg);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(232, 168, 53, 0.4); color: var(--color-bg); }
.btn-secondary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    color: var(--color-bg);
}
.btn-secondary:hover { box-shadow: 0 6px 20px rgba(91, 179, 224, 0.4); color: var(--color-bg); }
.btn-outline {
    background: transparent; border: 2px solid var(--color-primary);
    color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: var(--color-bg); }
.btn-ghost {
    background: transparent; border: 2px solid var(--color-border);
    color: var(--color-text);
}
.btn-ghost:hover { border-color: var(--color-text); }
.btn-large { padding: 16px 32px; font-size: 1.1rem; }
.btn-sticky { padding: 10px 20px; font-size: 0.9rem; }

/* --- Hero --- */
.hero {
    position: relative; overflow: hidden;
    padding: 80px 16px 48px; min-height: 420px;
    display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(232,241,248,0.85), rgba(214,231,242,0.65));
}
.hero-content {
    position: relative; z-index: 1;
    max-width: var(--max-width); margin: 0 auto; width: 100%;
    display: flex; flex-direction: column; gap: 24px; align-items: center;
}
.hero-text { flex: 1; }
.hero-image { flex-shrink: 0; max-width: 320px; }
.hero-video { border-radius: var(--radius); background: var(--color-bg-light); }
.hero h1 {
    font-family: var(--font-heading); font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800; color: var(--color-text-heading);
    line-height: 1.2; margin-bottom: 12px;
}
.hero-subtitle { font-size: 1.05rem; color: var(--color-text-muted); margin-bottom: 20px; max-width: 600px; }
.hero--subpage { min-height: 280px; padding: 80px 16px 32px; }
.hero--subpage .hero-image { max-width: 260px; }

.freshness-badge {
    display: inline-block; background: rgba(46, 139, 87, 0.1); color: var(--color-success);
    padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
    margin-bottom: 12px; border: 1px solid rgba(46, 139, 87, 0.25);
}
.breadcrumb { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--color-link); }

/* Quick Stats */
.quick-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    margin-bottom: 20px;
}
.stat-item {
    background: var(--color-bg-card); border-radius: var(--radius-sm);
    padding: 12px; text-align: center; border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}
.stat-value { display: block; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

@media (min-width: 768px) {
    .hero-content { flex-direction: row; align-items: center; }
    .hero-image { max-width: 400px; }
    .quick-stats { grid-template-columns: repeat(4, 1fr); }
    .hero--subpage .hero-image { max-width: 360px; }
}

/* --- TOC --- */
.toc {
    max-width: var(--max-width); margin: 0 auto;
    padding: 24px 16px;
}
.toc h2 { font-family: var(--font-heading); font-size: 1.1rem; color: var(--color-text-heading); margin-bottom: 12px; }
.toc ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc li a {
    display: inline-block; background: var(--color-bg-card); padding: 6px 14px;
    border-radius: 20px; font-size: 0.85rem; color: var(--color-text);
    border: 1px solid var(--color-border); transition: all 0.2s;
    text-decoration: none;
}
.toc li a::before { content: counter(toc) ". "; color: var(--color-primary); font-weight: 600; }
.toc li a:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* --- Content Sections --- */
.content-section {
    max-width: var(--max-width); margin: 0 auto;
    padding: 48px 16px;
    border-bottom: 1px solid var(--color-border);
}
.content-section:last-of-type { border-bottom: none; }
.section-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.content-section h2 {
    font-family: var(--font-heading); font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700; color: var(--color-text-heading);
    margin-bottom: 16px; line-height: 1.3;
}
.content-section h3 {
    font-family: var(--font-heading); font-size: 1.2rem;
    font-weight: 600; color: var(--color-text-heading);
    margin: 24px 0 12px;
}
.content-section h4 { font-size: 1rem; font-weight: 600; color: var(--color-text-heading); margin-bottom: 8px; }
.content-section p { margin-bottom: 16px; }
.content-section ul, .content-section ol { margin-bottom: 16px; padding-left: 20px; }
.content-section li { margin-bottom: 8px; list-style: disc; }
.content-section ol li { list-style: decimal; }

/* --- Tables --- */
.specs-table-wrapper, .comparison-table-wrapper { overflow-x: auto; margin: 24px 0; border-radius: var(--radius); }
.specs-table, .comparison-table {
    border: 1px solid var(--color-border); border-radius: var(--radius);
    overflow: hidden;
}
.specs-table th, .comparison-table th {
    background: var(--color-bg-card); color: var(--color-text-heading);
    padding: 12px 16px; text-align: left; font-weight: 600; font-size: 0.9rem;
    white-space: nowrap;
}
.specs-table td, .comparison-table td {
    padding: 12px 16px; border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}
.specs-table tr:hover, .comparison-table tr:hover { background: rgba(192, 138, 32, 0.06); }
.highlight-col { background: rgba(192, 138, 32, 0.08); }

/* --- Differentiators Grid --- */
.differentiators-grid, .rules-grid, .strategy-cards, .options-cards {
    display: grid; grid-template-columns: 1fr; gap: 16px; margin: 24px 0;
}
@media (min-width: 600px) { .differentiators-grid, .rules-grid, .strategy-cards, .options-cards { grid-template-columns: repeat(2, 1fr); } }
.diff-card, .rule-card, .option-card {
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--radius); padding: 20px;
    transition: transform 0.2s, border-color 0.2s;
}
.diff-card:hover, .rule-card:hover, .option-card:hover { transform: translateY(-2px); border-color: var(--color-primary); }
.diff-icon { font-size: 2rem; margin-bottom: 8px; }
.diff-card h3,
.interface-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-heading);
    margin: 0 0 8px;
}
.option-badge {
    display: inline-block; background: rgba(232,168,53,0.15); color: var(--color-primary);
    padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; margin-top: 12px;
}

/* --- Steps --- */
.steps-animated { margin: 24px 0; }
.step {
    display: flex; gap: 16px; margin-bottom: 24px;
    padding: 16px; background: var(--color-bg-card);
    border-radius: var(--radius); border-left: 4px solid var(--color-primary);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.step-number {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
    background: var(--color-primary); color: var(--color-bg);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem;
}
.step-content h3 { margin-top: 0; }

/* Animated step flow */
.animated-steps-diagram { margin: 24px 0; overflow-x: auto; }
.step-flow { display: flex; align-items: center; gap: 0; justify-content: center; }
.flow-step { display: flex; align-items: center; }
.flow-circle {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--color-bg-card); border: 3px solid var(--color-border);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: 700; color: var(--color-text-muted);
    transition: all 0.3s;
}
.flow-step.active .flow-circle { border-color: var(--color-primary); color: var(--color-primary); background: rgba(232,168,53,0.1); }
.flow-line { width: 40px; height: 3px; background: var(--color-border); }

/* --- Section CTA --- */
.section-cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.section-cta img { border-radius: var(--radius-sm); max-width: 360px; }

/* --- Gallery --- */
.gallery-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--color-border); background: var(--color-bg-card);
    transition: transform 0.2s;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img, .gallery-item video { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-item figcaption {
    padding: 8px 12px; font-size: 0.8rem; color: var(--color-text-muted);
}

/* --- Partner Card --- */
.partner-card {
    background: var(--color-bg-card); border: 2px solid var(--color-primary);
    border-radius: var(--radius); overflow: hidden; margin: 24px 0;
}
.partner-header {
    background: linear-gradient(135deg, rgba(232,168,53,0.15), rgba(232,168,53,0.05));
    padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 8px;
}
.partner-badge {
    background: var(--color-primary); color: var(--color-bg);
    padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase;
}
.partner-rating { font-size: 0.9rem; }
.stars { color: var(--color-primary); font-size: 1.1rem; margin-right: 8px; }
.rating-text { color: var(--color-text-muted); }
.partner-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 600px) { .partner-body { flex-direction: row; } }
.partner-info { flex: 1; }
.partner-features { padding-left: 0; }
.partner-features li { list-style: none; padding: 4px 0; color: var(--color-success); font-size: 0.95rem; }
.partner-action { display: flex; flex-direction: column; gap: 8px; align-items: center; min-width: 200px; }
.partner-disclaimer { font-size: 0.75rem; color: var(--color-text-muted); text-align: center; }
.affiliate-disclosure { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 16px; }

/* --- Charts --- */
.chart-container {
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--radius); padding: 24px; margin: 24px 0;
}
.chart-container h3 { margin-top: 0; margin-bottom: 16px; }

/* Horizontal Bar Chart */
.h-chart { display: flex; flex-direction: column; gap: 20px; padding: 16px 0; }
.h-chart-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.h-chart-label { font-weight: 700; font-size: 0.95rem; color: var(--color-text-heading); min-width: 110px; }
.h-chart-bars { flex: 1; min-width: 200px; }
.h-chart-bar-group { display: flex; flex-direction: column; gap: 4px; }
.h-bar {
    height: 28px; border-radius: var(--radius-sm);
    display: flex; align-items: center; padding: 0 12px;
    font-size: 0.8rem; font-weight: 700; color: #fff;
    min-width: 40px;
    animation: growBar 1s ease forwards;
    transform-origin: left;
}
.h-bar-risk { background: linear-gradient(90deg, #9d2e22, #7f241b); }
.h-bar-reward { background: linear-gradient(90deg, #1f6b44, #185235); }
.h-chart-meta { font-size: 0.8rem; color: var(--color-text-muted); min-width: 140px; }
@media (max-width: 600px) {
    .h-chart-row { flex-direction: column; align-items: flex-start; }
    .h-chart-meta { margin-top: -4px; }
}
.chart-legend { display: flex; gap: 16px; margin-top: 16px; justify-content: center; width: 100%; position: relative; z-index: 3; }
.legend-item { font-size: 0.8rem; display: flex; align-items: center; gap: 6px; }
.legend-item::before { content: ''; width: 12px; height: 3px; border-radius: 2px; background: var(--color, #999); }
.legend-risk::before { background: var(--color-danger); }
.legend-reward::before { background: var(--color-success); }

/* Multiplier Bars */
.multiplier-bars { display: flex; flex-direction: column; gap: 8px; }
.m-bar { display: flex; align-items: center; gap: 12px; }
.m-bar-fill {
    height: 32px; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    width: calc(var(--bar-width) * 2.5); min-width: 60px;
    display: flex; align-items: center; padding: 0 10px;
    font-size: 0.8rem; font-weight: 700; color: var(--color-bg);
    animation: growBar 1s ease forwards;
    transform-origin: left;
}
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.m-bar-label { font-size: 0.85rem; color: var(--color-text-muted); white-space: nowrap; min-width: 60px; }

/* Donut / Pie Chart placeholder */
.donut-chart { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 16px; }
.donut-segment .segment-label {
    display: inline-block; padding: 6px 12px;
    background: var(--color-bg-light); border-radius: 20px;
    font-size: 0.85rem; border: 1px solid var(--color-border);
}

/* Line chart */
.line-chart { position: relative; height: 260px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 16px; overflow: hidden; }
.line-chart-grid { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; z-index: 1; }
.grid-line { border-bottom: 1px dashed rgba(0,0,0,0.08); font-size: 0.75rem; color: var(--color-text-muted); }
.line-conservative, .line-moderate, .line-aggressive {
    position: absolute; top: 16px; left: 56px; right: 16px; height: calc(100% - 32px);
    z-index: 2; pointer-events: none;
}
.line-conservative::after, .line-moderate::after, .line-aggressive::after {
    content: ''; position: absolute; inset: 0;
    background-repeat: no-repeat; background-size: 100% 100%;
}
.line-conservative::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200' preserveAspectRatio='none'%3E%3Cpolyline fill='none' stroke='%234ade80' stroke-width='3' points='0,50 40,52 80,48 120,55 160,58 200,54 240,60 280,62 320,65 360,68 400,72'/%3E%3C/svg%3E");
}
.line-moderate::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200' preserveAspectRatio='none'%3E%3Cpolyline fill='none' stroke='%23e8a835' stroke-width='3' points='0,50 40,42 80,60 120,45 160,70 200,55 240,80 280,65 320,90 360,85 400,100'/%3E%3C/svg%3E");
}
.line-aggressive::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200' preserveAspectRatio='none'%3E%3Cpolyline fill='none' stroke='%23ef4444' stroke-width='3' points='0,50 40,20 80,90 120,30 160,120 200,60 240,150 280,40 320,160 360,110 400,140'/%3E%3C/svg%3E");
}

/* Wagering bar */
.wagering-example { margin: 16px 0; }
.wagering-bar {
    height: 36px; background: var(--color-bg-light); border-radius: var(--radius-sm);
    overflow: hidden; position: relative;
}
.wagering-fill {
    height: 100%; background: linear-gradient(90deg, var(--color-success), var(--color-secondary));
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    display: flex; align-items: center; padding: 0 12px;
    font-size: 0.8rem; font-weight: 600; color: var(--color-bg);
    animation: growBar 1.5s ease forwards;
    transform-origin: left;
}
.wagering-target { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.8rem; color: var(--color-text-muted); }
.wagering-status { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 8px; }

/* Freeze bar */
.freeze-bar { display: flex; height: 32px; border-radius: var(--radius-sm); overflow: hidden; margin: 12px 0; }
.freeze-fill { background: var(--color-secondary); display: flex; align-items: center; padding: 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--color-bg); }
.freeze-potential { background: rgba(74,222,128,0.3); display: flex; align-items: center; padding: 0 8px; font-size: 0.75rem; color: #185235; }
.bonus-visual-label { font-size: 0.8rem; color: var(--color-text-muted); }

/* Wheel sections */
.wheel-sections { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.wheel-section {
    padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
    background: var(--color-bg-light); color: var(--color-text-heading);
    border: 2px solid var(--segment-color, var(--color-border));
}

/* --- Strategy Cards --- */
.strat-card {
    background: var(--color-bg-card); border-radius: var(--radius);
    padding: 20px; border: 1px solid var(--color-border); margin-bottom: 16px;
}
.strat-conservative { border-left: 4px solid var(--color-success); }
.strat-moderate { border-left: 4px solid var(--color-primary); }
.strat-aggressive { border-left: 4px solid var(--color-danger); }
.strat-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.strat-badge {
    padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: 600;
    background: rgba(255,255,255,0.05); color: var(--color-text-muted);
}

/* --- Bonus Cards --- */
.bonus-cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 24px 0; }
@media (min-width: 768px) { .bonus-cards { grid-template-columns: repeat(3, 1fr); } }
.bonus-card {
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--radius); overflow: hidden;
}
.bonus-header {
    padding: 16px 20px; display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.03);
}
.bonus-icon { font-size: 1.5rem; }
.bonus-header h3 { margin: 0; font-size: 1.1rem; }
.bonus-tag {
    margin-left: auto; padding: 2px 10px; border-radius: 12px;
    font-size: 0.75rem; font-weight: 600;
    background: rgba(232,168,53,0.15); color: var(--color-primary);
}
.bonus-body { padding: 16px 20px; }
.bonus-frozen .bonus-header { border-bottom: 3px solid var(--color-secondary); }
.bonus-temple .bonus-header { border-bottom: 3px solid var(--color-primary); }
.bonus-triple .bonus-header { border-bottom: 3px solid var(--color-success); }

/* --- Calculator --- */
.calculator-widget {
    background: var(--color-bg-card); border: 2px solid var(--color-secondary);
    border-radius: var(--radius); padding: 24px; margin: 24px 0;
}
.calc-inputs { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.calc-field { flex: 1; min-width: 200px; }
.calc-field label { display: block; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 6px; }
.calc-field input[type="number"], .calc-field input[type="range"] {
    width: 100%; padding: 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--color-border); background: var(--color-bg);
    color: var(--color-text-heading); font-size: 1.1rem; font-weight: 600;
}
.calc-field input[type="range"] { padding: 0; height: 36px; cursor: pointer; }
.calc-field output {
    display: inline-block; background: var(--color-primary);
    color: var(--color-bg); padding: 2px 10px; border-radius: 12px;
    font-weight: 700; font-size: 0.9rem; margin-top: 4px;
}
.calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 600px) { .calc-results { grid-template-columns: 1fr; } }
.calc-result-item {
    background: var(--color-bg); border-radius: var(--radius-sm);
    padding: 16px; text-align: center;
}
.calc-result-highlight { border: 2px solid var(--color-primary); }
.calc-label { display: block; font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 4px; }
.calc-value { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--color-primary); }
.calc-disclaimer { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 16px; }

/* --- Author --- */
.author-card, .author-experience {
    background: var(--color-bg-card); border-radius: var(--radius);
    padding: 20px; border: 1px solid var(--color-border);
}
.author-card { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.author-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-photo-large { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.author-info strong { display: block; font-size: 1.05rem; color: var(--color-text-heading); }
.author-info span { font-size: 0.85rem; color: var(--color-text-muted); }
.author-social { display: flex; gap: 8px; margin-top: 8px; }
.author-social a {
    padding: 4px 10px; border-radius: 12px; font-size: 0.8rem;
    background: var(--color-bg); border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}
.author-social a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.author-social--large a { padding: 6px 14px; font-size: 0.9rem; }
.experience-quotes blockquote {
    border-left: 3px solid var(--color-primary); padding: 12px 16px;
    margin: 16px 0; background: rgba(212,149,42,0.07); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}
.author-profile { margin: 24px 0; }
.author-profile-card { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.author-bio p:first-child { font-size: 1.05rem; }

/* Timeline */
.timeline { margin: 32px 0; }
.timeline-items { position: relative; padding-left: 24px; border-left: 3px solid var(--color-border); }
.timeline-item { position: relative; padding: 0 0 24px 20px; }
.timeline-marker {
    position: absolute; left: -13px; top: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--color-primary); border: 3px solid var(--color-bg);
}
.timeline-date { font-size: 0.8rem; color: var(--color-primary); font-weight: 700; }

/* --- Verdict --- */
.verdict-section { background: var(--color-bg-section); border-radius: var(--radius); padding: 32px 16px; }
.verdict-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 24px 0; }
@media (min-width: 600px) { .verdict-grid { grid-template-columns: 1fr 1fr; } }
.verdict-pros, .verdict-cons {
    background: var(--color-bg-card); border-radius: var(--radius);
    padding: 20px;
}
.verdict-pros { border-top: 3px solid var(--color-success); }
.verdict-cons { border-top: 3px solid var(--color-danger); }
.verdict-pros li { list-style: none; padding-left: 20px; position: relative; }
.verdict-pros li::before { content: '✓'; position: absolute; left: 0; color: var(--color-success); font-weight: 700; }
.verdict-cons li { list-style: none; padding-left: 20px; position: relative; }
.verdict-cons li::before { content: '✗'; position: absolute; left: 0; color: var(--color-danger); font-weight: 700; }
.verdict-score { display: flex; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.score-circle {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.score-number { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--color-bg); line-height: 1; }
.score-label { font-size: 0.7rem; color: rgba(26,26,46,0.7); }
.verdict-summary { flex: 1; font-size: 1rem; }

/* --- FAQ --- */
.faq-list { margin: 24px 0; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden; }
.faq-question {
    width: 100%; padding: 16px; background: var(--color-bg-card);
    border: none; color: var(--color-text-heading); font-size: 1rem;
    font-weight: 600; text-align: left; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    transition: background 0.2s;
    font-family: var(--font-body);
}
.faq-question:hover { background: var(--color-bg-section); }
.faq-icon { flex-shrink: 0; transition: transform 0.3s; fill: none; stroke: var(--color-text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s; }
.faq-item.active .faq-answer { max-height: 500px; padding: 0 16px 16px; }
.faq-answer p { font-size: 0.95rem; color: var(--color-text); }

/* --- Warning/Tip Boxes --- */
.warning-box, .tip-box {
    border-radius: var(--radius); padding: 20px; margin: 24px auto;
    max-width: var(--max-width);
}
.warning-box {
    background: rgba(192, 57, 43, 0.06); border: 1px solid rgba(192, 57, 43, 0.2);
}
.warning-box h2,
.warning-box h3 { color: var(--color-danger); margin-bottom: 8px; font-size: 1.2rem; }
.warning-box--critical { border-width: 2px; }
.tip-box {
    background: rgba(58, 139, 181, 0.06); border: 1px solid rgba(58, 139, 181, 0.2);
}

/* --- Mistakes List --- */
.mistakes-list .mistake-item, .myths-list .myth-item {
    background: var(--color-bg-card); border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px; border-left: 4px solid var(--color-danger);
}

/* --- Interface Breakdown --- */
.interface-breakdown { display: flex; flex-direction: column; gap: 24px; margin: 24px 0; }
@media (min-width: 768px) { .interface-breakdown { flex-direction: row; align-items: flex-start; } }
.interface-image { flex-shrink: 0; max-width: 340px; }
@media (min-width: 768px) { .interface-image { position: sticky; top: calc(var(--header-height) + 16px); } }
.interface-image img { border-radius: var(--radius); width: 100%; height: auto; }
.interface-labels { flex: 1; }
.interface-item { display: flex; gap: 12px; margin-bottom: 16px; }
.label-number {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    background: var(--color-primary); color: var(--color-bg);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}

/* --- Numbered List --- */
.numbered-list { padding-left: 0; counter-reset: numlist; }
.numbered-list li { list-style: none; counter-increment: numlist; padding: 12px 16px 12px 48px; position: relative; margin-bottom: 8px; background: var(--color-bg-card); border-radius: var(--radius-sm); }
.numbered-list li::before {
    content: counter(numlist); position: absolute; left: 12px; top: 12px;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--color-primary); color: var(--color-bg);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}

/* --- Demo Stats --- */
.demo-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
@media (min-width: 600px) { .demo-stats { grid-template-columns: repeat(4, 1fr); } }
.demo-stat-item { background: var(--color-bg-card); border-radius: var(--radius); padding: 20px; text-align: center; border: 1px solid var(--color-border); }
.demo-stat-value { display: block; font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--color-primary); }
.demo-stat-label { font-size: 0.8rem; color: var(--color-text-muted); }

/* --- CTA Section --- */
.cta-section { text-align: center; }
.cta-box {
    background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-light));
    border: 2px solid var(--color-primary); border-radius: var(--radius);
    padding: 32px 24px; margin: 24px 0;
}
.cta-box h2 { color: var(--color-primary); }
.cta-box .hero-cta { justify-content: center; }
.last-updated { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 16px; }

/* --- Promo Cards --- */
.promo-card {
    background: var(--color-bg-card); border: 2px solid var(--color-success);
    border-radius: var(--radius); overflow: hidden; margin: 24px 0;
}
.promo-header { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; background: rgba(74,222,128,0.05); }
.promo-header h3 { margin: 0; }
.promo-badge { background: var(--color-success); color: var(--color-bg); padding: 4px 12px; border-radius: 12px; font-size: 0.8rem; font-weight: 700; }
.promo-body { padding: 20px; }
.promo-value { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--color-primary); margin-bottom: 12px; }
.promo-details ul { padding-left: 16px; }
.promo-details li { list-style: disc; margin-bottom: 6px; font-size: 0.9rem; }
.promo-action { margin-top: 16px; text-align: center; }

/* --- Bonus Strategy --- */
.bonus-strategies { margin: 24px 0; }
.bonus-strat-item { background: var(--color-bg-card); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; border-left: 4px solid var(--color-secondary); }

/* --- Sticky CTA Bar (mobile) --- */
.sticky-cta-bar {
    position: fixed; bottom: -80px; left: 0; right: 0; z-index: 999;
    background: rgba(232, 241, 248, 0.98);
    border-top: 1px solid var(--color-border); box-shadow: 0 -2px 12px rgba(30,58,79,0.1);
    padding: 10px 16px; display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
    transition: bottom 0.3s ease;
}
.sticky-cta-bar.visible { bottom: 0; }
.sticky-cta-text { font-size: 0.9rem; font-weight: 600; }
@media (min-width: 900px) { .sticky-cta-bar { display: none; } }

/* --- Footer --- */
.site-footer {
    background: var(--color-bg-light); border-top: 3px solid var(--color-primary); color: var(--color-text);
    padding: 48px 0 0; margin-top: 48px;
}
.footer-container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-heading { color: var(--color-text-heading); font-size: 1rem; margin-bottom: 12px; line-height: 1.3; }
.footer-col p { font-size: 0.85rem; color: var(--color-text-muted); }
.footer-col ul li { margin-bottom: 6px; list-style: none; }
.footer-col ul a { color: var(--color-text-muted); font-size: 0.85rem; }
.footer-col ul a:hover { color: var(--color-primary); }
.footer-logo { width: 42px; height: 42px; object-fit: contain; margin-bottom: 12px; }
.footer-social { display: flex; gap: 8px; margin-top: 8px; }
.footer-social a {
    padding: 6px 12px; border-radius: var(--radius-sm);
    background: var(--color-bg-card); color: var(--color-text-muted);
    font-size: 0.85rem; border: 1px solid var(--color-border);
}
.footer-social a:hover { border-color: var(--color-primary); color: var(--color-primary); }

.trust-badges {
    display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
    align-items: center; padding: 24px 0; border-top: 1px solid var(--color-border);
}
.trust-badges img { height: 40px; width: auto; opacity: 0.7; transition: opacity 0.2s; }
.trust-badges img:hover { opacity: 1; }

.footer-disclaimer {
    background: rgba(192, 57, 43, 0.05); border: 1px solid rgba(192, 57, 43, 0.15);
    border-radius: var(--radius-sm); padding: 16px; margin: 16px 0;
}
.footer-disclaimer p { font-size: 0.8rem; color: var(--color-text-muted); margin: 0; }

.footer-copyright { text-align: center; padding: 16px 0; border-top: 1px solid var(--color-border); }
.footer-copyright p { font-size: 0.8rem; color: var(--color-text-muted); margin: 0; }

/* --- Focus States (a11y) --- */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* --- Print --- */
@media print {
    .site-header, .sticky-cta-bar, .site-footer, .hero-bg video, .btn { display: none; }
    body { background: #fff; color: #000; }
}

/* ============================================
   GAME COMPARISON MINI-WIDGET (towerrsush1x differentiator)
   Tower Rush vs other crash-style games with cross-page links
   ============================================ */
.game-compare {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-light) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.game-compare__caption {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary-dark);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.game-compare__caption::before {
    content: '⚔';
    font-size: 1.25rem;
}
.game-compare__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.game-compare__table th,
.game-compare__table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.game-compare__table th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    font-weight: 700;
    background: rgba(255,255,255,0.3);
}
.game-compare__table tr:last-child td {
    border-bottom: 0;
}
.game-compare__table tr.is-featured td {
    background: rgba(212, 149, 42, 0.08);
    font-weight: 600;
    color: var(--color-text-heading);
}
.game-compare__table tr.is-featured td:first-child::before {
    content: '★';
    color: var(--color-primary);
    margin-right: 0.35rem;
}
.game-compare__table a {
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-link);
    transition: color 0.2s ease;
}
.game-compare__table a:hover {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary-dark);
}
.game-compare__footer {
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-style: italic;
}
@media (max-width: 600px) {
    .game-compare__table th:nth-child(3),
    .game-compare__table td:nth-child(3) { display: none; }
}

@supports (content-visibility: auto) {
    .toc,
    .content-section,
    .site-footer {
        content-visibility: auto;
        contain-intrinsic-size: auto 640px;
    }

    .toc {
        contain-intrinsic-size: auto 96px;
    }

    .site-footer {
        contain-intrinsic-size: auto 420px;
    }
}
