/* ============================================================
   BioProcess Tools — Global Stylesheet
   Version: 2.0 (V5 Design System)
   Last updated: 2026-03-28

   Design tokens, typography, navigation, cards, forms,
   blog article styles, and responsive breakpoints.

   All pages link to this file — change once, update everywhere.
   ============================================================ */


/* ============================================================
   1. CSS VARIABLES / COLOUR TOKENS
   ============================================================ */
:root {
    /* ---- V5 Navy palette ---- */
    --color-navy:        #04152e;
    --color-navy-68:     rgba(4, 21, 46, 0.68);
    --color-navy-trans:  rgba(4, 21, 46, 0);
    --color-sky-blue:    #6ECFF6;
    --color-mid-blue:    #28A9E1;
    --color-dark-teal:   #095280;
    --color-purple:      #672675;
    --color-text:        #FFFFFF;
    --color-text-muted:  rgba(255, 255, 255, 0.70);
    --color-accent-light:#D4EFFD;
    --color-label-blue:  #1197D5;
    --color-border:      #095280;

    /* ---- BioProcess accent spectrum ---- */
    --teal:       #4ecdc4;
    --blue:       #82aaff;
    --purple-bp:  #c792ea;
    --coral:      #ff6b6b;
    --gold:       #ffd93d;
    --green:      #22c55e;

    /* ---- Gradients ---- */
    --grad-hero:        linear-gradient(135deg, #4ecdc4 0%, #82aaff 50%, #c792ea 100%);
    --grad-teal-blue:   linear-gradient(135deg, #4ecdc4, #82aaff);
    --grad-blue-purple: linear-gradient(135deg, #82aaff, #c792ea);
    --grad-coral-gold:  linear-gradient(135deg, #ff6b6b, #ffd93d);
    --grad-shimmer:     linear-gradient(100deg, #28A9E1 0%, rgba(255, 255, 255, 0.8) 49%, #28A9E1 100%);

    /* ---- Legacy aliases (tool pages still reference these) ---- */
    --bg:               #04152e;
    --bg-card:          #0f1d32;
    --bg-card-hover:    #152a45;
    --bg-input:         #0d1a2f;
    --border:           #1a3355;
    --border-alt:       #152a45;
    --border-focus:     #4ecdc4;
    --border-hover:     rgba(78, 205, 196, 0.35);
    --text:             #d0d8e8;
    --text-dim:         #8494ad;
    --text-muted:       #3a4a64;
    --heading:          #f0f4fa;
    --accent:           #4ecdc4;
    --accent-soft:      rgba(78, 205, 196, 0.08);
    --accent-glow:      rgba(78, 205, 196, 0.12);
    --accent-glow-strong: rgba(78, 205, 196, 0.15);
    --amber:            #ffd93d;
    --purple:           #c792ea;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Global link color - prevents default blue on dark background */
a {
    color: var(--accent);
}

a:visited {
    color: var(--accent);
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

/* --- Heading family: Instrument Serif --- */
h1, .h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    letter-spacing: 1px;
}

h2, .h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.8px;
}

h3, .h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.6px;
}

h4, .h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
}

/* Gradient shimmer text effect (V5) */
.gradient-heading b,
.gradient-heading strong {
    background: var(--grad-shimmer);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 400;
    font-style: normal;
}

/* Mono helpers */
.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* ============================================================
   4. NAVIGATION
   ============================================================ */

/* --- Sticky header bar --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(4, 21, 46, 0.88);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--border);
}

/* Optional fade shadow beneath nav (V5 header::after pattern) */
.nav::after {
    content: "";
    position: absolute;
    inset: 0 0 -40px 0;
    background: linear-gradient(180deg, var(--bg) 0%, var(--color-navy-68) 41%, var(--color-navy-trans) 100%);
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* --- Brand --- */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--accent);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 1px;
}

.nav-brand svg {
    width: 26px;
    height: 26px;
}

/* V5 brand variants */
.nav-brand-bp {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    background: var(--grad-shimmer);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.nav-brand-name {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 19px;
    letter-spacing: 1.2px;
    color: var(--color-text);
}

/* --- Back link (tool pages) --- */
.nav-back {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-back:hover {
    color: var(--accent);
}

/* --- Nav links row --- */
.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Nav CTA button */
.nav-cta {
    padding: 7px 16px;
    background: var(--accent);
    color: var(--bg) !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s;
}

.nav-cta:hover {
    background: #3dbdb5;
    transform: translateY(-1px);
}

/* --- Nav item with dropdown (V5 mega menu) --- */
.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > .nav-trigger {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.nav-item > a:hover,
.nav-item > .nav-trigger:hover,
.nav-item:hover > .nav-trigger {
    color: var(--color-text);
}

/* Active indicator bar */
.nav-item.active > a,
.nav-item.active > .nav-trigger {
    color: var(--color-sky-blue);
}

.nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background: linear-gradient(100deg, #6ECFF6 0%, rgba(125, 191, 237, 0) 100%);
}

/* Chevron rotation */
.nav-chevron {
    width: 10px;
    height: 10px;
    transition: transform 0.2s;
}

.nav-item:hover .nav-chevron {
    transform: rotate(180deg);
}

/* --- Mega dropdown panel --- */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(4, 21, 46, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(9, 82, 128, 0.3);
    border-radius: 16px;
    padding: 24px;
    min-width: 520px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 200;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Arrow pointer */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(4, 21, 46, 0.95);
    border-top: 1px solid rgba(9, 82, 128, 0.3);
    border-left: 1px solid rgba(9, 82, 128, 0.3);
}

/* Dropdown items */
.nav-drop-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s;
}

.nav-drop-item:hover {
    background: rgba(9, 82, 128, 0.2);
}

.nav-drop-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.nav-drop-label {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 14px;
    letter-spacing: 0.8px;
    font-weight: 400;
    margin-bottom: 2px;
}

.nav-drop-desc {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Category color dots in dropdown */
.cat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* Full-width row at bottom of dropdown */
.nav-drop-full {
    grid-column: span 2;
    border-top: 1px solid rgba(9, 82, 128, 0.2);
    margin-top: 4px;
    padding-top: 12px;
}

.nav-drop-full a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-sky-blue);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}

.nav-drop-full a:hover {
    background: rgba(9, 82, 128, 0.15);
}


/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--color-navy);
}

.btn-primary:hover {
    background: #3dbdb5;
    transform: translateY(-1px);
}

/* V5 gradient primary */
.btn-primary.grad {
    background: var(--grad-teal-blue);
    color: var(--color-navy);
    box-shadow: 0 4px 24px rgba(78, 205, 196, 0.2);
}

.btn-primary.grad:hover {
    box-shadow: 0 8px 36px rgba(78, 205, 196, 0.35);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-glow);
}

/* V5 outline variant */
.btn-outline.v5 {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-outline.v5:hover {
    border-color: var(--color-sky-blue);
    color: var(--color-sky-blue);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Row of buttons */
.btn-row {
    display: flex;
    gap: 16px;
}

/* Copy button */
.copy-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
    transition: all 0.15s;
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.copy-btn.copied {
    border-color: var(--green);
    color: var(--green);
}


/* ============================================================
   6. TOOL CARDS
   ============================================================ */
.tool-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.25s;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Top-edge gradient accent */
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-gradient, var(--grad-teal-blue));
    opacity: 0.5;
    transition: opacity 0.25s;
}

.tool-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
}

.tool-card:hover::before {
    opacity: 1;
}

/* Status badge */
.tool-card-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--green);
    margin-bottom: 14px;
}

.tool-card-status::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--green);
    border-radius: 50%;
}

/* Absolute-positioned status (legacy) */
.tool-card-status.abs {
    position: absolute;
    top: 16px;
    right: 16px;
    margin-bottom: 0;
}

.status-live {
    color: var(--accent);
}

.status-soon {
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(58, 74, 100, 0.3);
}

.tool-card.coming-soon {
    opacity: 0.55;
    pointer-events: none;
}

/* Icon container */
.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    background: var(--accent-soft);
}

/* Card title */
.tool-card h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: var(--heading);
    margin-bottom: 8px;
}

/* Card description */
.tool-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 16px;
}

/* Tag pills */
.tool-tags,
.tool-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tool-tag {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid;
}

.tag-teal,
.tool-tag {
    color: var(--teal);
    border-color: rgba(78, 205, 196, 0.2);
    background: rgba(78, 205, 196, 0.06);
}

.tag-gold,
.tool-tag.amber {
    color: var(--gold);
    border-color: rgba(255, 217, 61, 0.2);
    background: rgba(255, 217, 61, 0.06);
}

.tag-coral,
.tool-tag.coral {
    color: var(--coral);
    border-color: rgba(255, 107, 107, 0.2);
    background: rgba(255, 107, 107, 0.06);
}

.tag-purple,
.tool-tag.purple {
    color: var(--purple-bp);
    border-color: rgba(199, 146, 234, 0.2);
    background: rgba(199, 146, 234, 0.06);
}

.tag-green,
.tool-tag.green {
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.06);
}

.tool-tag.blue {
    color: var(--blue);
    background: rgba(130, 170, 255, 0.06);
    border-color: rgba(130, 170, 255, 0.12);
}


/* ============================================================
   7. CARD OVERLAY VARIANTS (V5)
   ============================================================ */
.card-overlay {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    padding: 36px;
    border: 1px solid rgba(9, 82, 128, 0.3);
    text-decoration: none;
    color: var(--color-text);
    display: block;
    transition: all 0.3s;
}

.card-overlay:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
}

.card-overlay > * {
    position: relative;
    z-index: 1;
}

.card-overlay-blue::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 200px 0 0;
    background: linear-gradient(90deg, #095280 0%, rgba(9, 82, 128, 0.40) 100%);
    z-index: 0;
}

.card-overlay-purple::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 200px 0 0;
    background: linear-gradient(90deg, #672675 0%, rgba(103, 38, 117, 0.39) 100%);
    z-index: 0;
}

.card-overlay-lightblue::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 200px 0 0;
    background: linear-gradient(91deg, #28A9E1 0%, rgba(40, 169, 225, 0.24) 100%);
    z-index: 0;
}

.card-overlay h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.card-overlay p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.card-overlay .card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    color: var(--color-sky-blue);
}

.overlay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}


/* ============================================================
   8. CALCULATOR / TOOL PAGE
   ============================================================ */

/* --- Calc page layout --- */
.calc-section {
    padding: 60px 40px;
}

.calc-inner {
    max-width: 900px;
    margin: 0 auto;
}

.calc-header {
    margin-bottom: 32px;
}

.calc-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    margin-bottom: 20px;
}

.calc-header .back-link:hover {
    color: var(--color-sky-blue);
}

.calc-header h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 36px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--heading);
    margin-bottom: 8px;
}

.calc-header .subtitle {
    font-size: 15px;
    color: var(--color-text-muted);
}

/* --- Calc card (input/output panels) --- */
.calc-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 20px;
}

.calc-card h2 {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--heading);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.calc-card h2 .num {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(9, 82, 128, 0.3);
    border: 1px solid rgba(9, 82, 128, 0.5);
    color: var(--color-sky-blue);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* --- Form inputs --- */
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select {
    cursor: pointer;
    appearance: none;
    font-family: 'DM Sans', sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7a94' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.form-group {
    margin-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* V5 calc-page form styling (larger inputs) */
.calc-card .form-input,
.calc-card .form-select {
    padding: 12px 16px;
    background: rgba(9, 82, 128, 0.2);
    border: 1px solid rgba(9, 82, 128, 0.4);
    border-radius: 10px;
    font-size: 14px;
}

.calc-card .form-input {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

.calc-card .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236ECFF6' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-position: right 14px center;
}

.calc-card .form-input:focus,
.calc-card .form-select:focus {
    border-color: var(--color-sky-blue);
    box-shadow: 0 0 0 3px rgba(110, 207, 246, 0.1);
}

.calc-card .form-group label {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.calc-card .form-row {
    gap: 16px;
    margin-bottom: 16px;
}

/* --- Result cards --- */
.result-hero {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.result-card {
    background: rgba(9, 82, 128, 0.12);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(9, 82, 128, 0.3);
}

.result-card.primary {
    border-color: rgba(110, 207, 246, 0.25);
    background: linear-gradient(160deg, rgba(9, 82, 128, 0.25), rgba(40, 169, 225, 0.08));
}

.result-val {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
}

.result-val.shimmer {
    background: var(--grad-shimmer);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-val.grad-bp {
    background: var(--grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-val.grad-cg {
    background: var(--grad-coral-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-unit {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 6px;
}

.result-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* --- Panel layout (existing tool pages) --- */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.panel-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    margin-bottom: 16px;
}

.panel-scroll {
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.panel-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-item {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.result-item .val {
    font-size: 18px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.result-item .lbl {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.results-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

/* App layout (existing tool pages) */
.app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* ============================================================
   9. BLOG ARTICLE STYLES
   ============================================================ */

/* --- Breadcrumbs --- */
.breadcrumbs {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 24px 0;
    font-size: 13px;
}

.breadcrumbs a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs span {
    color: var(--text-muted);
    margin: 0 8px;
}

.breadcrumbs .current {
    color: var(--text-dim);
}

/* --- Article header --- */
.article-header {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 24px 0;
}

.article-header h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 400;
    line-height: 1.15;
    color: var(--heading);
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-dim);
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    background: var(--accent-soft);
    border: 1px solid rgba(78, 205, 196, 0.12);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}

.meta-sep {
    color: var(--text-muted);
}

/* --- Table of Contents --- */
.toc {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 24px;
}

.toc-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
}

.toc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.toc-list {
    list-style: none;
    counter-reset: toc;
}

.toc-list li {
    counter-increment: toc;
    margin-bottom: 8px;
}

.toc-list li a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.toc-list li a::before {
    content: counter(toc, decimal-leading-zero);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
    min-width: 18px;
}

.toc-list li a:hover {
    color: var(--accent);
}

/* TOC links (alternate structure used in blog articles) */
.toc-box ol li a,
.toc-box ul li a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}

.toc-box ol li a:hover,
.toc-box ul li a:hover {
    color: var(--accent);
}

/* Key takeaways links */
.key-takeaways a {
    color: var(--accent);
    text-decoration: none;
}

.key-takeaways a:hover {
    text-decoration: underline;
}

/* --- Article body --- */
.article {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.article h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 400;
    color: var(--heading);
    letter-spacing: -0.5px;
    margin: 48px 0 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.article h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--heading);
    margin: 32px 0 14px;
}

.article h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--heading);
    margin: 24px 0 10px;
}

.article p {
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.75;
}

.article ul,
.article ol {
    margin-bottom: 18px;
    padding-left: 24px;
}

.article li {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.7;
}

.article strong {
    color: var(--heading);
    font-weight: 600;
}

.article blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--bg-card);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-dim);
}

/* Article links (excludes all button-style elements) */
.article a:not(.cta-btn):not(.share-btn):not(.btn):not(.btn-primary):not(.btn-outline):not(.btn-ghost) {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(78, 205, 196, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}

.article a:not(.cta-btn):not(.share-btn):not(.btn):not(.btn-primary):not(.btn-outline):not(.btn-ghost):hover {
    text-decoration-color: var(--accent);
}

/* Ensure all button-style links inside articles have correct text color */
.article .btn,
.article .btn-primary,
.article .cta-btn {
    color: var(--color-navy) !important;
    text-decoration: none !important;
}

/* --- Article code / pre --- */
.article code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
}

.article pre {
    background: rgba(12, 18, 32, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text);
    overflow-x: auto;
    line-height: 1.7;
}

.article pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* --- Article tables --- */
.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.article thead th {
    background: var(--bg-card);
    color: var(--heading);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.article tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.article tbody tr:hover {
    background: rgba(78, 205, 196, 0.03);
}

.article tbody td:first-child {
    color: var(--heading);
    font-weight: 500;
}

/* --- Figures & charts --- */
.article figure {
    margin: 32px 0;
    padding: 0;
}

.article figure canvas {
    width: 100% !important;
    max-width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.article figcaption {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-top: 12px;
    padding: 0 4px;
}

.article figure svg {
    display: block;
    margin: 0 auto;
}

.chart-figure {
    position: relative;
    width: 100%;
    margin: 24px 0;
}

.chart-figure canvas {
    width: 100% !important;
    max-width: 100%;
}

/* --- Equation / formula blocks --- */
.equation {
    display: block;
    background: rgba(12, 18, 32, 0.8);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: var(--heading);
    overflow-x: auto;
    line-height: 1.8;
}

.equation .var {
    color: var(--accent);
}

.equation .comment {
    color: var(--text-dim);
    font-size: 13px;
}

.equation .unit {
    color: var(--text-muted);
    font-size: 13px;
}

/* --- Code blocks (standalone) --- */
.code-block {
    background: rgba(12, 18, 32, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text);
    overflow-x: auto;
    line-height: 1.7;
}

.code-block .step {
    color: var(--accent);
    font-weight: 500;
}

.code-block .val {
    color: var(--amber);
}

.code-block .result {
    color: #4ecdc4;
    font-weight: 500;
}

/* --- Info / Tip / Warning boxes --- */
.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
}

.info-box.warning,
.warning-box {
    border-left-color: var(--coral);
}

.info-box.tip {
    border-left-color: var(--accent);
}

.info-box-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-box.warning .info-box-title {
    color: var(--coral);
}

.info-box.tip .info-box-title {
    color: var(--accent);
}

.info-box p {
    font-size: 14px !important;
    margin-bottom: 8px !important;
}

.info-box p:last-child {
    margin-bottom: 0 !important;
}

/* --- CTA inline boxes --- */
.cta-inline {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.06), rgba(130, 170, 255, 0.06));
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 12px;
    padding: 28px;
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cta-inline-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.cta-inline-content {
    flex: 1;
}

.cta-inline h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 6px;
}

.cta-inline p {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 12px !important;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--accent);
    color: var(--color-navy) !important;
    border-radius: 7px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s;
}

.cta-btn:hover {
    background: #3dbdb5;
    transform: translateY(-1px);
}

/* --- Share bar --- */
.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.share-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #6b7a94;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.share-btn:hover {
    border-color: var(--border-hover);
    color: var(--accent);
}

/* --- References --- */
.references {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.references h2 {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.references ol {
    list-style-position: outside;
    padding-left: 24px;
}

.references li {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 12px;
    line-height: 1.6;
}

.references a {
    color: var(--accent);
    font-size: 13px;
}

/* --- Resources section --- */
.resources-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.resources-section h2 {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.resources-section ul {
    list-style: none;
    padding-left: 0;
}

.resources-section li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.resources-section li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

/* --- FAQ section (article variant) --- */
.faq-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.faq-section h2 {
    font-size: 18px;
    color: var(--heading);
    margin-bottom: 16px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-q {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    transition: all 0.15s;
}

.faq-q:hover {
    color: var(--accent);
}

.faq-a {
    padding: 0 18px 14px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
    display: none;
    background: var(--bg-card);
}

.faq-item.open .faq-a {
    display: block;
}

.faq-arrow {
    transition: transform 0.2s;
    color: var(--text-muted);
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

/* Variant B: standalone questions */
.faq-q .arrow {
    transition: transform 0.2s;
    font-size: 12px;
    color: var(--text-muted);
}

.faq-q.open .arrow {
    transform: rotate(180deg);
}

.faq-a.open {
    display: block;
}

/* --- Related articles --- */
.related-articles {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.related-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 24px;
    color: var(--heading);
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.related-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.related-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 6px;
    line-height: 1.4;
}

.related-card p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}


/* ============================================================
   10. BLOG LISTING
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    display: block;
}

.blog-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.blog-card h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: var(--heading);
    margin-bottom: 8px;
    line-height: 1.35;
}

.blog-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}

.blog-card .meta {
    font-size: 12px;
    color: var(--text-muted);
}


/* ============================================================
   11. SLIDER / CAROUSEL
   ============================================================ */
.slider-section {
    padding: 60px 0 60px 40px;
    position: relative;
}

.slider-header {
    max-width: 1200px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 40px;
}

.slider-header h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 34px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--heading);
}

.slider-nav {
    display: flex;
    gap: 8px;
}

.slider-nav button {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.slider-nav button:hover {
    border-color: var(--color-sky-blue);
    color: var(--color-sky-blue);
}

.slider-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-track {
    display: flex;
    gap: 20px;
    padding-bottom: 8px;
}

/* Right-edge fade (desktop only) */
@media (min-width: 768px) {
    .slider-wrapper::before {
        content: "";
        position: absolute;
        top: -10px;
        bottom: -10px;
        right: 0;
        left: unset;
        width: 300px;
        z-index: 2;
        background: linear-gradient(91deg, rgba(4, 21, 46, 0) 0%, var(--bg) 61%, var(--bg) 100%);
        pointer-events: none;
    }
}

.slider-card {
    min-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    flex-shrink: 0;
}

.slider-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.slider-card h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.8px;
    line-height: 1.35;
    color: var(--heading);
    margin-bottom: 8px;
}

.slider-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.slider-card .meta {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}


/* ============================================================
   12. HERO SECTION
   ============================================================ */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 120px 80px 100px;
    overflow: hidden;
}

/* Bottom gradient fade */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7, 30, 63, 0) 50%, var(--bg) 100%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
}

/* Atmospheric orbs */
.hero-atmosphere {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 700px 500px at 15% 25%, rgba(9, 82, 128, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 75% 20%, rgba(40, 169, 225, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 500px 350px at 50% 70%, rgba(103, 38, 117, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 800px 300px at 85% 80%, rgba(9, 82, 128, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 3;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

/* Text column horizontal fade (V5) */
.hero-text-column {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 20%, rgba(255, 255, 255, 0) 100%);
    background-color: transparent;
    padding: 56px 72px 56px 56px;
    border-radius: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(110, 207, 246, 0.08);
    border: 1px solid rgba(110, 207, 246, 0.2);
    border-radius: 100px;
    font-size: 13px;
    color: var(--color-sky-blue);
    margin-bottom: 28px;
    font-weight: 500;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-text-column h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 24px;
    color: var(--color-text);
}

.hero-text-column h1 em {
    font-style: italic;
    background: var(--grad-teal-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text-column p {
    font-size: 17px;
    color: var(--color-text-muted);
    max-width: 480px;
    line-height: 1.75;
    margin-bottom: 36px;
}

/* Hero stats row (hub hero) */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}

.hero-stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--heading);
    line-height: 1;
}

.hero-stat-lbl {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Hero right column — capability cards */
.hero-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hero-cap-card {
    background: rgba(9, 82, 128, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(9, 82, 128, 0.25);
    border-radius: 14px;
    padding: 18px;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--color-text);
}

.hero-cap-card:hover {
    background: rgba(9, 82, 128, 0.22);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hero-cap-icon {
    font-size: 20px;
    margin-bottom: 10px;
}

.hero-cap-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.8px;
    color: var(--color-text);
    margin-bottom: 4px;
}

.hero-cap-desc {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.hero-cap-card.wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    background: rgba(110, 207, 246, 0.05);
    border-color: rgba(110, 207, 246, 0.12);
}

.hero-cap-card.wide .hero-cap-icon {
    font-size: 28px;
    margin-bottom: 0;
}

.hero-cap-card.wide .hero-cap-title {
    font-size: 14px;
    margin-bottom: 2px;
}


/* ============================================================
   13. FOOTER
   ============================================================ */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 13px;
}

.footer-brand a {
    color: var(--accent);
    text-decoration: none;
}

/* V5 centered footer variant */
.footer-brand.v5 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.5px;
    background: var(--grad-shimmer);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}


/* ============================================================
   14. RESPONSIVE
   ============================================================ */

/* --- Tablet (max-width: 768px) --- */
@media (max-width: 768px) {
    /* Navigation */
    .nav-links .hide-mobile {
        display: none;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-dropdown {
        min-width: 300px;
        grid-template-columns: 1fr;
    }

    .nav-drop-full {
        grid-column: span 1;
    }

    /* Hero */
    .hero-section {
        padding: 80px 24px 60px;
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-text-column {
        padding: 32px 24px;
    }

    .hero-text-column h1 {
        font-size: clamp(32px, 8vw, 48px);
    }

    .hero-stats {
        gap: 28px;
    }

    .hero-stat-val {
        font-size: 28px;
    }

    .hero-cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Blog article */
    .article-header {
        padding: 28px 20px 0;
    }

    .article {
        padding: 0 20px 40px;
    }

    .breadcrumbs {
        padding: 16px 20px 0;
    }

    .toc {
        padding: 24px 20px;
    }

    .cta-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .share-bar {
        flex-wrap: wrap;
    }

    .article table {
        font-size: 13px;
    }

    .article thead th,
    .article tbody td {
        padding: 8px 10px;
    }

    /* Tool cards */
    .tools-grid {
        grid-template-columns: 1fr;
    }

    /* Overlay grid */
    .overlay-grid {
        grid-template-columns: 1fr;
    }

    /* Result hero */
    .result-hero {
        grid-template-columns: 1fr;
    }

    /* Calc section */
    .calc-section {
        padding: 40px 20px;
    }

    /* Hub forms */
    .cta-form {
        flex-direction: column;
    }

    /* Slider */
    .slider-section {
        padding-left: 20px;
    }

    .slider-header {
        padding-right: 20px;
    }

    .slider-header h2 {
        font-size: 26px;
    }

    /* Blog grid */
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    .hero-text-column {
        padding: 20px 16px;
    }

    .hero-text-column h1 {
        font-size: 32px;
    }

    .hero-cards-grid {
        grid-template-columns: 1fr;
    }

    .hero-cap-card.wide {
        grid-column: span 1;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .btn-row {
        flex-direction: column;
    }

    .nav-inner {
        padding: 12px 16px;
    }

    .slider-card {
        min-width: 260px;
    }

    .overlay-grid {
        gap: 12px;
    }

    .calc-card {
        padding: 20px;
    }
}


/* ============================================================
   15. UTILITIES
   ============================================================ */

/* Ambient background (blog & hub pages) */
body.ambient::before {
    content: '';
    position: fixed;
    top: -40%;
    left: -20%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body.ambient::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -15%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(130, 170, 255, 0.03) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* Fade-in animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Category label colours */
.category-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-label::before {
    content: '';
    width: 24px;
    height: 2px;
    border-radius: 1px;
}

.cat-upstream {
    color: var(--teal);
}

.cat-upstream::before {
    background: var(--grad-teal-blue);
}

.cat-downstream {
    color: var(--gold);
}

.cat-downstream::before {
    background: var(--grad-coral-gold);
}

.cat-qc {
    color: var(--coral);
}

.cat-qc::before {
    background: linear-gradient(135deg, #ff6b6b, #ff9f43);
}

.cat-emerging {
    color: var(--purple-bp);
}

.cat-emerging::before {
    background: var(--grad-blue-purple);
}

/* Section label (V5 demo label, also reused) */
.section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Unit helpers */
.unit {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: 3px;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Info tooltips */
.info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
}

.info:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 400;
    z-index: 10;
    max-width: 300px;
    white-space: normal;
    width: max-content;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Tables (.vtable — tool pages) */
.vtable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.vtable th {
    text-align: left;
    padding: 8px 10px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.vtable td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(26, 37, 64, 0.5);
    color: var(--text);
}

.vtable tr:hover td {
    background: rgba(78, 205, 196, 0.03);
}

.vtable .mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.vtable .highlight-row td {
    background: rgba(78, 205, 196, 0.08);
    border-left: 3px solid var(--accent);
}

/* Pass/fail/warn tags (tool pages) */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.tag-pass {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}

.tag-fail {
    background: rgba(255, 107, 107, 0.12);
    color: var(--coral);
}

.tag-warn {
    background: rgba(255, 217, 61, 0.12);
    color: var(--amber);
}

/* Preset chips / tag selectors */
.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.preset-chip {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.12s;
}

.preset-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.preset-chip.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* Tools grid (hub page) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

/* SEO footer (tool pages) */
.seo-footer {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px 40px;
}

.seo-footer h2 {
    font-size: 18px;
    color: var(--heading);
    margin-bottom: 12px;
}

.seo-footer p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 10px;
}

.seo-footer li {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 10px;
}

/* CTA / Subscribe section (hub page) */
.cta-section {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}

.cta-box {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.06), rgba(130, 170, 255, 0.06));
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 16px;
    padding: 48px 40px;
}

.cta-box h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 28px;
    color: var(--heading);
    margin-bottom: 12px;
}

.cta-box p {
    color: var(--text-dim);
    font-size: 15px;
    margin-bottom: 24px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.cta-form {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin: 0 auto;
}

.cta-form input {
    flex: 1;
    padding: 11px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.cta-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.cta-form button {
    padding: 11px 24px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.15s;
}

.cta-form button:hover {
    background: #3dbdb5;
}

.cta-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}
