/* ========================================================================
   READY AIM RETIRE - MASTER EDITORIAL STYLESHEET
   Shared across all blog articles for consistent design.
   ======================================================================== */

/* --- 1. DESIGN TOKENS (VARIABLES) --- */
:root {
    /* Color Palette: Slate Navy & RAR Teal (used sparingly) */
    --color-primary: #1E293B;      
    --color-primary-light: #334155; 
    --color-accent: #14b8a6;       
    --color-accent-light: #f0fdfa; 
    
    --color-bg-page: #FAFAFA;      
    --color-bg-surface: #FFFFFF;   
    --color-bg-alt: #F8FAFC;
    
    --color-text-main: #334155;
    --color-text-muted: #64748b;
    --color-heading: #0F172A;
    --color-border: #E2E8F0;

    /* Typography */
    --font-heading: 'Playfair Display', serif; 
    --font-body: 'Lora', serif;                
    --font-ui: 'Inter', sans-serif;            

    /* Layout */
    --content-width: 970px; 
}

/* --- 2. GLOBAL RESET & BASE --- */
.editorial-content {
    max-width: var(--content-width);
    margin: 0 auto;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 1.125rem; 
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* --- 3. TYPOGRAPHY --- */
.editorial-content h1,
.editorial-content h2,
.editorial-content h3,
.editorial-content h4,
.editorial-content h5,
.editorial-content h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.editorial-content h1 { font-size: 2.75rem; line-height: 1.2; }
.editorial-content h2 { font-size: 2rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
.editorial-content h3 { font-size: 1.5rem; }
.editorial-content h4 { font-size: 1.25rem; }

.editorial-content p { margin-bottom: 1.5rem; }

.lead-text {
    font-size: 1.3rem;
    color: var(--color-primary-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.editorial-content strong { font-weight: 600; color: var(--color-primary); }
.editorial-content em { font-style: italic; }

.editorial-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--color-accent);
    transition: all 0.2s ease;
}
.editorial-content a:hover {
    background-color: var(--color-accent-light);
    border-bottom-color: var(--color-primary);
}

/* --- 4. LISTS --- */
.editorial-content ul,
.editorial-content ol {
    margin: 0 0 1.5rem 0;
    padding-left: 1.5rem;
}
.editorial-content li {
    margin-bottom: 0.75rem;
}
.editorial-content ul li::marker {
    color: var(--color-accent);
}
.editorial-content ol li::marker {
    color: var(--color-primary);
    font-weight: 600;
    font-family: var(--font-ui);
}

/* --- 5. BUTTONS & LINKS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}
.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff !important;
    border-bottom: none;
}
.btn-primary:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}
.btn-secondary {
    background-color: transparent;
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}
.btn-secondary:hover {
    background-color: var(--color-bg-alt);
    border-bottom-color: var(--color-primary);
}

/* --- 6. DIVIDERS --- */
.editorial-divider {
    border: 0;
    height: 1px;
    background: var(--color-border);
    margin: 3rem 0;
    position: relative;
    overflow: visible;
}
.editorial-divider.with-icon::after {
    content: "✦";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-page);
    padding: 0 1rem;
    color: var(--color-accent);
    font-size: 1.2rem;
}

/* --- 7. TABLES --- */
.table-container {
    overflow-x: auto;
    margin: 2.5rem 0;
}
.editorial-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}
.editorial-table th {
    background: var(--color-bg-alt);
    color: var(--color-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--color-border);
}
.editorial-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-main);
}
.editorial-table tr:last-child td { border-bottom: none; }
.editorial-table tr:hover td { background: var(--color-bg-alt); }

/* --- 8. UI COMPONENTS --- */

/* A: TL;DR Box */
.tldr-box {
    background: var(--color-bg-surface);
    border-top: 4px solid var(--color-accent);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    margin: 3rem 0;
    padding: 2.5rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    line-height: 1.6;
}
.tldr-header {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem;
    font-weight: 700; font-size: 1.1rem; color: var(--color-heading);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.tldr-icon {
    background: var(--color-accent-light); color: var(--color-accent);
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 1.1rem;
}
.tldr-summary {
    margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border);
    font-weight: 600; color: var(--color-primary); margin-bottom: 0;
}

/* B: Insight Card */
.insight-card {
    background: var(--color-bg-surface);
    border-radius: 12px;
    padding: 2.5rem 2.5rem 2rem;
    position: relative;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
    margin: 4rem 0;
    border: 1px solid var(--color-border);
    text-align: center;
}
.insight-card .icon-badge {
    position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
    background: var(--color-primary); color: #fff; width: 48px; height: 48px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; box-shadow: 0 4px 10px rgba(30, 41, 59, 0.3);
}
.insight-card h4 { margin-top: 0; font-size: 1.25rem; color: var(--color-primary); border-bottom: none; }
.insight-card p { margin-bottom: 0; font-family: var(--font-body); font-style: italic; }

/* C: Info / Definition Box */
.info-box {
    background: var(--color-bg-alt);
    border-left: 4px solid var(--color-primary-light);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    border-radius: 0 8px 8px 0;
}
.info-box h5 { margin-top: 0; font-family: var(--font-ui); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.info-box p:last-child { margin-bottom: 0; }

/* D: Editorial Pull Quote */
.pull-quote {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    line-height: 1.4;
    color: var(--color-primary);
    text-align: center;
    margin: 4rem auto;
    padding: 0;
    position: relative;
    font-style: italic;
}
.pull-quote::before, .pull-quote::after {
    content: ""; display: block; width: 40px; height: 2px;
    background: var(--color-accent); margin: 1.5rem auto;
}

/* E: Comparison Grid */
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 3rem 0; }
.compare-card {
    background: var(--color-bg-surface); border: 1px solid var(--color-border);
    border-radius: 8px; padding: 2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    font-family: var(--font-ui);
}
.compare-card.primary { border-top: 4px solid var(--color-primary); }
.compare-card.secondary { border-top: 4px solid var(--color-text-muted); background: var(--color-bg-alt); }
.compare-card h3 {
    margin-top: 0; font-family: var(--font-ui); font-size: 1.1rem; text-transform: uppercase;
    letter-spacing: 0.05em; border-bottom: 2px solid var(--color-border); padding-bottom: 1rem; margin-bottom: 1.5rem;
}
.compare-stats { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.compare-stats li {
    display: flex; justify-content: space-between; padding: 0.75rem 0;
    border-bottom: 1px dashed var(--color-border); font-size: 0.9rem; color: var(--color-text-muted);
}
.compare-stats li strong { color: var(--color-heading); text-align: right; }
.compare-stats li:last-child { border-bottom: none; }
.compare-stats li.highlight {
    font-size: 1.05rem; border-top: 2px solid var(--color-border);
    border-bottom: none; padding-top: 1rem; margin-top: 0.5rem;
}
.compare-card.primary .compare-stats li.highlight strong { color: var(--color-primary); }

/* F: Action Steps Card */
.action-steps-card {
    background: var(--color-primary); color: #ffffff; padding: 3rem;
    border-radius: 12px; margin: 4rem 0; font-family: var(--font-ui);
    box-shadow: 0 15px 30px -10px rgba(30, 41, 59, 0.4);
}
.action-steps-card h3 {
    color: #ffffff; margin-top: 0; font-family: var(--font-heading);
    font-size: 1.8rem; margin-bottom: 2rem; text-align: center; border-bottom: none;
}
.action-steps-card ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.action-steps-card li { margin-bottom: 1.5rem; padding-left: 2.5rem; position: relative; line-height: 1.6; }
.action-steps-card li strong { color: #ffffff; font-weight: 700; }
.action-steps-card li::before {
    content: "→"; position: absolute; left: 0; top: 2px;
    color: var(--color-accent); font-weight: bold; font-size: 1.2rem;
}

/* G: Images */
.editorial-figure { margin: 3.5rem 0; position: relative; }
.editorial-figure img {
    width: 100%; height: auto; border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); display: block;
}
.editorial-figcaption {
    text-align: right; font-family: var(--font-ui); font-size: 0.85rem;
    color: var(--color-text-muted); margin-top: 0.75rem;
    border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem;
}

/* H: Author Bio */
.author-bio {
    margin-top: 5rem; padding: 2rem 2.5rem; border-radius: 12px;
    background: var(--color-bg-alt); border: 1px solid var(--color-border);
    display: flex; gap: 2rem; font-family: var(--font-ui); font-size: 0.95rem;
    color: var(--color-text-main);
}
.author-bio-img-wrapper { width: 80px; height: 80px; border-radius: 50%; background: var(--color-bg-alt); border: 1px solid var(--color-border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.author-bio-img { width: 50px; height: 50px; border-radius: 0; object-fit: contain; }
.author-bio-img.has-photo { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-bio-img.has-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.author-bio-text h4 { margin-top: 0; font-family: var(--font-ui); font-size: 1.1rem; margin-bottom: 0.5rem; border-bottom: none; color: var(--color-heading); }
.author-bio-text p { color: var(--color-text-main); }

/* --- 9. RESPONSIVE --- */
@media (max-width: 768px) {
    .editorial-content { font-size: 1rem; }
    .editorial-content h1 { font-size: 2rem; }
    .editorial-content h2 { font-size: 1.6rem; }
    .pull-quote { font-size: 1.3rem; margin: 3rem auto; }
    .tldr-box, .action-steps-card { padding: 1.5rem; }
}
@media (max-width: 650px) {
    .comparison-grid { grid-template-columns: 1fr; }
    .author-bio { flex-direction: column; align-items: center; text-align: center; }
}
