/*
 * Inniti Knowledge Center — shared "ikc-*" article design system.
 * Used by every knowledge-center/{category}/{slug}.php guide. Uses the site's
 * existing global theme (style.css) + Bootstrap grid; this file only adds the
 * long-form-article layer on top (hero banners, TOC, callout boxes, tables,
 * flow diagrams, FAQ width, related-guide cards, etc).
 *
 * Two co-existing patterns live here on purpose — pick whichever fits a given
 * guide, they are not meant to be mixed on the same page:
 *   - "Boxed" pattern   (.ikc-wrap, .ikc-toc, .ikc-quick-answer/.ikc-insight/
 *                        .ikc-framework/.ikc-cta, .ikc-flow)         — used by
 *                        diesel-consumption-vs-equipment-utilization.php
 *   - "Sidebar" pattern (.ikc-wrap-wide, .ikc-hero-banner, .ikc-layout +
 *                        .ikc-toc-side, .ikc-erp-flow, .ikc-type-grid,
 *                        .ikc-kpi, .ikc-action-steps, .ikc-cta-bar) — used by
 *                        equipment-idle-time-in-construction.php
 * Shared by both: page/typography base, blockquote fix, .ikc-formula,
 * .ikc-table(-wrap), .faq-accordion width, .ikc-related(-card).
 *
 * Per-page background photos (e.g. the hero banner image) are NOT set here —
 * this file only defines the gradient overlay; each page adds its own photo
 * via a full inline style="background-image:linear-gradient(...),url(...)"
 * on the .ikc-hero-banner element (see the rule below for why — a CSS custom
 * property will NOT work for this), so this file stays image-agnostic.
 */

/* ---------- Base / typography ---------- */
.ikc-page { background: #fff; }
.ikc-page article h2 { margin-top: 46px; margin-bottom: 16px; font-size: 30px; line-height: 1.3; }
.ikc-page article h3 { margin-top: 30px; margin-bottom: 12px; font-size: 23px; line-height: 1.35; }
.ikc-page article p,
.ikc-page article li { font-size: 17px; line-height: 1.8; color: #444b54; }
.ikc-page article ul { padding-left: 22px; }
.ikc-page article a { text-decoration: underline; text-underline-offset: 3px; }

/* The sitewide blockquote rule reserves a 60px gutter for its own decorative
   quote-mark icon (:before/:after), which collides with plain editorial quotes. */
.ikc-page article blockquote {
    margin: 20px 0; padding: 16px 22px !important; border: 1px solid #dde3ea !important;
    border-left: 4px solid var(--theme-color) !important; border-radius: 8px;
    background: #f6f8fb !important; font-size: 18px; color: #101828;
    box-sizing: border-box; max-width: 100%; overflow-wrap: break-word; word-wrap: break-word;
}
.ikc-page article blockquote:before,
.ikc-page article blockquote:after { content: none !important; }
.ikc-page article blockquote p { margin: 0 !important; }
.ikc-page article blockquote strong { font-size: inherit; }

/* ---------- Formula box ---------- */
.ikc-formula {
    margin: 18px 0;
    padding: 16px 20px;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    background: #f6f8fb;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

/* ---------- Data table ---------- */
.ikc-table-wrap { overflow-x: auto; margin: 22px 0 30px; border: 1px solid #e1e5ea; border-radius: 10px; }
.ikc-table { width: 100%; min-width: 680px; border-collapse: collapse; margin: 0; }
.ikc-table th, .ikc-table td { padding: 13px 15px; border-bottom: 1px solid #e8ebef; vertical-align: top; text-align: left; font-size: 15px; }
.ikc-table th { background: #f6f8fa; font-weight: 700; }
.ikc-table tr:last-child td { border-bottom: 0; }
/* Modifier for short numeric comparison tables (e.g. Machine A vs Machine B) */
.ikc-table--metrics { min-width: 480px; }
.ikc-table--metrics td:not(:first-child), .ikc-table--metrics th:not(:first-child) { text-align: right; }

/* ---------- FAQ accordion (reuses the sitewide .faq-accordion component) ---------- */
.ikc-page .faq-accordion { max-width: 100%; margin: 20px 0 0; }

/* ---------- Related-guide cards (shared by every article) ---------- */
.ikc-related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.ikc-related-card {
    display: flex; flex-direction: column; gap: 10px; padding: 20px;
    border: 1px solid #e1e5ea; border-radius: 12px; background: #fff;
    text-decoration: none; color: inherit;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
a.ikc-related-card:hover { box-shadow: 0 10px 24px rgba(16, 24, 40, .09); border-color: #c7d6ea; transform: translateY(-2px); }
div.ikc-related-card { border-style: dashed; }
.ikc-related-card .tag {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px;
}
.ikc-related-card .tag-guide { background: #eef4ff; color: var(--theme-color); }
.ikc-related-card .tag-product { background: #eafaf0; color: #1a9f5c; }
.ikc-related-card .tag-soon { background: #f3f4f6; color: #8a93a3; }
.ikc-related-card strong { display: block; font-size: 15px; color: #101828; }
.ikc-related-card .desc { font-size: 13px !important; color: #6b7280 !important; line-height: 1.5 !important; }
.ikc-related-card .go { margin-top: auto; padding-top: 4px; font-size: 13px; font-weight: 700; color: var(--theme-color); display: flex; align-items: center; gap: 6px; }
.ikc-related-card .go i { font-size: 11px; transition: transform .15s ease; }
a.ikc-related-card:hover .go i { transform: translateX(3px); }

/* ================================================================
   "Boxed" pattern — single-column article, boxed inline TOC,
   quick-answer / insight / framework / CTA callout boxes.
   ================================================================ */
.ikc-wrap { max-width: 960px; margin: 0 auto; }
.ikc-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.ikc-lead {
    font-size: 19px;
    line-height: 1.75;
    color: #3f4650;
}
.ikc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 14px;
    color: #6b7280;
    margin-top: 15px;
}
.ikc-hero-img {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 26px auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.ikc-inline-img {
    display: block;
    width: 100%;
    height: auto;
    margin: 10px auto 0;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.ikc-inline-img.ikc-inline-img-narrow { max-width: 480px; }
.ikc-img-figure { margin: 28px 0; text-align: center; }
.ikc-img-figure figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}
.ikc-quick-answer,
.ikc-insight,
.ikc-framework,
.ikc-cta {
    border-radius: 12px;
    padding: 24px;
    margin: 28px 0;
}
.ikc-quick-answer { background: #f6f8fb; border-left: 4px solid #1e5aa8; }
.ikc-insight { background: #fbfaf7; border: 1px solid #e8e2d6; }
.ikc-framework { background: #f8fafc; border: 1px solid #e5e7eb; }
.ikc-cta { background: #f5f7fa; border: 1px solid #e2e7ee; }
.ikc-quick-answer h2,
.ikc-insight h3,
.ikc-framework h3,
.ikc-cta h3 { margin-top: 0; }

/* Insight/note callouts (Important Context, Practical Note, Inniti Insight, etc.)
   read as asides, not body copy — keep them visibly smaller than surrounding text. */
.ikc-insight h3 {
    font-size: 13px !important; margin: 0 0 8px !important;
    text-transform: uppercase; letter-spacing: .04em; color: #8a7b63;
}
.ikc-insight p, .ikc-insight li { font-size: 14px !important; line-height: 1.6 !important; color: #6b7280 !important; }

.ikc-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 20px 0 8px;
}
.ikc-flow span {
    border: 1px solid #d9e0e8;
    border-radius: 999px;
    padding: 9px 14px;
    background: #fff;
    font-weight: 700;
    font-size: 14px;
}
.ikc-flow b { color: #7b8794; }

.ikc-toc {
    border: 1px solid #e2e6eb;
    border-radius: 12px;
    padding: 22px 24px;
    margin: 28px 0 36px;
}
.ikc-toc h2 { font-size: 20px !important; margin: 0 0 12px !important; }
.ikc-toc ol { margin: 0; padding-left: 22px; }
.ikc-toc li { margin: 5px 0; font-size: 15px !important; line-height: 1.55 !important; }

.ikc-faq { border-top: 1px solid #e6e9ed; padding: 18px 0; }
.ikc-faq h3 { margin: 0 0 8px !important; font-size: 19px !important; }

.ikc-sources { font-size: 12px; color: #5f6670; }
.ikc-sources li { font-size: 12px !important; line-height: 1.6 !important; margin-bottom: 8px; }

/* ================================================================
   "Sidebar" pattern — hero banner, sticky sidebar TOC, icon-flow
   diagrams, type grid, KPI list, action steps, CTA bar.
   ================================================================ */
.ikc-wrap-wide { max-width: 1120px; margin: 0 auto; }

.ikc-hero-banner {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    padding: 44px 40px;
    margin-bottom: 34px;
    border: 1px solid #e5e7eb;
    background-color: #f7f9fc;
    /* Gradient overlay only — each page adds its own photo via an inline
       style="background-image:..." on the element (see note below). A url()
       inside a custom property resolves relative to the stylesheet the var()
       is used in (this file), not the page, so --ikc-hero-img would 404 for
       every page's photo; a full inline override sidesteps that entirely. */
    background-image: linear-gradient(100deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.93) 40%, rgba(10,20,40,.28) 62%, rgba(10,20,40,.1) 100%);
    background-size: cover;
    background-position: center;
}
.ikc-hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--theme-color);
    margin-bottom: 10px;
}
.ikc-hero-banner h1 {
    font-size: 40px;
    line-height: 1.15;
    margin: 0 0 14px;
    max-width: 660px;
    color: #101828;
}
.ikc-hero-banner h1 span { color: var(--theme-color); }
.ikc-hero-banner p {
    max-width: 580px;
    font-size: 17px;
    color: #3f4650;
    margin: 0 0 26px;
}
/* Kept within the paragraph's max-width so tags never drift into the
   photo-only (unshielded) right side of the banner, and each tag carries
   its own solid pill background so it stays legible over the photo either way. */
.ikc-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 580px;
}
.ikc-hero-tag {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
    font-size: 13px;
    font-weight: 600;
    color: #20304a;
    line-height: 1.3;
    white-space: nowrap;
}
.ikc-hero-tag i {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef4ff;
    display: grid;
    place-items: center;
    color: var(--theme-color);
    font-size: 13px;
}

.ikc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
.ikc-toc-side {
    position: sticky;
    top: 110px;
    align-self: start;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    border: 1px solid #e2e6eb;
    border-radius: 12px;
    padding: 20px;
}
.ikc-toc-side strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #7b8794; margin-bottom: 10px; }
.ikc-toc-side a {
    display: block; color: #3f4650; text-decoration: none; font-size: 14px;
    padding: 7px 0 7px 10px; margin-left: -11px; border-left: 2px solid transparent;
    border-bottom: 1px solid #f0f2f5; transition: color .15s, border-color .15s;
}
.ikc-toc-side a:last-child { border-bottom: 0; }
.ikc-toc-side a:hover { color: var(--theme-color); }
.ikc-toc-side a.active { color: var(--theme-color); font-weight: 700; border-left-color: var(--theme-color); }
.ikc-toc-cta { margin-top: 18px; padding-top: 18px; border-top: 1px solid #f0f2f5; }
.ikc-toc-cta-box { background: var(--theme-color); color: #fff; border-radius: 10px; padding: 16px; text-align: center; }
.ikc-toc-cta-box strong { display: block; font-size: 14px; margin-bottom: 4px; color: #fff !important; }
.ikc-toc-cta-box p { font-size: 12px; opacity: .85; margin: 0 0 12px; line-height: 1.4; color: #fff !important; }
.ikc-toc-cta-box a.btn {
    display: inline-block; background: #fff; color: var(--theme-color); font-weight: 700;
    font-size: 13px; padding: 8px 16px; border-radius: 6px; text-decoration: none;
}

/* Infographic figures (real designed assets) */
.ikc-figure { margin: 20px 0; text-align: center; }
.ikc-figure img { width: 100%; height: auto; max-width: 640px; border-radius: 14px; border: 1px solid #e2e6eb; }
.ikc-figure figcaption { margin-top: 10px; font-size: 13px; color: #7b8794; }
.ikc-figure.ikc-figure-wide img { max-width: 780px; }

/* Type / category cards */
.ikc-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.ikc-type-card { border: 1px solid #e2e6eb; border-radius: 12px; padding: 16px; background: #fff; }
.ikc-type-card b { display: block; font-size: 14px; color: var(--theme-color); margin-bottom: 6px; }
.ikc-type-card p { margin: 0; font-size: 13px !important; line-height: 1.55 !important; color: #6b7280 !important; }

/* Icon-node relationship flow */
.ikc-erp-flow { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 6px; margin: 24px 0 8px; }
.ikc-erp-flow .node {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    width: 108px; text-align: center; font-size: 12px; font-weight: 700; color: #20304a;
}
.ikc-erp-flow .node i {
    width: 44px; height: 44px; border-radius: 50%; background: #eef4ff; color: var(--theme-color);
    display: grid; place-items: center; font-size: 16px;
}
.ikc-erp-flow .arrow {
    display: flex; align-items: center; justify-content: center;
    height: 44px; color: #64748b; font-size: 15px;
}

/* KPI list */
.ikc-kpi { border-top: 1px solid #edf0f3; padding: 18px 0; }
.ikc-kpi:first-of-type { border-top: 0; }
.ikc-kpi b { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--theme-color); margin-bottom: 4px; }

/* Data -> action steps */
.ikc-action-steps { border: 1px solid #e2e6eb; border-radius: 12px; padding: 20px 22px; margin: 20px 0; background: #fbfbfc; }
.ikc-action-steps p { margin: 0 0 8px !important; font-size: 15px !important; }
.ikc-action-steps p:last-child { margin-bottom: 0 !important; }
.ikc-action-steps b { color: var(--theme-color); }

/* Bottom CTA bar */
.ikc-cta-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: #eef4ff; border: 1px solid #dbe8ff; border-radius: 14px; padding: 24px 28px; margin: 40px 0 10px;
}
.ikc-cta-bar .txt { font-size: 15px; color: #20304a; }
.ikc-cta-bar .txt strong { display: block; font-size: 17px; color: #101828; margin-bottom: 4px; }
.ikc-cta-bar a.btn {
    display: inline-block; background: var(--theme-color); color: #fff; text-decoration: none;
    padding: 12px 22px; border-radius: 8px; font-weight: 700; white-space: nowrap;
}

/* ================================================================
   Opt-in embellishments — icon-badge headings, stat highlight row,
   fine-print editorial note. Additive only; existing pages that don't
   use these classes are unaffected.
   ================================================================ */
.ikc-h2-icon {
    display: inline-grid; place-items: center; width: 34px; height: 34px;
    border-radius: 50%; background: #eef4ff; color: var(--theme-color);
    font-size: 15px; margin-right: 10px; vertical-align: middle;
}

.ikc-stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0; }
.ikc-stat-card {
    flex: 1 1 160px; text-align: center; padding: 18px 14px;
    border-radius: 12px; background: #f6f8fb; border: 1px solid #e1e5ea;
}
.ikc-stat-card .num { display: block; font-size: 28px; font-weight: 800; color: var(--theme-color); line-height: 1.1; }
.ikc-stat-card .lbl { display: block; margin-top: 6px; font-size: 12.5px; color: #6b7280; font-weight: 600; }
.ikc-stat-card--accent { background: var(--theme-color); border-color: var(--theme-color); }
.ikc-stat-card--accent .num, .ikc-stat-card--accent .lbl { color: #fff; }

.ikc-fineprint {
    font-size: 9px; line-height: 1.7; color: #8b93a0;
    margin: 36px 0 10px;
    padding: 18px 22px;
    border: 1px solid #e2e6eb;
    border-radius: 10px;
    background: #f9fafb;
}
.ikc-fineprint strong { color: #6b7280; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .ikc-layout { grid-template-columns: 1fr; }
    .ikc-toc-side { position: relative; top: auto; max-height: none; }
    .ikc-type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .ikc-page article h2 { font-size: 25px; }
    .ikc-page article h3 { font-size: 21px; }
    .ikc-page article p,
    .ikc-page article li { font-size: 16px; }
    .ikc-lead { font-size: 17px; }
    .ikc-quick-answer,
    .ikc-insight,
    .ikc-framework,
    .ikc-cta { padding: 20px; }
    .ikc-hero-banner h1 { font-size: 28px; }
    .ikc-type-grid { grid-template-columns: 1fr; }
    .ikc-erp-flow .arrow { display: none; }
    .ikc-related { grid-template-columns: 1fr; }
    .ikc-stat-card .num { font-size: 22px; }
}
