/* ═══════════════════════════════════════════════════════════════
   Devisofts · case-study pages (loaded only where seo.php sets 'css')
   Builds on the tokens and components in style.css.
   ═══════════════════════════════════════════════════════════════ */

/* ---------- Breadcrumb ---------- */
.cs-crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.85rem; color: var(--text-faint); margin-bottom: 1.5rem; }
.cs-crumbs a { color: var(--text-dim); text-decoration: none; }
.cs-crumbs a:hover { color: var(--text-primary); }
.cs-crumbs [aria-current] { color: var(--text-primary); }

/* ---------- Byline / meta row ---------- */
.cs-byline { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-top: 2rem; font-size: 0.88rem; color: var(--text-dim); }
.cs-byline span { display: inline-flex; align-items: center; gap: 8px; }
.cs-byline i, .cs-byline svg { width: 15px; height: 15px; color: var(--accent-primary); }
.cs-byline strong { color: var(--text-primary); font-weight: 600; }

/* ---------- TL;DR ---------- */
.cs-tldr { margin-top: 2rem; max-width: 760px; padding: 1.25rem 1.5rem; border-left: 3px solid var(--accent-secondary); background: rgba(225, 29, 140, 0.06); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-primary); line-height: 1.65; }
.cs-tldr b { color: var(--accent-secondary); font-family: var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; display: block; margin-bottom: 0.35rem; }

/* ---------- Screenshot figures (also open in the site lightbox) ---------- */
.shot { margin: 0; padding: 0; min-height: 0; height: 100%; cursor: zoom-in; display: flex; flex-direction: column; }
.shot .shot-media { position: relative; overflow: hidden; border-bottom: 1px solid var(--glass-border); background: #0b0716; aspect-ratio: 1366 / 768; }
.case-tile.shot .case-media { position: static; width: 100%; height: 100%; object-fit: cover; object-position: top left; transform: none; }
.case-tile.shot:hover .case-media { transform: scale(1.025); }
.shot figcaption { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.shot figcaption .case-tag { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-tertiary); }
.shot figcaption h3 { font-size: 1.15rem; color: #fff; }
.shot figcaption p { font-size: 0.92rem; line-height: 1.6; color: var(--text-dim); }
.case-tile.shot::after { content: 'Zoom'; }
.cs-hero-shot { margin-top: 3rem; }
.cs-hero-shot .shot-media { border-radius: 0; }

.cs-note { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--text-faint); margin-top: 1.25rem; }
.cs-note i, .cs-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent-mint); }

/* ---------- Key facts ---------- */
.cs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; margin: 0; }
.cs-facts > div { padding: 1.1rem 0; border-bottom: 1px solid var(--glass-border); padding-right: 1.5rem; }
.cs-facts dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 0.35rem; }
.cs-facts dd { margin: 0; color: var(--text-primary); line-height: 1.5; }

/* ---------- Big numbers ---------- */
.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; }
.cs-stats .stat .n { font-size: clamp(2rem, 4vw, 2.75rem); }

/* ---------- Prose ---------- */
.cs-prose p { line-height: 1.75; color: var(--text-dim); }
.cs-prose p + p { margin-top: 1rem; }
.cs-prose strong { color: var(--text-primary); }

/* ---------- Tests table ---------- */
.cs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cs-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.95rem; }
.cs-table caption { text-align: left; color: var(--text-faint); font-size: 0.85rem; padding-bottom: 1rem; }
.cs-table th, .cs-table td { text-align: left; vertical-align: top; padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--glass-border); }
.cs-table thead th { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.cs-table tbody th { color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.cs-table td { color: var(--text-dim); line-height: 1.6; }
.cs-table .code { font-family: var(--font-display); color: var(--accent-primary); white-space: nowrap; }

/* ---------- Outcome pills ---------- */
.cs-outcomes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.cs-outcome { padding: 1rem 1.25rem; border-radius: var(--r-sm); border: 1px solid var(--glass-border); background: var(--glass-bg); }
.cs-outcome b { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); }
.cs-outcome b::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cs-outcome p { margin-top: 0.4rem; font-size: 0.9rem; line-height: 1.55; color: var(--text-dim); }
.cs-outcome.ok b      { color: var(--accent-mint); }
.cs-outcome.bad b     { color: #f87171; }
.cs-outcome.warn b    { color: var(--accent-amber); }
.cs-outcome.sub b     { color: var(--accent-secondary); }
.cs-outcome.pending b { color: var(--accent-tertiary); }
.cs-formula { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: var(--r-sm); background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.25); font-family: var(--font-display); color: var(--text-primary); line-height: 1.6; }

/* ---------- Stack chips ---------- */
.cs-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.cs-chips span { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass-bg); font-size: 0.85rem; color: var(--text-primary); }

/* ---------- Check list ---------- */
.cs-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.75rem; }
.cs-list li { display: grid; grid-template-columns: 22px 1fr; gap: 0.6rem; line-height: 1.6; color: var(--text-dim); }
.cs-list li i, .cs-list li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--accent-mint); }
.cs-list strong { color: var(--text-primary); }

/* ---------- Author / sources box ---------- */
.cs-about-box { display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; align-items: start; }
.cs-about-box .icon-chip { width: 56px; height: 56px; }
.cs-about-box p { font-size: 0.92rem; line-height: 1.7; color: var(--text-dim); }
.cs-about-box p + p { margin-top: 0.6rem; }

/* ---------- Product pages (ERP & POS): wide screenshots, module sections, "new" badge ---------- */
.shot--wide .shot-media { aspect-ratio: 1366 / 644; }
.cs-module { padding-block: clamp(3rem, 6vw, 5rem); }
.cs-module .section-head { margin-bottom: 2rem; }
.cs-new { display: inline-flex; align-items: center; gap: 6px; margin-left: 0.6rem; padding: 3px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: middle; background: rgba(6, 182, 212, 0.16); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.32); }
.cs-new i, .cs-new svg { width: 11px; height: 11px; }
.cs-list--2col { column-gap: 2.5rem; }
@media (min-width: 900px) { .cs-list--2col { grid-template-columns: 1fr 1fr; } }
.cs-feature h3 { margin-top: 1rem; font-size: 1.15rem; }
.cs-feature p { margin-top: 0.5rem; font-size: 0.92rem; line-height: 1.6; }
.cs-feature > i, .cs-feature > svg { width: 28px; height: 28px; }
.cs-mod-card h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }

@media (max-width: 760px) {
    .cs-about-box { grid-template-columns: 1fr; }
    .shot figcaption { padding: 1rem 1.15rem 1.25rem; }
}
