/*
 * Article Style Sync — shared article + Gutenberg content styling
 * Version 1.0.0
 *
 * Main visual baseline:
 * Arial / 18px body / H1 48 / H2 32 / H3 24
 * Link #0969da / 12px radius / fixed-layout responsive tables
 */

/* =========================================================
   BASE / CONTENT WIDTH
   ========================================================= */

.single-post .entry-content,
.single-post .wp-block-post-content {
    width: min(1120px, calc(100% - 36px)) !important;
    max-width: 1120px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.entry-content,
.wp-block-post-content,
.editor-styles-wrapper,
.entry-content p,
.wp-block-post-content p,
.editor-styles-wrapper p,
.entry-content li,
.wp-block-post-content li,
.editor-styles-wrapper li,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3,
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.entry-content table,
.entry-content th,
.entry-content td,
.wp-block-post-content table,
.wp-block-post-content th,
.wp-block-post-content td,
.editor-styles-wrapper table,
.editor-styles-wrapper th,
.editor-styles-wrapper td {
    font-family: Arial, Helvetica, sans-serif !important;
}

.entry-content,
.wp-block-post-content,
.editor-styles-wrapper {
    color: #24292f;
    font-size: 18px !important;
    line-height: 1.7 !important;
}

/* =========================================================
   EDITORIAL DELIVERY FIELDS
   ========================================================= */

.entry-content .editorial-field,
.wp-block-post-content .editorial-field,
.editor-styles-wrapper .editorial-field {
    margin: 0 0 8px !important;
    color: #424a53 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

.entry-content .meta-description-field,
.wp-block-post-content .meta-description-field,
.editor-styles-wrapper .meta-description-field {
    margin-bottom: 14px !important;
}

/* =========================================================
   PARAGRAPH
   ========================================================= */

.entry-content p,
.wp-block-post-content p,
.editor-styles-wrapper p {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    font-size: 18px !important;
    line-height: 1.7 !important;
}

/* =========================================================
   HEADINGS
   ========================================================= */

.entry-content h1,
.wp-block-post-content h1,
.editor-styles-wrapper h1.wp-block-heading {
    margin: 0 0 20px !important;
    font-size: 48px !important;
    line-height: 1.14 !important;
    color: #1f2328 !important;
    font-weight: 700;
}

.entry-content h2,
.wp-block-post-content h2,
.editor-styles-wrapper h2.wp-block-heading {
    margin: 30px 0 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid #d8dee4 !important;
    font-size: 32px !important;
    line-height: 1.3 !important;
    color: #1f2328 !important;
    font-weight: 700;
}

.entry-content h3,
.wp-block-post-content h3,
.editor-styles-wrapper h3.wp-block-heading {
    margin: 22px 0 10px !important;
    font-size: 24px !important;
    line-height: 1.4 !important;
    color: #1f2328 !important;
    font-weight: 700;
}

/* =========================================================
   LINKS
   ========================================================= */

.entry-content a,
.wp-block-post-content a,
.editor-styles-wrapper a {
    color: #0969da !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

/* =========================================================
   LISTS
   ========================================================= */

.entry-content .wp-block-list,
.entry-content ul,
.entry-content ol,
.wp-block-post-content .wp-block-list,
.wp-block-post-content ul,
.wp-block-post-content ol,
.editor-styles-wrapper .wp-block-list,
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
    margin: 10px 0 16px !important;
    padding-left: 27px !important;
}

.entry-content li,
.wp-block-post-content li,
.editor-styles-wrapper li {
    margin: 3px 0 !important;
}

/* =========================================================
   IMAGES
   ========================================================= */

.entry-content .wp-block-image,
.wp-block-post-content .wp-block-image,
.editor-styles-wrapper .wp-block-image {
    margin: 18px 0 24px !important;
}

.entry-content .wp-block-image img,
.wp-block-post-content .wp-block-image img,
.editor-styles-wrapper .wp-block-image img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
}

/* =========================================================
   TABLES — NO HORIZONTAL SCROLL
   ========================================================= */

.entry-content .wp-block-table,
.wp-block-post-content .wp-block-table,
.editor-styles-wrapper .wp-block-table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 20px !important;
    overflow: visible !important;
}

.entry-content .wp-block-table table,
.wp-block-post-content .wp-block-table table,
.editor-styles-wrapper .wp-block-table table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 14px !important;
    line-height: 1.46 !important;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td,
.wp-block-post-content .wp-block-table th,
.wp-block-post-content .wp-block-table td,
.editor-styles-wrapper .wp-block-table th,
.editor-styles-wrapper .wp-block-table td {
    border: 1px solid #aeb9c4 !important;
    padding: 9px 6px !important;
    vertical-align: top;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-wrap: break-word !important;
    word-break: normal !important;
}

.entry-content .wp-block-table th,
.wp-block-post-content .wp-block-table th,
.editor-styles-wrapper .wp-block-table th {
    background: #c4d0dc !important;
    color: #1f2328 !important;
    font-weight: 700 !important;
}

.entry-content .wp-block-table td,
.wp-block-post-content .wp-block-table td,
.editor-styles-wrapper .wp-block-table td {
    background: #ffffff !important;
}

/* =========================================================
   INFORMATION BOX / CALLOUT
   ========================================================= */

.entry-content .information-box,
.wp-block-post-content .information-box,
.editor-styles-wrapper .information-box {
    border-radius: 12px !important;
    padding: 10px 16px !important;
    margin: 14px 0 4px !important;
}

/* Blue — Takeaway / Direct Answer */
.entry-content .takeaway,
.wp-block-post-content .takeaway,
.editor-styles-wrapper .takeaway {
    background: #e2ecfb !important;
    border-left: 4px solid #0969da !important;
}

/* Green — Decision / Expansion Rule */
.entry-content .decision,
.wp-block-post-content .decision,
.editor-styles-wrapper .decision {
    background: #dfeee4 !important;
    border-left: 4px solid #2da44e !important;
}

/* Yellow — Planning Note */
.entry-content .planning-note,
.wp-block-post-content .planning-note,
.editor-styles-wrapper .planning-note {
    background: #f5e8b3 !important;
    border-left: 4px solid #bf8700 !important;
}

/* Red — Warning */
.entry-content .warning,
.wp-block-post-content .warning,
.editor-styles-wrapper .warning {
    background: #f6dfdb !important;
    border-left: 4px solid #cf222e !important;
}

/* Workflow */
.entry-content .workflow,
.wp-block-post-content .workflow,
.editor-styles-wrapper .workflow {
    background: #e9eef3 !important;
    border-left: 4px solid #0969da !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    margin: 14px 0 4px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

/* Final conclusion */
.entry-content .final-conclusion,
.wp-block-post-content .final-conclusion,
.editor-styles-wrapper .final-conclusion {
    background: #dbe9fb !important;
    border-left: 4px solid #0969da !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    margin: 14px 0 4px !important;
}

.entry-content .information-box p,
.entry-content .workflow p,
.entry-content .final-conclusion p,
.wp-block-post-content .information-box p,
.wp-block-post-content .workflow p,
.wp-block-post-content .final-conclusion p,
.editor-styles-wrapper .information-box p,
.editor-styles-wrapper .workflow p,
.editor-styles-wrapper .final-conclusion p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Compact Callout → H2 spacing */
.entry-content .information-box + h2,
.entry-content .workflow + h2,
.entry-content .final-conclusion + h2,
.wp-block-post-content .information-box + h2,
.wp-block-post-content .workflow + h2,
.wp-block-post-content .final-conclusion + h2 {
    margin-top: 12px !important;
}

/* =========================================================
   CODE / FORMULA
   ========================================================= */

.entry-content code,
.wp-block-post-content code,
.editor-styles-wrapper code {
    font-family: "Courier New", monospace !important;
    font-size: 14px !important;
    background: #e9eef3;
    padding: 1px 4px;
    border-radius: 4px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .single-post .entry-content,
    .single-post .wp-block-post-content {
        width: min(100% - 24px, 1120px) !important;
    }

    .entry-content,
    .wp-block-post-content,
    .editor-styles-wrapper {
        font-size: 18px !important;
    }

    .entry-content h1,
    .wp-block-post-content h1,
    .editor-styles-wrapper h1.wp-block-heading {
        font-size: 38px !important;
    }

    .entry-content h2,
    .wp-block-post-content h2,
    .editor-styles-wrapper h2.wp-block-heading {
        font-size: 28px !important;
    }

    .entry-content h3,
    .wp-block-post-content h3,
    .editor-styles-wrapper h3.wp-block-heading {
        font-size: 22px !important;
    }

    .entry-content .wp-block-table table,
    .wp-block-post-content .wp-block-table table,
    .editor-styles-wrapper .wp-block-table table {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
    }

    .entry-content .wp-block-table th,
    .entry-content .wp-block-table td,
    .wp-block-post-content .wp-block-table th,
    .wp-block-post-content .wp-block-table td,
    .editor-styles-wrapper .wp-block-table th,
    .editor-styles-wrapper .wp-block-table td {
        padding: 7px 3px !important;
    }

    .entry-content .editorial-field,
    .wp-block-post-content .editorial-field,
    .editor-styles-wrapper .editorial-field {
        font-size: 15px !important;
    }
}
