/**
 * iFireMonkey - Main CSS & Design Tokens
 * Premium, Lightweight, Modern Light Theme
 */

:root {
    --ifm-primary: #6366F1;
    --ifm-primary-hover: #4F46E5;
    --ifm-primary-light: #EEF2FF;
    --ifm-accent-violet: #7C3AED;
    --ifm-accent-violet-light: #F5F3FF;
    --ifm-flame-orange: #EA580C;
    --ifm-flame-light: #FFF7ED;

    --ifm-bg-main: #FFFFFF;
    --ifm-bg-alt: #F8FAFC;
    --ifm-bg-card: #FFFFFF;
    --ifm-border: #E2E8F0;
    --ifm-border-hover: #CBD5E1;

    --ifm-text-main: #0F172A;
    --ifm-text-secondary: #64748B;
    --ifm-text-muted: #94A3B8;

    --ifm-success: #16A34A;
    --ifm-success-light: #DCFCE7;
    --ifm-warning: #D97706;
    --ifm-warning-light: #FEF3C7;
    --ifm-danger: #DC2626;
    --ifm-danger-light: #FEE2E2;

    --ifm-radius-sm: 6px;
    --ifm-radius-md: 10px;
    --ifm-radius-lg: 16px;
    --ifm-radius-pill: 9999px;

    --ifm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --ifm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --ifm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

    --ifm-container: 1240px;
    --ifm-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: var(--ifm-font-family);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    scroll-behavior: smooth;
    background-color: var(--ifm-bg-alt);
    color: var(--ifm-text-main);
}

body {
    margin: 0;
    background-color: var(--ifm-bg-alt);
    color: var(--ifm-text-main);
    font-size: 16px;
    line-height: 1.72;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

a {
    color: var(--ifm-primary);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--ifm-primary-hover);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Fluid Typography Hierarchy with clamp() */
h1, h2, h3, h4, h5, h6 {
    color: var(--ifm-text-main);
    font-weight: 750;
    line-height: 1.25;
    margin-top: 0;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(1.85rem, 3.5vw + 0.5rem, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
}

h2 {
    font-size: clamp(1.4rem, 2.4vw + 0.5rem, 1.85rem);
    font-weight: 750;
    line-height: 1.28;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
}

h3 {
    font-size: clamp(1.15rem, 1.8vw + 0.5rem, 1.45rem);
    font-weight: 700;
    line-height: 1.32;
    margin-top: 1.6rem;
    margin-bottom: 0.65rem;
}

h4 {
    font-size: 1.125rem;
    font-weight: 650;
    line-height: 1.38;
    margin-top: 1.35rem;
    margin-bottom: 0.5rem;
}

h5 {
    font-size: 1rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ifm-text-secondary);
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
}

h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ifm-text-muted);
    margin-top: 1rem;
    margin-bottom: 0.4rem;
}

p {
    margin-top: 0;
    margin-bottom: 1.35rem;
    color: #334155;
    line-height: 1.72;
}

strong, b {
    font-weight: 700;
    color: var(--ifm-text-main);
}

hr {
    border: 0;
    height: 1px;
    background: var(--ifm-border);
    margin: 2.25rem 0;
}

/* =========================================
   COMPREHENSIVE EDITORIAL & CONTENT FORMATTING
   Root-level styling for .entry-content, .deep-content-card,
   .legal-body, and tool descriptions.
   ========================================= */
.entry-content,
.deep-content-card,
.legal-body,
.single-article-content,
.tool-guide-content {
    font-size: 16px;
    line-height: 1.78;
    color: #334155;
}

/* Links inside editorial content: clear affordance without neon noise */
.entry-content a:not(.ifm-btn-primary):not(.ifm-btn-secondary),
.deep-content-card a:not(.ifm-btn-primary):not(.ifm-btn-secondary),
.legal-body a:not(.ifm-btn-primary):not(.ifm-btn-secondary) {
    color: var(--ifm-primary-hover, #4F46E5);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(79, 70, 229, 0.35);
    text-underline-offset: 3px;
}

.entry-content a:hover:not(.ifm-btn-primary):not(.ifm-btn-secondary),
.deep-content-card a:hover:not(.ifm-btn-primary):not(.ifm-btn-secondary),
.legal-body a:hover:not(.ifm-btn-primary):not(.ifm-btn-secondary) {
    text-decoration-color: currentColor;
}

.entry-content > *:first-child,
.deep-content-card > *:first-child,
.legal-body > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child,
.deep-content-card > *:last-child,
.legal-body > *:last-child {
    margin-bottom: 0;
}

.entry-content p,
.deep-content-card p,
.legal-body p {
    margin-bottom: 1.35rem;
    line-height: 1.75;
}

/* Proper List Indentation, Hanging Markers & Spacing */
.entry-content ul,
.deep-content-card ul,
.legal-body ul,
.tool-guide-content ul {
    list-style-type: disc;
    padding-left: 1.85rem;
    margin-top: 0.6rem;
    margin-bottom: 1.5rem;
}

.entry-content ol,
.deep-content-card ol,
.legal-body ol,
.tool-guide-content ol {
    list-style-type: decimal;
    padding-left: 2rem;
    margin-top: 0.6rem;
    margin-bottom: 1.5rem;
}

.entry-content li,
.deep-content-card li,
.legal-body li,
.tool-guide-content li {
    margin-bottom: 0.65rem;
    line-height: 1.7;
    color: #334155;
    padding-left: 0.25rem;
}

.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul,
.deep-content-card ul ul,
.deep-content-card ol ol {
    margin-top: 0.45rem;
    margin-bottom: 0.45rem;
    padding-left: 1.5rem;
}

/* Blockquotes & Pull Quotes */
.entry-content blockquote,
.deep-content-card blockquote,
.legal-body blockquote {
    margin: 1.85rem 0;
    padding: 18px 24px;
    background: #F8FAFC;
    border-left: 4px solid var(--ifm-primary);
    border-radius: 0 var(--ifm-radius-md) var(--ifm-radius-md) 0;
    font-style: italic;
    color: #1E293B;
    font-size: 16px;
    line-height: 1.7;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Inline Code & Code Blocks */
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.88em;
    padding: 2px 7px;
    background: #F1F5F9;
    border: 1px solid var(--ifm-border);
    border-radius: 4px;
    color: #6D28D9;
}

pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13.5px;
    line-height: 1.65;
    background: #0F172A;
    color: #F8FAFC;
    padding: 20px 24px;
    border-radius: var(--ifm-radius-md);
    overflow-x: auto;
    margin: 1.85rem 0;
    border: 1px solid #1E293B;
}

pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Tables inside content areas */
.entry-content table,
.deep-content-card table,
.legal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0;
    font-size: 14.5px;
    border: 1px solid var(--ifm-border);
    border-radius: var(--ifm-radius-md);
    overflow: hidden;
}

.entry-content th,
.deep-content-card th,
.legal-body th {
    background: #F8FAFC;
    color: var(--ifm-text-main);
    font-weight: 700;
    text-align: left;
    padding: 12px 18px;
    border-bottom: 2px solid var(--ifm-border);
    font-size: 13.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.entry-content td,
.deep-content-card td,
.legal-body td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--ifm-border);
    color: #334155;
    line-height: 1.6;
}

.entry-content tr:last-child td,
.deep-content-card tr:last-child td,
.legal-body tr:last-child td {
    border-bottom: none;
}

.entry-content tr:nth-child(even) td,
.deep-content-card tr:nth-child(even) td {
    background: #FAFAFC;
}

/* Callout Alert Boxes */
.callout-box {
    padding: 18px 22px;
    border-radius: var(--ifm-radius-md);
    margin: 1.75rem 0;
    border: 1px solid var(--ifm-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.callout-box strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.callout-box p {
    margin-bottom: 0;
    font-size: 14.5px;
    line-height: 1.65;
}

.callout-info {
    background: #F0F9FF;
    border-color: #BAE6FD;
    color: #0369A1;
}
.callout-info strong { color: #0284C7; }
.callout-info p { color: #075985; }

.callout-warning {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #B45309;
}
.callout-warning strong { color: #D97706; }
.callout-warning p { color: #92400E; }

.callout-danger {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #B91C1C;
}
.callout-danger strong { color: #DC2626; }
.callout-danger p { color: #991B1B; }

.callout-success {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #15803D;
}
.callout-success strong { color: #16A34A; }
.callout-success p { color: #166534; }

.ifm-container {
    width: 100%;
    max-width: var(--ifm-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Breadcrumbs */
.ifm-breadcrumbs-nav {
    margin: 20px 0 24px 0;
    font-size: 13px;
    color: var(--ifm-text-muted);
}
.ifm-breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}
.ifm-breadcrumbs-list a {
    color: var(--ifm-text-secondary);
    font-weight: 500;
}
.ifm-breadcrumbs-list a:hover {
    color: var(--ifm-primary);
}
.ifm-breadcrumb-sep {
    color: #CBD5E1;
}
.ifm-breadcrumb-current {
    color: var(--ifm-text-main);
    font-weight: 600;
}


/* ==========================================================================
   CONTENT RHYTHM SYSTEM (added in 1.2.1)
   One root-level rule set that guarantees consistent vertical spacing
   between paragraphs, headings, lists, media and nested blocks inside
   every text container — so no text ever collapses into a wall.
   :where() keeps specificity at zero so component styles still win.
   ========================================================================== */
:where(.entry-content,
       .deep-content-card,
       .legal-body,
       .single-article-content,
       .faq-answer,
       .intel-evidence-box,
       .collab-excerpt,
       .timeline-excerpt,
       .result-excerpt,
       .editorial-policy-content,
       .single-disclaimer-notice,
       .disclaimer-callout-box,
       .callout-box,
       .comment-content) p:not(:last-child) {
    margin-top: 0;
    margin-bottom: 1.05em;
}

:where(.entry-content,
       .deep-content-card,
       .legal-body,
       .single-article-content,
       .faq-answer,
       .intel-evidence-box,
       .collab-excerpt,
       .timeline-excerpt,
       .result-excerpt,
       .editorial-policy-content,
       .single-disclaimer-notice,
       .disclaimer-callout-box,
       .callout-box,
       .comment-content) p:first-child {
    margin-top: 0;
}

:where(.entry-content,
       .deep-content-card,
       .legal-body,
       .single-article-content) h2:not(:first-child) {
    margin-top: 2.1em;
}

:where(.entry-content,
       .deep-content-card,
       .legal-body,
       .single-article-content) h3:not(:first-child) {
    margin-top: 1.7em;
}

:where(.entry-content,
       .deep-content-card,
       .legal-body,
       .single-article-content) ul:not(:last-child),
:where(.entry-content,
       .deep-content-card,
       .legal-body,
       .single-article-content) ol:not(:last-child) {
    margin-bottom: 1.35em;
}

/* Block images inside editorial content breathe on both sides */
:where(.entry-content,
       .deep-content-card,
       .single-article-content,
       .legal-body) img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
}

/* WordPress core alignment classes keep their float behaviour */
.entry-content img.alignleft,
.single-article-content img.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.entry-content img.alignright,
.single-article-content img.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.entry-content img.aligncenter,
.single-article-content img.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

/* Definition-style spacing between consecutive stacked blocks */
:where(.entry-content,
       .deep-content-card,
       .legal-body,
       .single-article-content) hr {
    margin: 2.25rem 0;
}

/* FAQ items keep a visible gap regardless of container */
.faq-accordion-container .faq-item + .faq-item {
    margin-top: 10px;
}

/* Long words and URLs never break card layouts */
.leak-card-summary,
.collab-excerpt,
.timeline-excerpt,
.result-excerpt,
.entry-content,
.deep-content-card,
.legal-body,
.single-article-content,
.search-result-card {
    overflow-wrap: break-word;
    word-wrap: break-word;
}
