/*
 * post-content.css
 * DeFi Breaking — Article Body Styles
 * Targets: .dba-content
 * All Tailwind design tokens converted to plain CSS.
 * No classes needed inside WordPress editor — just write HTML.
 */

/* ── Base wrapper ──────────────────────────────────────────────────────────── */
.dba-content {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 1.125rem;         /* text-lg = 18px */
    line-height: 1.75;           /* leading-relaxed */
    color: #2B2A27;              /* ink-800 */
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── Paragraphs ────────────────────────────────────────────────────────────── */
.dba-content p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2B2A27;
    font-size: 1.125rem;
    line-height: 1.75;
}

.dba-content p:last-child {
    margin-bottom: 0;
}

/* ── Headings ──────────────────────────────────────────────────────────────── */
.dba-content h1,
.dba-content h2,
.dba-content h3,
.dba-content h4,
.dba-content h5,
.dba-content h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    color: #1C1B19;              /* ink-900 */
    letter-spacing: -0.025em;    /* tracking-tight */
    line-height: 1.2;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E7E5E4;  /* stone-200 */
}

.dba-content h1 { font-size: 2.25rem;  }  /* text-4xl  */
.dba-content h2 { font-size: 1.75rem;  }  /* text-3xl  */
.dba-content h3 { font-size: 1.375rem; }  /* text-2xl  */
.dba-content h4 { font-size: 1.125rem; border-bottom: none; }
.dba-content h5 { font-size: 1rem;     border-bottom: none; font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; }
.dba-content h6 { font-size: 0.875rem; border-bottom: none; font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: #78716C; }

/* First heading after article start needs no extra top margin */
.dba-content > h1:first-child,
.dba-content > h2:first-child,
.dba-content > h3:first-child {
    margin-top: 0;
}

/* ── Bold & Italic ─────────────────────────────────────────────────────────── */
.dba-content strong,
.dba-content b {
    font-weight: 700;
    color: #1C1B19;
}

.dba-content em,
.dba-content i {
    font-style: italic;
}

/* ── Links ─────────────────────────────────────────────────────────────────── */
.dba-content a {
    color: #4F46E5;              /* indigoBrand */
    text-decoration: underline;
    text-decoration-color: rgba(79, 70, 229, 0.3);
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.dba-content a:hover {
    color: #0D0C1D;              /* navyBrand */
    text-decoration-color: rgba(13, 12, 29, 0.5);
}

/* ── Blockquote ────────────────────────────────────────────────────────────── */
.dba-content blockquote {
    border-left: 4px solid #4F46E5;   /* indigoBrand */
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.25rem;               /* text-xl */
    line-height: 1.6;
    color: #1C1B19;
    background: none;
}

.dba-content blockquote p {
    margin-bottom: 0;
    font-size: inherit;
    color: inherit;
}

.dba-content blockquote cite {
    display: block;
    font-size: 0.75rem;
    font-style: normal;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #78716C;               /* stone-500 */
    margin-top: 0.75rem;
}

/* ── Unordered Lists ───────────────────────────────────────────────────────── */
.dba-content ul {
    list-style: none;
    padding-left: 1.25rem;
    margin: 1.25rem 0 1.5rem;
}

.dba-content ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #44403C;               /* stone-700 */
    line-height: 1.7;
}

.dba-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #4F46E5;   /* indigoBrand */
}

.dba-content ul li strong {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Ordered Lists ─────────────────────────────────────────────────────────── */
.dba-content ol {
    list-style: none;
    padding-left: 1.25rem;
    margin: 1.25rem 0 1.5rem;
    counter-reset: dba-counter;
}

.dba-content ol li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #44403C;
    line-height: 1.7;
    counter-increment: dba-counter;
}

.dba-content ol li::before {
    content: counter(dba-counter, decimal-leading-zero) '.';
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Inter', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #4F46E5;
    line-height: 1.7;
}

/* ── Nested Lists ──────────────────────────────────────────────────────────── */
.dba-content ul ul,
.dba-content ol ol,
.dba-content ul ol,
.dba-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.dba-content ul ul li::before {
    background-color: transparent;
    border: 1.5px solid #4F46E5;
}

/* ── Inline Code ───────────────────────────────────────────────────────────── */
.dba-content code {
    font-family: 'DM Mono', 'Courier New', Courier, monospace;
    font-size: 0.875em;
    background-color: #F3F4F6;   /* stone-100 approx */
    color: #4F46E5;
    padding: 0.15em 0.45em;
    border-radius: 4px;
    border: 1px solid #E7E5E4;
}

/* ── Code Blocks ───────────────────────────────────────────────────────────── */
.dba-content pre {
    font-family: 'DM Mono', 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    background-color: #1C1B19;   /* ink-900 */
    color: #E5E7EB;
    padding: 1.25rem 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #3F3F46;
}

.dba-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: inherit;
}

/* ── Images ────────────────────────────────────────────────────────────────── */
.dba-content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    display: block;
    margin: 1.5rem auto;
    filter: contrast(1.05);
}

/* ── Figures ───────────────────────────────────────────────────────────────── */
.dba-content figure {
    margin: 2rem 0;
}

.dba-content figcaption {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #78716C;               /* stone-500 */
    text-align: center;
    margin-top: 0.5rem;
}

/* ── Horizontal Rule ───────────────────────────────────────────────────────── */
.dba-content hr {
    border: none;
    border-top: 1px solid #E7E5E4;
    margin: 2.5rem 0;
}

/* ── Tables ────────────────────────────────────────────────────────────────── */
.dba-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    display: block;
}

.dba-content thead tr {
    border-bottom: 2px solid #1C1B19;
}

.dba-content th {
    text-align: left;
    font-weight: 700;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #78716C;
    padding: 0.625rem 1rem 0.625rem 0;
}

.dba-content tbody tr {
    border-bottom: 1px solid #E7E5E4;
    transition: background-color 0.15s;
}

.dba-content tbody tr:hover {
    background-color: #FCFAF7;   /* paper-50 */
}

.dba-content td {
    padding: 0.75rem 1rem 0.75rem 0;
    color: #44403C;
    vertical-align: top;
}

.dba-content td:first-child,
.dba-content th:first-child {
    padding-left: 0;
}

/* ── Highlight / Mark ──────────────────────────────────────────────────────── */
.dba-content mark {
    background-color: rgba(79, 70, 229, 0.12);
    color: #1C1B19;
    padding: 0.1em 0.25em;
    border-radius: 2px;
}

/* ── Keyboard shortcut ─────────────────────────────────────────────────────── */
.dba-content kbd {
    font-family: 'DM Mono', monospace;
    font-size: 0.75em;
    background: #F3F4F6;
    border: 1px solid #D6D3D1;
    border-bottom-width: 2px;
    padding: 0.1em 0.4em;
    border-radius: 4px;
    color: #1C1B19;
}

/* ── Abbreviation ──────────────────────────────────────────────────────────── */
.dba-content abbr[title] {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: help;
}

/* ── WordPress caption / gallery ───────────────────────────────────────────── */
.dba-content .wp-caption {
    max-width: 100%;
    margin: 1.5rem auto;
}

.dba-content .wp-caption-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #78716C;
    text-align: center;
    margin-top: 0.5rem;
}

.dba-content .wp-block-image figcaption {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #78716C;
    text-align: center;
}

/* ── WordPress alignments ──────────────────────────────────────────────────── */
.dba-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.dba-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.dba-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.dba-content .alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
    max-width: calc(100% + 4rem);
}

/* ── Source attribution (added by plugin) ──────────────────────────────────── */
.dba-content .dba-source {
    font-family: 'Inter', sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #A8A29E;               /* stone-400 */
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E7E5E4;
}

.dba-content .dba-source a {
    color: #A8A29E;
    text-decoration: none;
}

.dba-content .dba-source a:hover {
    color: #4F46E5;
}

/* ── Responsive tweaks ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .dba-content {
        font-size: 1rem;
    }
    .dba-content h2 { font-size: 1.5rem;  }
    .dba-content h3 { font-size: 1.25rem; }
    .dba-content blockquote {
        font-size: 1.125rem;
        padding-left: 1rem;
    }
    .dba-content .alignleft,
    .dba-content .alignright {
        float: none;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .dba-content .alignwide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}