/*
 * TPDay.com — Design System & Global Styles
 * assets/css/style.css
 *
 * Table of Contents:
 *  1.  CSS Variables / Design Tokens
 *  2.  Reset & Base
 *  3.  Typography
 *  4.  Layout Utilities
 *  5.  Buttons
 *  6.  Forms
 *  7.  Cards
 *  8.  Navigation
 *  9.  Hero Section
 * 10.  Section Styles
 * 11.  Tool Preview Cards
 * 12.  Feature/Benefit Strips
 * 13.  Alerts / Flash Messages
 * 14.  Tables
 * 15.  Chart Containers (placeholder)
 * 16.  Footer
 * 17.  Utility Classes
 * 18.  Animations
 */

/* ═══════════════════════════════════════════════════════════════
   1. CSS VARIABLES / DESIGN TOKENS
═══════════════════════════════════════════════════════════════ */

:root {
    /* — Brand Colors — */
    --color-bg:          #0d0f14;
    --color-bg-elevated: #13161e;
    --color-bg-card:     #181c26;
    --color-bg-hover:    #1e2330;
    --color-border:      rgba(255,255,255,0.07);
    --color-border-soft: rgba(255,255,255,0.04);

    /* — Accent — */
    --color-accent:       #00d4a0;   /* TP green */
    --color-accent-dim:   rgba(0, 212, 160, 0.12);
    --color-accent-glow:  rgba(0, 212, 160, 0.25);
    --color-accent-hover: #00ebb0;

    /* — Secondary Accent — */
    --color-accent2:      #4f8ef7;   /* data blue */
    --color-accent2-dim:  rgba(79, 142, 247, 0.12);

    /* — Semantic — */
    --color-success: #00d4a0;
    --color-warning: #f5a623;
    --color-danger:  #f05252;
    --color-info:    #4f8ef7;

    /* — Text — */
    --color-text-primary:   #e8ecf4;
    --color-text-secondary: #8892a4;
    --color-text-muted:     #525d6e;
    --color-text-inverse:   #0d0f14;

    /* — Typography — */
    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
    --font-mono:    'DM Mono', monospace;

    /* — Type Scale — */
    --text-xs:   0.75rem;    /*  12px */
    --text-sm:   0.875rem;   /*  14px */
    --text-base: 1rem;       /*  16px */
    --text-lg:   1.125rem;   /*  18px */
    --text-xl:   1.25rem;    /*  20px */
    --text-2xl:  1.5rem;     /*  24px */
    --text-3xl:  1.875rem;   /*  30px */
    --text-4xl:  2.25rem;    /*  36px */
    --text-5xl:  3rem;       /*  48px */
    --text-6xl:  3.75rem;    /*  60px */

    /* — Spacing Scale — */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* — Borders — */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-2xl:  24px;
    --radius-full: 9999px;

    /* — Shadows — */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
    --shadow-xl:  0 16px 48px rgba(0,0,0,0.7);
    --shadow-accent: 0 0 24px var(--color-accent-glow);

    /* — Transitions — */
    --transition-fast:   150ms ease;
    --transition-base:   250ms ease;
    --transition-slow:   400ms ease;

    /* — Layout — */
    --container-max:  1200px;
    --nav-height:     68px;
}

/* ═══════════════════════════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-hover); }

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

ul, ol { list-style: none; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   3. TYPOGRAPHY
═══════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

.text-accent   { color: var(--color-accent); }
.text-muted    { color: var(--color-text-secondary); }
.text-faint    { color: var(--color-text-muted); }
.text-mono     { font-family: var(--font-mono); }
.text-display  { font-family: var(--font-display); }

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
    display: block;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    line-height: 1.1;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 580px;
    line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════════
   4. LAYOUT UTILITIES
═══════════════════════════════════════════════════════════════ */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-sm {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-24) 0;
}

.section-sm {
    padding: var(--space-16) 0;
}

.section-header {
    margin-bottom: var(--space-12);
}

.section-header.centered {
    text-align: center;
}

.section-header.centered .section-subtitle {
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-12) 0;
}

/* ═══════════════════════════════════════════════════════════════
   5. BUTTONS
═══════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    border: 1.5px solid transparent;
    white-space: nowrap;
    user-select: none;
}

.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Primary — filled green */
.btn-primary {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

/* Ghost — outlined */
.btn-ghost {
    background: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-bg-hover);
    border-color: rgba(255,255,255,0.15);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

/* Secondary — subtle fill */
.btn-secondary {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}
.btn-secondary:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

/* Danger */
.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}
.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Sizes */
.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-group {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   6. FORMS
═══════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    background: var(--color-bg-elevated);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-primary);
    font-size: var(--text-base);
    font-family: var(--font-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892a4' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--color-danger);
    margin-top: var(--space-1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* ═══════════════════════════════════════════════════════════════
   7. CARDS
═══════════════════════════════════════════════════════════════ */

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: var(--shadow-md);
}

.card-sm { padding: var(--space-5); border-radius: var(--radius-lg); }
.card-lg { padding: var(--space-10); }

.card-header {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border);
}

.card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Interactive card (tools, etc.) */
.card-interactive {
    cursor: pointer;
}
.card-interactive:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent-dim), var(--shadow-md);
    transform: translateY(-2px);
}

/* Stat card */
.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1;
}

.stat-value.positive { color: var(--color-accent); }
.stat-value.negative { color: var(--color-danger); }

/* ═══════════════════════════════════════════════════════════════
   8. NAVIGATION
═══════════════════════════════════════════════════════════════ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(13, 15, 20, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.site-nav.scrolled {
    background: rgba(13, 15, 20, 0.97);
    box-shadow: var(--shadow-md);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.nav-logo { height: 32px; width: auto; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex: 1;
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    letter-spacing: 0.01em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

.nav-link.active {
    color: var(--color-accent);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    margin-left: auto;
}

.nav-toggle-bar {
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
    display: block;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════════
   9. HERO SECTION
═══════════════════════════════════════════════════════════════ */

.hero {
    position: relative;
    overflow: hidden;
    padding: var(--space-32) 0 var(--space-24);
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
}

/* Grid pattern background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,160,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,160,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
    pointer-events: none;
}

/* Glow orb */
.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center,
        rgba(0,212,160,0.08) 0%,
        rgba(79,142,247,0.04) 40%,
        transparent 70%
    );
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-accent-dim);
    border: 1px solid rgba(0,212,160,0.2);
    border-radius: var(--radius-full);
    padding: var(--space-1) var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-6);
}

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-6);
}

.hero-title .accent-word {
    color: var(--color-accent);
    position: relative;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    line-height: 1.65;
    margin-bottom: var(--space-10);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-16);
}

/* Abstract chart motif */
.hero-visual {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    height: 180px;
    overflow: hidden;
}

.hero-chart {
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

/* Stats strip below hero CTA */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    flex-wrap: wrap;
    margin-top: var(--space-10);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-text-primary);
    display: block;
}

.hero-stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
    display: block;
}

/* ═══════════════════════════════════════════════════════════════
   10. SECTION STYLES
═══════════════════════════════════════════════════════════════ */

.section-dark {
    background: var(--color-bg);
}

.section-elevated {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-accent-border {
    position: relative;
}

.section-accent-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════════
   11. TOOL CARDS
═══════════════════════════════════════════════════════════════ */

.tool-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.tool-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent-dim), var(--shadow-lg);
    transform: translateY(-3px);
    color: inherit;
}

.tool-icon {
    width: 44px;
    height: 44px;
    background: var(--color-accent-dim);
    border: 1px solid rgba(0,212,160,0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tool-card-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.tool-card-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    flex: 1;
}

.tool-card-link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════════
   12. BENEFITS STRIP / FEATURE GRID
═══════════════════════════════════════════════════════════════ */

.benefit-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    justify-content: center;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.benefit-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.feature-item {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--color-accent-dim);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-text h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
}

.feature-text p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   13. ALERTS / FLASH MESSAGES
═══════════════════════════════════════════════════════════════ */

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    border: 1px solid transparent;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert-success {
    background: rgba(0,212,160,0.08);
    border-color: rgba(0,212,160,0.25);
    color: var(--color-accent);
}

.alert-error {
    background: rgba(240,82,82,0.08);
    border-color: rgba(240,82,82,0.25);
    color: var(--color-danger);
}

.alert-warning {
    background: rgba(245,166,35,0.08);
    border-color: rgba(245,166,35,0.25);
    color: var(--color-warning);
}

.alert-info {
    background: rgba(79,142,247,0.08);
    border-color: rgba(79,142,247,0.25);
    color: var(--color-info);
}

/* ═══════════════════════════════════════════════════════════════
   14. TABLES
═══════════════════════════════════════════════════════════════ */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

th {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 500;
    text-align: left;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
}

td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
    color: var(--color-text-primary);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr:hover td {
    background: var(--color-bg-hover);
}

.td-mono {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

.td-positive { color: var(--color-success); font-weight: 600; }
.td-negative { color: var(--color-danger);  font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   15. CHART CONTAINERS (placeholder — populated in Chat 4)
═══════════════════════════════════════════════════════════════ */

.chart-container {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    min-height: 280px;
}

.chart-title {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
}

/* ═══════════════════════════════════════════════════════════════
   16. FOOTER
═══════════════════════════════════════════════════════════════ */

.site-footer {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-logo { height: 28px; width: auto; margin-bottom: var(--space-4); }

.footer-tagline {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.footer-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.65;
}

.footer-heading {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
    font-weight: 500;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-disclaimer {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border-soft);
}

.footer-disclaimer p {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
}

.footer-copy,
.footer-note {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   17. UTILITY CLASSES
═══════════════════════════════════════════════════════════════ */

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    border: 0;
}

.badge {
    display: inline-block;
    padding: 2px var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
}

.badge-green  { background: var(--color-accent-dim); color: var(--color-accent); }
.badge-blue   { background: var(--color-accent2-dim); color: var(--color-accent2); }
.badge-red    { background: rgba(240,82,82,0.1); color: var(--color-danger); }
.badge-yellow { background: rgba(245,166,35,0.1); color: var(--color-warning); }

.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-left   { text-align: left; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.w-full { width: 100%; }

/* Horizontal rule styled */
.rule {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-8) 0;
}

/* ═══════════════════════════════════════════════════════════════
   18. ANIMATIONS
═══════════════════════════════════════════════════════════════ */

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.8); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-fade-up {
    animation: fade-in-up 0.6s ease both;
}

.animate-fade-up-delay-1 { animation-delay: 0.1s; }
.animate-fade-up-delay-2 { animation-delay: 0.2s; }
.animate-fade-up-delay-3 { animation-delay: 0.3s; }
.animate-fade-up-delay-4 { animation-delay: 0.4s; }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
