/* --- UPDATED AUTHORITATIVE PALETTE --- */
:root { 
    --neon-blue: #00f2ff;       
    --forensic-mint: #00ff9d;   
    --alert-orange: #ff9d00;    
    --warning: #ffff00;         /* ADDED: Missing Yellow variable */
    --dark-charcoal: #0d1117;   
    --lab-black: #050505;       
    --border-dim: rgba(0, 242, 255, 0.12);
    --retro-white: #f0f4f8;     
}

/* --- SYSTEM UTILITIES --- */
.progress-container { position: fixed; top: 0; z-index: 2000; width: 100%; height: 4px; background: transparent; }
.progress-bar { height: 4px; background: var(--neon-blue); width: 0%; box-shadow: 0 0 10px var(--neon-blue); }

body { 
    font-family: 'Segoe UI', sans-serif; 
    background-color: var(--dark-charcoal); /* Soft charcoal background */
    background-image: none !important;
    color: var(--retro-white); 
    margin: 0; 
}

/* --- TIGHTENED HEADER SPACING --- */
header { 
    text-align: center; 
    margin-bottom: 40px; /* Reduced from 80px to pull content up */
}

.container { max-width: 900px; margin: 40px auto; padding: 20px; }

/* --- THE COMPARTMENTALIZED BOXES (Deep Contrast) --- */
.drunk-guide, .grid, .info-block, .safety-box, .status-box, .definition-box, .silo-grid, .analysis-note, .paradox-box {
    border: 1px solid var(--border-dim);
    background: var(--lab-black); /* Darker than the body for depth */
    padding: 30px;
    margin-top: 50px;    /* ADDED: Pushes the box down from the text above */
    margin-bottom: 50px; /* UPDATED: Consistent spacing between modules */
    border-radius: 4px;
    /* Subtle outer shadow to create a "lifted" effect from the charcoal */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.action-row { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
    margin-top: 20px;
    margin-bottom: 40px; /* ADDED: This pushes the next box down */
}

.definition-box {
    margin-top: 20px; /* ADDED: Extra insurance for spacing */
}

/* Reduce the gap between the last education block and the footer */
.info-block + .site-footer {
    margin-top: 40px; /* Reduces the gap from 100px to 40px */
}

/* Optional: tighten the internal footer padding if it still feels too deep */
.site-footer {
    padding: 40px 20px; /* Reduced from 80px */
}

/* Step-by-Step Grid Styling */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.step-item:hover {
    border-color: var(--neon-blue);
    background: rgba(0, 242, 255, 0.05);
    transform: translateY(-2px);
}

.step-number {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--neon-pink);
    margin-right: 15px;
    line-height: 1;
}

.step-content strong {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: var(--retro-white);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.step-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    color: rgba(240, 244, 248, 0.8);
}

/* Navigation Terminal Container */
.nav-bar-terminal {
    padding: 20px 0;
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-start;
}

/* The Exquisite Button */
.exquisite-return-btn {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-icon {
    font-size: 1.2rem;
    color: var(--neon-blue);
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.btn-text {
    display: flex;
    flex-direction: column;
    color: var(--retro-white);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.btn-text small {
    font-size: 0.6rem;
    color: var(--neon-pink);
    letter-spacing: 2px;
    margin-bottom: 2px;
}

/* Shimmer Animation Effect */
.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 242, 255, 0.1),
        transparent
    );
    transition: 0.5s;
}

/* Hover States */
.exquisite-return-btn:hover {
    background: rgba(0, 242, 255, 0.08);
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
    transform: translateX(5px); /* Gentle nudge forward */
}

.exquisite-return-btn:hover .btn-shimmer {
    left: 100%;
}

.exquisite-return-btn:hover .btn-icon {
    transform: translateX(-5px); /* Arrow pulls back like a bow */
    color: var(--neon-pink);
}

/* Container for alignment */
.nav-bar-terminal {
    padding: 25px 0;
    display: flex;
    justify-content: flex-start;
}

/* The Exquisite Button */
.exquisite-return-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.4); /* Deep glass effect */
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 2px; /* Sharp, professional corners */
    text-decoration: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 2px;
}

.btn-icon {
    font-size: 1.1rem;
    color: var(--neon-blue);
    margin-right: 12px;
    transition: all 0.3s ease;
}

.btn-text {
    color: var(--retro-white);
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* The Animated Glow Shadow */
.exquisite-return-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--neon-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(15px);
    z-index: -1;
}

/* Shimmer Sweep */
.btn-shimmer {
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 0, 128, 0.2), 
        transparent
    );
    transform: skewX(-25deg);
    transition: 0.75s;
}

/* Hover States */
.exquisite-return-btn:hover {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 128, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

.exquisite-return-btn:hover::before {
    opacity: 0.1;
}

.exquisite-return-btn:hover .btn-shimmer {
    left: 150%;
}

.exquisite-return-btn:hover .btn-icon {
    color: var(--neon-pink);
    transform: translateX(-3px);
}

.live-date-preview {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--neon-blue);
    opacity: 0.8;
    /* Spacing adjustments */
    margin-top: 12px;    /* Pushes it away from the input field above */
    margin-bottom: 5px;  /* Ensures it doesn't crowd the next grid item */
    padding-left: 2px;
    letter-spacing: 0.5px;
}

.grid {
    display: grid;
    /* This ensures a minimum width before wrapping to a new row */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px; /* This creates 25px of space both vertically AND horizontally */
    margin-bottom: 30px;
}

/* To make sure the inputs themselves don't overflow on mobile */
.grid input, 
.grid select {
    width: 100%;
    box-sizing: border-box; /* Prevents padding from pushing the width past 100% */
}

/* --- RESPONSIVE SCANNER COMMAND BUTTON --- */
.btn-scanner-link {
    display: inline-block;
    padding: 18px 40px;
    background: transparent;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
    border-radius: 4px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
    margin-top: 20px;
}

.btn-scanner-link:hover {
    background: var(--neon-blue);
    color: var(--lab-black);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 242, 255, 0.4);
    border-color: var(--neon-blue);
}

.btn-scanner-link:active {
    transform: translateY(-2px) scale(0.98);
}

/* --- FOOTER ENGINE --- */
.site-footer {
    text-align: center;
    padding: 80px 20px;
    border-top: 1px solid var(--border-dim);
    background: rgba(0, 0, 0, 0.2);
    margin-top: 100px;
}

.footer-action-wrap {
    margin-bottom: 50px; /* Space between the big button and the small links */
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* --- ACTIVE PAGE HIGHLIGHT --- */
.active-link {
    color: var(--forensic-mint) !important;
    border-bottom: 1px solid var(--forensic-mint);
    padding-bottom: 2px;
    text-shadow: 0 0 10px var(--forensic-mint);
}

.copyright-notice {
    opacity: 0.5;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- SCIENTIFIC FORMULA ENGINE --- */
.formula-display {
    font-family: 'Times New Roman', serif;
    font-size: 1.8rem;
    padding: 25px;
    background: #000;
    border: 1px solid var(--border-dim);
    color: var(--retro-white);
    text-align: center;
    border-radius: 4px;
    letter-spacing: 2px;
    margin: 15px 0;
    box-shadow: inset 0 0 15px rgba(0, 242, 255, 0.05);
}

.formula-display span {
    color: var(--neon-blue);
    font-weight: bold;
}

/* --- COMPARTMENTALIZED FORENSIC BLOCKS --- */
.info-block {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.info-block h3 {
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: var(--neon-blue);
    text-transform: uppercase;
    font-size: 1.1rem;
}

/* --- MATH ENGINE STYLING --- */
.formula-display {
    font-family: 'Courier New', monospace; /* Forensic terminal look */
    font-size: 1.6rem;
    padding: 30px;
    background: #000;
    border: 1px solid #1a1a1a;
    color: var(--retro-white);
    text-align: center;
    border-radius: 4px;
    letter-spacing: 2px;
    margin: 20px 0;
}

.formula-display span {
    color: var(--neon-blue);
    font-weight: bold;
}

/* --- SVG FIGURE WRAPPER --- */
.svg-figure {
    text-align: center;
}

.svg-figure svg {
    background: #000;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #1a1a1a;
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* --- FAQ INTEL MODULE --- */
.faq-item {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    transition: background 0.3s ease;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item:hover {
    background: rgba(0, 242, 255, 0.05);
}

.faq-question {
    display: block;
    color: var(--neon-blue);
    font-size: 0.9rem;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.faq-answer {
    color: var(--retro-white);
    line-height: 1.6;
    margin: 0;
    opacity: 0.85;
}

/* --- READ NEXT COMMAND --- */
.next-silo-link {
    display: block;
    margin: 60px 0;
    padding: 40px;
    text-align: center;
    background: linear-gradient(90deg, rgba(255, 0, 128, 0.05), rgba(0, 242, 255, 0.05));
    border: 1px solid rgba(255, 0, 128, 0.2);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.next-silo-link:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.2);
    transform: translateY(-3px);
}

.next-label {
    display: block;
    color: var(--neon-pink);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.silo-title-link {
    color: var(--retro-white);
    font-size: 1.4rem;
    font-weight: 700;
}

/* --- COMPARTMENTALIZED SPACING --- */

/* Targets the note specifically when it is inside an info-block 
   and follows an SVG or a formula */
.info-block .analysis-note {
    margin-top: 35px; /* Creates the distinct gap you're looking for */
    border-top: 1px solid rgba(0, 242, 255, 0.1); /* Optional: adds a subtle separator line */
    padding-top: 20px;
}

/* Ensure the Figure Title also has space from the top of the block */
.fig-title {
    margin-bottom: 25px;
}

/* --- TIGHTENED BOX ALIGNMENT --- */
.drunk-guide {
    margin-top: 0; /* Ensures the first box doesn't push itself further away */
}

/* --- HEADER & REACTIVE ICONS --- */
.drink-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 50px; }

.drink-svg { 
    width: 35px; height: 35px; 
    color: var(--neon-blue); 
    filter: drop-shadow(0 0 5px var(--neon-blue));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* RESTORED MOVEMENT */
    cursor: pointer;
}

.drink-header .drink-svg:nth-child(odd) { transform: rotate(15deg); }
.drink-header .drink-svg:nth-child(even) { transform: rotate(-15deg); }

.drink-svg:hover {
    transform: scale(1.3) rotate(0deg) translateY(-8px) !important;
    color: var(--forensic-mint);
    filter: drop-shadow(0 0 15px var(--forensic-mint));
}

header h1 { 
    font-size: 5.5rem; font-weight: 900; letter-spacing: 12px; text-align: center; 
    text-shadow: 0 0 20px var(--neon-blue); margin: 0; color: #fff;
}

/* --- THE STUNNING SUB-BRAND --- */
.sub-brand {
    color: var(--neon-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 7px; /* Ultra-wide for authority */
    font-size: 1rem;
    margin-top: 20px;
    opacity: 0.9;
    text-align: center;
    /* Subtle glow that doesn't sacrifice readability */
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

/* --- THE FORENSIC ENGINE TAG (Centered & Spaced) --- */
.engine-tag {
    display: table; /* Using table instead of inline-block for easier auto-margin centering */
    margin: 15px auto 0; /* Centers horizontally and adds top space */
    background: rgba(0, 242, 255, 0.05);
    color: var(--forensic-mint);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 157, 0.2);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- SCANNER INPUTS --- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
label { display: block; color: var(--neon-blue); text-transform: uppercase; font-size: 0.8rem; margin-bottom: 8px; font-weight: bold; }

input, select { 
    width: 100%; padding: 12px; background: #0a0a0a; border: 1px solid #222; 
    color: #fff; border-radius: 4px; font-size: 1rem; transition: 0.3s;
}

input:focus, select:focus { border-color: var(--neon-blue); box-shadow: 0 0 10px var(--neon-blue); outline: none; }

/* --- THE TIMELINE ENGINE --- */
.timeline-grid { display: grid; grid-template-columns: 1.5fr 0.8fr 1.2fr; gap: 15px; padding: 12px; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
.metabolic-bar-container { width: 100%; height: 10px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.metabolic-bar { height: 100%; transition: width 0.5s ease-out; }

/* --- STATUS TAGS --- */
.row-tag { font-size: 0.65rem; padding: 2px 6px; border-radius: 3px; margin-left: 8px; font-weight: 900; text-transform: uppercase; }
.tag-impaired { background: var(--alert-orange); color: #000; box-shadow: 0 0 10px var(--alert-orange); }
.tag-now { background: var(--neon-blue); color: #000; }
.tag-target { background: var(--forensic-mint); color: #000; }
.tag-clearance { background: #fff; color: #000; box-shadow: 0 0 10px #fff; }

/* --- THE ULTIMATE CLEARANCE READOUT --- */
.clearance-status-box {
    background: var(--lab-black);
    border: 2px solid var(--forensic-mint);
    color: var(--retro-white);
    padding: 40px 20px;
    border-radius: 4px;
    text-align: center;
    margin-top: 40px;
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.1);
    position: relative;
    overflow: hidden;
}

.clearance-header {
    color: var(--forensic-mint);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.1rem;
    margin-bottom: 25px;
    display: block;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.4);
}

.clearance-date {
    font-size: 1.2rem;
    letter-spacing: 4px;
    opacity: 0.8;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.clearance-time {
    font-size: 3.5rem; /* Massive, authoritative time */
    font-weight: 900;
    line-height: 1;
    color: #fff;
    margin: 15px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.clearance-subtext {
    color: var(--forensic-mint);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 20px;
    opacity: 0.9;
}

/* --- THE DIAGNOSTIC SUMMARY PANEL --- */
.summary-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
    margin-top: 20px;
}

.summary-box {
    background: var(--lab-black);
    padding: 25px 15px;
    border-radius: 4px;
    text-align: center;
    border-bottom: 3px solid transparent; /* Prepared for colored accents */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

/* Peak Silo: Alert Orange for High Concentration */
.summary-box.peak { 
    border: 1px solid rgba(255, 157, 0, 0.2);
    border-bottom: 3px solid var(--alert-orange); 
}

/* Load Silo: Forensic Blue for Ethanol Mass */
.summary-box.load { 
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-bottom: 3px solid var(--neon-blue); 
}

.summary-label { 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-bottom: 12px;
    display: block;
    opacity: 0.7;
}

.summary-value { 
    font-size: 2.2rem; 
    font-weight: 900; 
    line-height: 1;
    font-family: 'Segoe UI', sans-serif;
}

.peak .summary-value { color: var(--alert-orange); text-shadow: 0 0 15px rgba(255, 157, 0, 0.3); }
.load .summary-value { color: var(--neon-blue); text-shadow: 0 0 15px rgba(0, 242, 255, 0.3); }

/* --- LIBRARY LINKS (Lift & Glow) --- */
.silo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border: none; background: transparent; box-shadow: none; padding: 0; }
.silo-link { 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 25px; border: 1px solid var(--border-dim); border-radius: 4px; 
    color: var(--neon-blue); text-decoration: none; background: var(--lab-black);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.silo-link:hover { border-color: var(--forensic-mint); color: var(--forensic-mint); transform: translateY(-5px); box-shadow: 0 0 20px var(--forensic-mint); }
.silo-id { display: block; font-size: 0.65rem; opacity: 0.5; margin-bottom: 8px; text-transform: uppercase; }

/* --- BACK TO TOP (Circular) --- */
#backToTop { 
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; 
    background: rgba(0, 242, 255, 0.1); color: var(--neon-blue); 
    border: 1px solid var(--neon-blue); border-radius: 50%; 
    cursor: pointer; font-size: 20px; transition: 0.3s; display: none; z-index: 1000;
}
#backToTop:hover { background: var(--neon-blue); color: #000; transform: translateY(-5px); box-shadow: 0 0 20px var(--neon-blue); }

/* --- USER INTENT HIGHLIGHTS --- */
.intent-query-blue {
    color: var(--neon-blue);
    font-weight: 800;
    font-style: italic;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
    letter-spacing: 0.5px;
}

.intent-query-mint {
    color: var(--forensic-mint);
    font-weight: 800;
    font-style: italic;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.4);
    letter-spacing: 0.5px;
}

/* --- COMPARTMENTALIZED SAFETY MODULE --- */
.safety-box {
    border: 2px solid var(--warning) !important;
    background: rgba(255, 157, 0, 0.05) !important;
    padding: 25px 40px !important; /* Tighter vertical, wider horizontal */
    margin: 40px auto; /* Centers the box itself */
    border-radius: 4px;
    text-align: center;
    max-width: 700px; /* Constrains the width to take up less "eye-space" */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 157, 0, 0.05);
    box-sizing: border-box;
}

.safety-title {
    color: var(--warning);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.4);
}

.safety-box p {
    color: var(--retro-white);
    opacity: 0.85;
    font-size: 0.85rem; /* Slightly smaller for that "fine print" authority */
    line-height: 1.5;
    margin: 0 auto 10px;
}

.warning-text-urgent {
    color: var(--warning) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: 15px;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 0, 0.1);
    padding-top: 15px;
}

/* --- AUTHORITATIVE FOOTER (Centered & Hardened) --- */
footer { 
    text-align: center; /* Centers the text blocks */
    padding: 80px 20px; 
    border-top: 1px solid var(--border-dim); 
    background: rgba(0, 0, 0, 0.2); 
    margin-top: 100px; 
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-links { 
    display: flex; 
    justify-content: center; /* Centers the link row */
    gap: 25px; 
    margin: 25px 0; 
    flex-wrap: wrap; 
}

/* Kills the default purple visited state */
.footer-links a, 
.footer-links a:visited { 
    color: var(--neon-blue); 
    text-decoration: none; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.footer-links a:hover { 
    color: var(--forensic-mint); 
    text-shadow: 0 0 10px var(--forensic-mint);
    transform: translateY(-2px);
}

.footer-credits {
    opacity: 0.5; 
    font-size: 0.75rem; 
    margin-top: 30px;
    letter-spacing: 1px;
}

.timeline-header {
    font-weight: bold;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    border-bottom: 2px solid var(--border-dim);
    padding-bottom: 12px;
    margin-top: 20px; /* Space between boxes and table */
}

/* --- UPDATED TAG SYSTEM --- */
.row-tag {
    font-size: 0.65rem;
    padding: 3px 8px; /* Standardized box padding */
    border-radius: 3px;
    margin-left: 8px;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 1px;
}

/* The New Bridge Tag */
.tag-sobering { 
    background: rgba(0, 242, 255, 0.2); 
    color: var(--neon-blue); 
    border: 1px solid var(--neon-blue); 
}

/* --- FULL SPECTRUM TAG SYSTEM --- */
.row-tag { 
    font-size: 0.65rem; 
    padding: 3px 8px; 
    border-radius: 3px; 
    margin-left: 8px; 
    font-weight: 900; 
    text-transform: uppercase; 
    display: inline-block; 
    letter-spacing: 1px; 
}

.tag-start { background: #4e00ff; color: #fff; } /* Fixed Indigo background */
.tag-peak { background: var(--retro-white); color: #000; }
.tag-now { background: var(--neon-blue); color: #000; }
.tag-target { background: var(--forensic-mint); color: #000; }
.tag-impaired { background: var(--alert-orange); color: #000; }
.tag-warning { background: var(--warning); color: #000; } /* Yellow glow */
.tag-sobering { background: rgba(0, 242, 255, 0.2); color: var(--neon-blue); border: 1px solid var(--neon-blue); }
.tag-stable { background: #1a1a1a; color: #666; border: 1px solid #333; }
.tag-clearance { background: #fff; color: #000; box-shadow: 0 0 10px #fff; }

.btn-clear { 
    background: transparent; 
    color: #666; 
    border: 1px solid #333; 
    padding: 10px 20px; 
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer; 
    transition: 0.3s; 
}

.btn-clear:hover { 
    color: #fff; 
    border-color: #fff; 
    background: rgba(255,255,255,0.05);
}

.action-row { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
    margin-top: 20px; 
}

/* --- RESPONSIVE ADAPTATION --- */
@media (max-width: 600px) {
    header h1 { font-size: 3rem; letter-spacing: 6px; }
    .grid, .silo-grid, .summary-container { grid-template-columns: 1fr !important; }
    .timeline-grid { grid-template-columns: 1fr 0.5fr; }
    .metabolic-bar-container { display: none; }
}

.results-hidden { display: none; }