/* Mil-Multiplier Shared Styles — 2026 Design
   Chakra Petch (display) + Barlow (body) + JetBrains Mono (data)
   Effects: Spotlight Card (reactbits), noise texture, edge lighting */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Barlow+Condensed:wght@400;600;700;800;900&family=Barlow:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --primary:       #4d6040;
    --primary-dark:  #28332a;
    --secondary:     #c9a84c;
    --accent:        #e8c76a;
    --text:          #dde2db;
    --text-light:    #97a693;
    --bg:            #0c0f0b;
    --bg-alt:        #131710;
    --card-bg:       #151915;
    --border:        #242922;
    --border-solid:  #242922;
    --success:       #5a7a4c;
    --glow:          rgba(201, 168, 76, 0.22);
    --glow-dim:      rgba(201, 168, 76, 0.10);
    --font-brand:    'Chakra Petch', 'Barlow Condensed', sans-serif;
    --font-display:  'Chakra Petch', 'Barlow Condensed', sans-serif;
    --font-body:     'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:     'JetBrains Mono', 'Courier New', monospace;
}

/* === NOISE TEXTURE OVERLAY === */
/* Grain texture adds tactile depth to the flat dark background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

body {
    padding-top: 64px;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    font-weight: 400;
}

/* === TYPOGRAPHY ===
   body-prefixed selectors guarantee these override page-level <style> blocks.
   A bare `button {}` in a page's <style> has specificity 0,0,1.
   `body button {}` here has specificity 0,0,2 — always wins. */

body h1, body h2, body h3 {
    font-family: var(--font-brand);
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
    color: var(--text);
}
body h2 { font-size: 1.55rem; }
body h3 { font-size: 1.2rem; }
body h4, body h5, body h6 { font-family: var(--font-brand); font-weight: 600; }

body p, body li, body td, body dd {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
}

/* Labels — uppercase tactical display font */
body label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
}

/* Form inputs — body font, consistent sizing */
body input, body select, body textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-alt);
    border: 1px solid var(--border-solid);
    padding: 12px 14px;
    border-radius: 6px;
    transition: border-color 0.15s;
}
body input:focus, body select:focus, body textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

/* Links */
body a { color: var(--secondary); }
body a:hover { color: var(--accent); }

/* Breadcrumbs */
body .breadcrumb {
    font-family: var(--font-body);
    padding: 16px 0;
    font-size: 0.88rem;
    color: var(--text-light);
}
body .breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
}
body .breadcrumb a:hover { text-decoration: underline; }

/* Calculator cards */
body .calculator-card, body .calc-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 28px;
    margin: 28px 0;
    border: 1px solid var(--border-solid);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
body .calculator-card h2, body .calc-card h2 {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 10px;
}
body .calculator-card h3, body .calc-card h3 {
    font-family: var(--font-brand);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

/* Buttons — font only (applies to ALL buttons without breaking toggles/nav) */
body button {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

/* Primary CTA buttons — gold gradient, full-width (calculator submits, main actions) */
body .calculator-card button,
body .calc-card button,
body .calculator button,
body form button[type="submit"],
body .btn,
body .calc-btn,
body button[id*="calc"],
body button[id*="Calc"],
body button[onclick*="calculate"],
body button[onclick*="Calculate"] {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--bg);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    width: 100%;
    position: relative;
    overflow: hidden;
    font-size: 1.05rem;
}
body .calculator-card button:hover,
body .calc-card button:hover,
body .calculator button:hover,
body form button[type="submit"]:hover,
body .btn:hover,
body .calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}
body .calculator-card button:disabled,
body .calculator button:disabled,
body .calc-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Toggle/tab buttons — NOT full-width gold CTAs */
body .dep-toggle button {
    background: var(--bg-alt);
    color: var(--text-light);
    border: 2px solid var(--border-solid);
    padding: 10px 20px;
    border-radius: 8px;
    width: auto;
    font-size: 0.95rem;
    font-weight: 600;
}
body .dep-toggle button.active {
    border-color: var(--secondary);
    background: rgba(201, 168, 76, 0.1);
    color: var(--secondary);
}
body .dep-toggle button:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--secondary);
    color: var(--secondary);
}

/* === INTERACTION STATES ===
   Comprehensive hover, focus, active states for all interactive elements.
   These use body-prefix for specificity over page-level styles. */

/* Select dropdowns + range inputs — pointer cursor */
body select, body input[type="range"], body input[type="checkbox"], body input[type="radio"] {
    cursor: pointer;
}
body select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2397a693' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
body select:hover, body input:hover, body textarea:hover {
    border-color: rgba(201, 168, 76, 0.35);
}

/* Focus-visible ring — keyboard accessibility */
body a:focus-visible,
body button:focus-visible,
body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible,
body summary:focus-visible,
body .tool-card:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}
/* Remove default outline for mouse users */
body a:focus:not(:focus-visible),
body button:focus:not(:focus-visible),
body input:focus:not(:focus-visible),
body select:focus:not(:focus-visible) {
    outline: none;
}

/* Button active/pressed state */
body button:active, body .btn:active, body .calc-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: none;
    transition: transform 0.05s;
}

/* Link hover — underline for body text links */
body p a:hover, body li a:hover, body td a:hover,
body .seo-content a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Summary/accordion — pointer + hover */
body summary {
    cursor: pointer;
    transition: color 0.15s;
}
body summary:hover {
    color: var(--secondary);
}
body details[open] > summary {
    color: var(--secondary);
}

/* Breadcrumb hover */
body .breadcrumb a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Reset/secondary button hover */
body button[id="resetBtn"]:hover,
body button[style*="background:var(--bg)"]:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Tool card focus for keyboard nav */
body .tool-card:focus-within {
    border-color: rgba(201, 168, 76, 0.55);
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}

/* Smooth scroll behavior */
html { scroll-behavior: smooth; }

/* Disabled state for all interactive elements */
body button:disabled,
body input:disabled,
body select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Result boxes */
body .result-box {
    display: none;
    background: linear-gradient(135deg, var(--success), var(--primary));
    padding: 28px;
    border-radius: 12px;
    margin-top: 28px;
    text-align: center;
}
body .result-box.show { display: block; }

/* Result values — mono font for financial data */
body .result-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 500;
    color: var(--secondary);
}

/* SEO content sections */
body .seo-content {
    background: var(--bg-alt);
    padding: 56px 0;
    margin-top: 48px;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
}
body .seo-content .container { max-width: 800px; }
body .seo-content h2 {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 32px;
    margin-top: 48px;
}
body .seo-content h2:first-child { margin-top: 0; }
body .seo-content h3 {
    font-family: var(--font-brand);
    font-size: 1.2rem;
    margin-top: 32px;
    margin-bottom: 18px;
}
body .seo-content p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}
body .seo-content summary {
    font-family: var(--font-brand);
    font-weight: 700;
}
body .seo-content details {
    background: var(--card-bg);
    padding: 22px;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--border-solid);
}

/* Footer */
body footer {
    background: rgba(12, 15, 11, 0.9);
    padding: 28px 0;
    text-align: center;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    margin-top: 40px;
}
body footer a {
    color: var(--secondary);
    text-decoration: none;
    margin: 0 8px;
    font-size: 0.85rem;
}
body footer a:hover { color: var(--accent); }

/* === LAYOUT === */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* === STICKY HEADER — GLASS MORPHISM === */
.sticky-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: rgba(12, 15, 11, 0.95);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.08), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.logo svg { flex-shrink: 0; }

.main-nav { display: flex; gap: 32px; margin-right: 48px; }
.nav-dropdown { position: relative; }
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%; left: 0; right: 0;
    height: 10px;
    display: none;
}
.nav-dropdown:hover::after { display: block; }

.nav-btn {
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.15s;
    width: auto;
}
.nav-btn:hover {
    background: rgba(201, 168, 76, 0.12);
    color: var(--secondary);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 280px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(17, 21, 16, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(201, 168, 76, 0.05);
    padding: 10px;
    z-index: 100;
}
.nav-dropdown:hover .dropdown-menu,
.dropdown-menu:hover { display: block; }
.dropdown-menu.show-menu { display: block !important; }

@media (hover: none) and (pointer: coarse) {
    .nav-dropdown:hover .dropdown-menu,
    .dropdown-menu:hover { display: none; }
    .dropdown-menu.show-menu { display: block !important; }
}

.dropdown-section { padding: 10px 0; border-bottom: 1px solid rgba(36, 41, 34, 0.8); }
.dropdown-section:last-child { border-bottom: none; }
.dropdown-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary);
    font-weight: 800;
    margin-bottom: 6px;
    padding: 0 10px;
}
.dropdown-menu a {
    display: block;
    padding: 9px 10px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}
.dropdown-menu a:hover {
    background: rgba(77, 96, 64, 0.3);
    color: var(--text);
    padding-left: 14px;
}

@media (max-width: 768px) {
    .logo a { font-size: 1.05rem; gap: 5px; letter-spacing: 0; }
    .logo svg { width: 16px; height: 16px; }
    .nav-btn { padding: 8px 10px; font-size: 0.85rem; }
    .main-nav { gap: 8px; margin-right: 0; }
    .dropdown-menu { right: 0; left: auto; min-width: 230px; }
}

/* === PAGE HEADER === */
.page-header {
    background: linear-gradient(180deg, var(--primary-dark) 0%, transparent 100%);
    padding: 48px 0 36px;
    text-align: center;
    border-bottom: 1px solid rgba(201, 168, 76, 0.18);
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(201,168,76,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,168,76,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.page-header h1 {
    font-family: var(--font-brand);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    position: relative;
    text-shadow: 0 0 50px rgba(201,168,76,0.2);
}
.page-header p { color: var(--text); font-size: 1.05rem; position: relative; opacity: 0.6; }

/* === FORM ELEMENTS (layout-only — fonts/colors handled by body-prefix rules above) === */
.form-group { display: flex; flex-direction: column; margin-bottom: 18px; }
input[type="number"] { font-family: var(--font-mono); letter-spacing: -0.3px; }
.help, .help-text { font-size: 0.82rem; color: var(--text-light); margin-top: 5px; }
.help a { color: var(--secondary); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }

/* Logo already defined above in sticky header section */

/* === TOOL CARDS (homepage grid) === */
/* --mouse-x / --mouse-y written by shared/effects.js on mousemove */
/* Corner-cut "notch" design — tactical/sci-fi military UI aesthetic */
.tool-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border-solid);
    border-right: none; border-bottom: none;
    padding: 22px 22px 22px 22px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    --mouse-x: 50%;
    --mouse-y: 50%;
    /* Notched top-right corner — the signature design element */
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
/* Spotlight radial glow (reads --mouse-x/y from effects.js) */
.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 240px at var(--mouse-x) var(--mouse-y), rgba(201,168,76,0.10), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
/* Corner notch gold accent triangle */
.tool-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 22px; height: 22px;
    background: linear-gradient(225deg, rgba(201,168,76,0.35) 50%, transparent 50%);
    pointer-events: none;
    z-index: 2;
    transition: background 0.2s;
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover::after {
    background: linear-gradient(225deg, rgba(201,168,76,0.75) 50%, transparent 50%);
}
.tool-card > * { position: relative; z-index: 1; }
.tool-card:hover {
    border-color: rgba(201, 168, 76, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.1);
}
.tool-card .card-icon {
    width: 34px; height: 34px;
    margin-bottom: 16px;
    color: var(--secondary);
    display: flex; align-items: center;
    opacity: 0.85;
}
.tool-card .card-title {
    font-family: var(--font-display);
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}
.tool-card .card-desc {
    color: var(--text);
    opacity: 0.55;
    font-size: 0.92rem;
    line-height: 1.6;
    font-weight: 400;
}
/* Card tag — left-edge treatment instead of floating top-right */
.tool-card .card-tag {
    position: absolute;
    top: 0; left: 0;
    background: var(--secondary);
    color: var(--bg);
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 900;
    padding: 3px 10px 3px 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}
.tool-card.featured {
    border-color: rgba(201, 168, 76, 0.4);
    border-top: 2px solid rgba(201,168,76,0.5);
    background: linear-gradient(160deg, rgba(40,52,36,0.9) 0%, var(--card-bg) 60%);
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}
.tool-card.featured::after { width: 28px; height: 28px; }

/* Staggered card reveal animation */
@keyframes cardReveal {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card-grid .tool-card { animation: cardReveal 0.45s ease both; }
.card-grid .tool-card:nth-child(1) { animation-delay: 0.00s; }
.card-grid .tool-card:nth-child(2) { animation-delay: 0.07s; }
.card-grid .tool-card:nth-child(3) { animation-delay: 0.14s; }
.card-grid .tool-card:nth-child(4) { animation-delay: 0.21s; }
.card-grid .tool-card:nth-child(5) { animation-delay: 0.28s; }
.card-grid .tool-card:nth-child(6) { animation-delay: 0.35s; }
.card-grid .tool-card:nth-child(7) { animation-delay: 0.42s; }
.card-grid .tool-card:nth-child(8) { animation-delay: 0.49s; }
@media (prefers-reduced-motion: reduce) {
    .card-grid .tool-card { animation: none; }
}

/* Card grid layout */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }

/* === CALCULATOR CARDS === */
/* Spotlight effect also applied to calc cards */
.calculator-card, .calc-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 28px;
    margin: 28px 0;
    border: 1px solid var(--border-solid);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    --mouse-x: 50%;
    --mouse-y: 50%;
}
.calculator-card::before, .calc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 300px at var(--mouse-x) var(--mouse-y), rgba(201,168,76,0.07), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
    border-radius: inherit;
}
.calculator-card:hover::before, .calc-card:hover::before { opacity: 1; }
.calculator-card > *, .calc-card > * { position: relative; z-index: 1; }

/* === RESULT BOXES === */
.result-box {
    display: none;
    background: linear-gradient(135deg, rgba(40, 51, 42, 0.9), rgba(77, 96, 64, 0.6));
    border: 1px solid rgba(201, 168, 76, 0.3);
    padding: 28px;
    border-radius: 12px;
    margin-top: 28px;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.08), inset 0 1px 0 rgba(201, 168, 76, 0.1);
}
.result-box.show { display: block; }
.result-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 500;
    color: var(--secondary);
    margin: 14px 0;
    letter-spacing: -1px;
}

/* === LOADING === */
.loading { text-align: center; padding: 28px; color: var(--text-light); font-size: 0.95rem; display: none; }
.loading.show { display: block; }
.loading .spinner {
    display: inline-block;
    width: 22px; height: 22px;
    border: 2px solid var(--border-solid);
    border-top: 2px solid var(--secondary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === ANIMATIONS === */
.result { display: none; margin-top: 24px; }
.result.show { display: block; animation: fadeUp 0.4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* === NOTES & CALLOUTS === */
.note {
    background: rgba(201, 168, 76, 0.07);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-left: 3px solid var(--secondary);
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin-top: 14px;
    font-size: 0.875rem;
    color: var(--text-light);
}
.note strong { color: var(--secondary); }

/* === FOOTER (bare selector kept for pages without body-prefix coverage) === */
footer .kofi-footer { margin-top: 10px; }
footer .kofi-footer a { color: var(--secondary); }

/* === KO-FI === */
.kofi-bar {
    background: linear-gradient(135deg, rgba(77, 96, 64, 0.15), rgba(40, 51, 42, 0.25));
    border: 1px solid var(--border-solid);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin: 48px 0 28px;
}
.kofi-bar p { color: var(--text-light); margin-bottom: 12px; font-size: 0.9rem; }
.kofi-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: var(--bg);
    padding: 11px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.2px;
    transition: transform 0.15s, box-shadow 0.15s;
    width: auto;
    border: none;
    cursor: pointer;
}
.kofi-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201, 168, 76, 0.35); }
.kofi-sub { color: var(--text-light); font-size: 0.82rem; margin-top: 10px; }

/* === CATEGORY NUMBER PREFIX === */
/* Large muted ordinal — mission briefing section numbering */
.cat-num {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(201,168,76,0.45);
    margin-right: 6px;
    flex-shrink: 0;
}

/* === HERO RETICLE / GRID OVERLAYS === */
.hero-grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(201,168,76,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,168,76,0.028) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none; z-index: 0;
}

/* Targeting reticle — right-side hero decoration */
.hero-reticle {
    display: none;
    position: absolute;
    right: 6%; top: 50%;
    transform: translateY(-50%);
    width: 220px; height: 220px;
    pointer-events: none; z-index: 1;
}
@media (min-width: 860px) { .hero-reticle { display: block; } }

.reticle-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(201,168,76,0.15);
}
.reticle-outer { inset: 0; }
.reticle-mid   { inset: 36px; border-style: dashed; border-color: rgba(201,168,76,0.08); }
.reticle-inner { inset: 72px; border-color: rgba(201,168,76,0.12); }
.reticle-dot {
    position: absolute;
    inset: 50%; margin: -3px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(201,168,76,0.5);
    box-shadow: 0 0 8px rgba(201,168,76,0.4);
}
.reticle-h, .reticle-v {
    position: absolute;
    background: rgba(201,168,76,0.12);
}
.reticle-h { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.reticle-v { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
.reticle-tick {
    position: absolute; background: rgba(201,168,76,0.25);
}
.reticle-tick-t { top: 36px; left: 50%; width: 1px; height: 12px; transform: translateX(-50%); }
.reticle-tick-b { bottom: 36px; left: 50%; width: 1px; height: 12px; transform: translateX(-50%); }
.reticle-tick-l { left: 36px; top: 50%; height: 1px; width: 12px; transform: translateY(-50%); }
.reticle-tick-r { right: 36px; top: 50%; height: 1px; width: 12px; transform: translateY(-50%); }
.reticle-label {
    position: absolute; bottom: -22px; left: 0; right: 0;
    text-align: center;
    font-family: var(--font-mono); font-size: 0.55rem;
    color: rgba(201,168,76,0.3); letter-spacing: 2px;
}
@keyframes reticleSpin { to { transform: rotate(360deg); } }
.reticle-mid { animation: reticleSpin 25s linear infinite; }

/* === INNER PAGE HEADERS ===
   Upgrades all calculator/blog/base page headers to 2026 design language.
   Targets <header> without .sticky-header class (the inline page banners).
   The cascade handles all 74 pages from this single rule. */
header:not(.sticky-header) {
    background: linear-gradient(170deg, rgba(28,35,24,0.98) 0%, rgba(12,15,11,0.92) 100%);
    border-bottom: 1px solid rgba(201,168,76,0.22);
    position: relative;
    overflow: hidden;
    padding: 48px 0 44px;
    text-align: center;
}
header:not(.sticky-header)::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(201,168,76,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,168,76,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
header:not(.sticky-header)::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 240px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.5), transparent);
}
header:not(.sticky-header) h1 {
    font-family: var(--font-brand);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.3px;
    line-height: 1.2;
    position: relative; z-index: 1;
    text-shadow: 0 0 50px rgba(201,168,76,0.2);
}
header:not(.sticky-header) p {
    color: var(--text);
    font-size: 1.05rem;
    margin-top: 10px;
    position: relative; z-index: 1;
    opacity: 0.6;
}
/* page-header alias — kept in sync with header:not(.sticky-header) above */

/* Spotlight effect on tool-cards — CSS var bridge from effects.js */
.tool-card, .calculator-card, .calc-card {
    --mouse-x: 50%; --mouse-y: 50%;
}

/* === CENTRALIZED PAGE COMPONENTS ===
   Previously duplicated across 30+ page-level <style> blocks.
   Now body-prefixed here for single-source-of-truth uniformity. */

/* --- BASE PAGES: Quick stats, rate tables, dep toggles --- */
body .quick-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 28px 0; }
body .stat-card { background: var(--card-bg); border-radius: 12px; padding: 20px; text-align: center; border: 1px solid var(--border-solid); }
body .stat-card .stat-label { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
body .stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--secondary); font-family: var(--font-mono); }
body .stat-card .stat-note { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

body .rate-table-container { background: var(--card-bg); border-radius: 12px; padding: 28px; margin: 28px 0; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); overflow-x: auto; }
body .rate-table-container h2 { color: var(--secondary); margin-bottom: 20px; font-size: 1.5rem; }

body table.bah-rates { width: 100%; border-collapse: collapse; }
body table.bah-rates th { background: var(--primary-dark); color: var(--secondary); padding: 12px 16px; text-align: left; font-family: var(--font-brand); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--secondary); position: sticky; top: 0; }
body table.bah-rates td { padding: 12px 16px; border-bottom: 1px solid var(--border-solid); font-size: 0.95rem; }
body table.bah-rates tr:hover { background: rgba(201, 168, 76, 0.05); }
body table.bah-rates .rank-cell { font-weight: 700; color: var(--text); white-space: nowrap; }
body table.bah-rates .rate-cell { color: var(--success); font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
body table.bah-rates .section-header { background: var(--bg-alt); }
body table.bah-rates .section-header td { color: var(--secondary); font-family: var(--font-brand); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 16px; }

/* --- CTA BANNERS & BOXES (base + blog pages) --- */
body .cta-banner { background: linear-gradient(135deg, var(--success), var(--primary)); padding: 28px; border-radius: 12px; margin: 28px 0; text-align: center; }
body .cta-banner p { color: var(--text); font-size: 1.1rem; margin-bottom: 14px; }
body .cta-banner a { display: inline-block; padding: 12px 28px; background: linear-gradient(135deg, var(--secondary), var(--accent)); color: var(--bg); text-decoration: none; border-radius: 8px; font-family: var(--font-brand); font-weight: 700; font-size: 1rem; transition: transform 0.15s, box-shadow 0.15s; }
body .cta-banner a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201, 168, 76, 0.3); }

body .cta-box { background: linear-gradient(135deg, var(--success), var(--primary)); padding: 28px; border-radius: 12px; margin: 36px 0; text-align: center; }
body .cta-box p { color: var(--text); font-size: 1.1rem; margin-bottom: 14px; }
body .cta-box a { display: inline-block; padding: 12px 28px; background: linear-gradient(135deg, var(--secondary), var(--accent)); color: var(--bg); text-decoration: none; border-radius: 8px; font-family: var(--font-brand); font-weight: 700; font-size: 1rem; transition: transform 0.15s, box-shadow 0.15s; }
body .cta-box a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201, 168, 76, 0.3); }

body .cta { text-align: center; margin: 28px 0; }
body .cta a { color: var(--secondary); font-weight: 700; }

/* --- BLOG: Article styles --- */
body article { margin: 28px 0 56px; }
body article h2 { font-size: 1.5rem; color: var(--secondary); margin: 36px 0 18px; }
body article h2:first-of-type { margin-top: 0; }
body article h3 { font-size: 1.2rem; color: var(--text); margin: 28px 0 14px; }
body article p { font-size: 1rem; line-height: 1.8; color: var(--text-light); margin-bottom: 18px; }
body article a { color: var(--secondary); }
body article strong { color: var(--text); }

body .article-header {
    background: linear-gradient(170deg, rgba(28,35,24,0.98) 0%, rgba(12,15,11,0.92) 100%);
    border-bottom: 1px solid rgba(201,168,76,0.22);
    position: relative;
    overflow: hidden;
    padding: 48px 0 44px;
    text-align: center;
}
body .article-header::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(201,168,76,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,168,76,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
body .article-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 240px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.5), transparent);
}
body .article-header h1 {
    font-family: var(--font-brand);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin-bottom: 8px;
    position: relative; z-index: 1;
    text-shadow: 0 0 50px rgba(201,168,76,0.2);
}
body .article-header .meta { font-size: 0.85rem; color: var(--text-light); position: relative; z-index: 1; }

body .callout { background: rgba(201, 168, 76, 0.08); border-left: 3px solid var(--secondary); padding: 18px 22px; border-radius: 0 8px 8px 0; margin: 22px 0; }
body .callout strong { color: var(--secondary); }

/* --- CALCULATOR COMPONENTS --- */
body .calc-btn { background: linear-gradient(135deg, var(--secondary), var(--accent)); color: var(--bg); border: none; padding: 14px 28px; border-radius: 8px; font-family: var(--font-brand); font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; width: 100%; margin-top: 10px; }
body .calc-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3); }

body .help { font-size: 0.85rem; color: var(--text-light); margin-top: 5px; }
body .help a { color: var(--secondary); }

body .result { display: none; margin-top: 24px; }
body .result.show { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

body .res-header { text-align: center; padding: 24px; background: var(--card-bg); border-radius: 12px; margin-bottom: 20px; }
body .res-header .big { font-size: 2.8rem; font-weight: 700; color: var(--secondary); font-family: var(--font-mono); margin: 10px 0; }
body .res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 18px; }
body .res-stat { background: var(--bg-alt); padding: 18px; border-radius: 10px; text-align: center; }
body .res-stat .sl { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; font-family: var(--font-brand); }
body .res-stat .sv { font-size: 1.5rem; font-weight: 700; color: var(--text); font-family: var(--font-mono); margin-top: 6px; }
body .res-stat.hl { border: 2px solid var(--secondary); }
body .res-stat.hl .sv { color: var(--secondary); }

body .chart-wrap { background: var(--bg-alt); border-radius: 12px; padding: 20px; margin-top: 24px; overflow-x: auto; }
body .chart-wrap h3 { color: var(--secondary); margin-bottom: 14px; }
body .bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 220px; padding: 0 5px; }
body .bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 20px; }
body .bar { background: linear-gradient(to top, var(--primary), var(--secondary)); border-radius: 3px 3px 0 0; width: 100%; min-height: 2px; transition: height 0.3s; }
body .bar-match { background: linear-gradient(to top, var(--success), #8ab87a); border-radius: 0; width: 100%; }
body .bar-val { font-size: 0.6rem; color: var(--secondary); margin-bottom: 2px; font-family: var(--font-mono); }

body .insight { background: rgba(201, 168, 76, 0.08); border: 1px solid var(--secondary); border-radius: 8px; padding: 18px; margin-top: 18px; font-size: 0.95rem; color: var(--text-light); }
body .insight strong { color: var(--secondary); }
body .note { background: rgba(201, 168, 76, 0.08); border: 1px solid var(--secondary); border-radius: 8px; padding: 14px; margin-top: 14px; font-size: 0.9rem; color: var(--text-light); }
body .note strong { color: var(--secondary); }

/* Content sections */
body .cs { background: var(--card-bg); border-radius: 12px; padding: 28px; margin: 28px 0; border: 1px solid var(--border-solid); }
body .cs h2 { color: var(--secondary); font-size: 1.5rem; margin-bottom: 14px; }
body .cs p { color: var(--text-light); margin-bottom: 12px; }
body .cs a { color: var(--secondary); }

/* Loading/error states */
body #loadingMsg { text-align: center; padding: 36px; color: var(--text-light); }
body #errorMsg { display: none; text-align: center; padding: 36px; color: #e74c3c; }

/* Content pages (about, contact, privacy, terms) */
body .content h2 { font-size: 1.5rem; color: var(--secondary); margin: 36px 0 18px; }
body .content h2:first-child { margin-top: 0; }
body .content p { font-size: 1rem; line-height: 1.8; color: var(--text-light); margin-bottom: 18px; }
body .content a { color: var(--secondary); }
body .content strong { color: var(--text); }

/* Range input accent */
body input[type="range"] { accent-color: var(--secondary); }

/* Print button */
body .print-btn { background: var(--bg-alt); border: 1px solid var(--border-solid); color: var(--text-light); padding: 8px 16px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; width: auto; }
body .print-btn:hover { border-color: var(--secondary); color: var(--secondary); }

/* === MOBILE === */
@media (max-width: 600px) {
    .page-header h1 { font-size: 1.8rem; }
    .page-header p  { font-size: 0.9rem; }
    .calc-card, .calculator-card { padding: 16px; margin: 14px 0; }
    .form-row { grid-template-columns: 1fr; }
    input, select, textarea { font-size: 0.95rem; }
    .result-value { font-size: 2.2rem; }
    .card-grid { grid-template-columns: 1fr; }
}
