:root {
    --bg-color: #0f172a;
    /* Deep slate dark mode */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;

    /* Vibrant Tile Colors - Syringe Labels */
    --color-ab: #3b82f6; /* Opioids - Deep Blue */
    --color-ab-hover: #2563eb;
    
    --color-c: #ef4444; /* Muscle Relaxants - Red */
    --color-c-hover: #dc2626;
    
    --color-d: #fde047; /* Induction Agents - Brighter Yellow */
    --color-d-hover: #facc15;
    
    --color-e: #22c55e; /* Anticholinergics - Green */
    --color-e-hover: #16a34a;
    
    --color-o: #a855f7; /* Vasopressors - Purple */
    --color-o-hover: #9333ea;
    
    --color-p: #94a3b8; /* Local Anaesthetic - Grey */
    --color-p-hover: #64748b;
}

html {
    scroll-behavior: smooth;
}

.mobile-br {
    display: none;
}

@media (max-width: 768px) {
    .mobile-br {
        display: inline;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: #38bdf8; /* Subtle blue */
    transition: color 0.2s, background-color 0.2s;
}

a:hover {
    color: #bae6fd; /* Lighter blue on hover */
    background-color: rgba(56, 189, 248, 0.1); /* Very subtle blue background */
    border-radius: 4px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-image: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 400px),
        radial-gradient(circle at bottom left, rgba(239, 68, 68, 0.1), transparent 400px);
}

/* Mobile-first responsive padding */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    body.crisis-page {
        padding: 0.5rem;
    }
}

.top-bar {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

/* Mobile top bar - stack vertically */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
        text-align: center;
    }
}

.app-header {
    text-align: left;
    position: relative;
    z-index: 100;
}

.app-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin: 0;
    color: #0284c7; /* Nitrous Oxide Blue for "gas" */
}

/* Mobile header sizing */
@media (max-width: 768px) {
    .app-header h1 {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 2.8rem;
    }
}

.app-header h1 span {
    color: var(--text-primary); /* White for "crisis" */
}

.logo-link {
    text-decoration: none;
    color: inherit;
    font-size: inherit;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: var(--color-ab); /* Start with a solid blue button background */
    border: 2px solid var(--color-ab-hover);
    color: white; /* Ensure text is white against the solid background */
    font-weight: 800; /* Bolder text for visibility */
    font-size: 1.25rem; /* Make the button slightly more compact than just raw text */
    padding: 0.6rem 1.5rem; /* Give it more button-like padding */
    border-radius: 3rem; /* Perfectly rounded pill shape */
    position: relative;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4); /* Stronger shadow so it pops */
}

@media (min-width: 1024px) {
    .back-link {
        margin-right: 130px; /* Only apply margin on larger screens */
    }
}

.back-link:hover {
    background-color: var(--color-c); /* Switch to alert red on hover */
    border-color: var(--color-c-hover);
    transform: translateY(-3px) scale(1.02); /* Pop up slightly */
    box-shadow: 0 8px 15px rgba(220, 38, 38, 0.5); /* Matching red glow */
}

.back-link svg {
    width: 24px; /* Slightly larger icon */
    height: 24px;
    stroke-width: 3;
    margin-right: 0.75rem; /* More breathing room */
}

.search-container {
    position: relative;
    width: 300px;
}

/* Mobile search bar */
@media (max-width: 768px) {
    .search-container {
        width: 75%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 80%;
        max-width: 240px;
    }
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
}

#crisis-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border-radius: 2rem;
    border: 1px solid rgba(239, 68, 68, 0.4);
    background-color: rgba(30, 41, 59, 0.7);
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

#crisis-search:focus {
    outline: none;
    border-color: var(--color-c);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25), 0 8px 25px rgba(239, 68, 68, 0.3);
    background-color: rgba(15, 23, 42, 0.9);
    transform: translateY(-2px);
}

#crisis-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Mobile grid adjustments */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
    }
}

/* Larger gaps on bigger screens */
@media (min-width: 768px) {
    .grid-container {
        gap: 2rem;
    }
}

.tile {
    position: relative;
    border-radius: 1.5rem;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    background-size: 200% auto;
}

/* Mobile tile adjustments */
@media (max-width: 768px) {
    .tile {
        padding: 1.5rem;
        min-height: 180px;
        border-radius: 1rem;
    }
}

@media (max-width: 480px) {
    .tile {
        padding: 1rem;
        min-height: 160px;
    }
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0.3;
    transition: opacity 0.3s;
}



/* tighten up crisis detail lists */
.crisis-section ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.crisis-section ul ul {
    list-style: none;
    margin-top: 0.35rem;
    padding-left: 1.2rem;
}

.crisis-section ul li {
    position: relative;
    line-height: 1.3;
}

/* Level 1: Main left-aligned text, no bullets */
.crisis-section > ul > li {
    margin-bottom: 0.75rem;
}

/* Level 2: First tabbed text (Dots) */
.crisis-section > ul > li > ul > li {
    margin-bottom: 0.4rem;
}

.crisis-section > ul > li > ul > li::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: var(--text-secondary);
    font-size: 1.2em;
    top: -0.1em;
}

/* Level 3: Second tabbed text (Arrows) */
.crisis-section > ul > li > ul > li > ul > li,
.crisis-section > ul > li > ol > li > ul > li {
    margin-bottom: 0.25rem;
}

.crisis-section > ul > li > ul > li > ul > li::before,
.crisis-section > ul > li > ol > li > ul > li::before {
    content: "→";
    position: absolute;
    left: -1.2rem;
    color: var(--theme-color, var(--color-ab));
    font-weight: bold;
}

/* Ordered List Overrides */
.crisis-section > ul > li > ol {
    padding-left: 2.2rem;
    margin-bottom: 0.75rem;
    margin-top: 0.4rem;
}

.crisis-section > ul > li > ol > li {
    margin-bottom: 0.4rem;
    position: relative;
    line-height: 1.3;
}

/* Dynamic Crisis Themes */
.crisis-theme-ab { --theme-color: var(--color-ab); }
.crisis-theme-c { --theme-color: var(--color-c); }
.crisis-theme-d { --theme-color: var(--color-d); }
.crisis-theme-e { --theme-color: var(--color-e); }
.crisis-theme-o { --theme-color: var(--color-o); }
.crisis-theme-p { --theme-color: var(--color-p); }
.crisis-theme-r { --theme-color: var(--text-secondary); }

/* Supplementary info box (e.g., 4Hs&Ts) */
.supplementary-box {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 0.8rem;
    padding: 0.8rem;
    width: 220px;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
    z-index: 10;
}

/* Mobile supplementary box - hide or reposition */
@media (max-width: 1024px) {
    .supplementary-box,
    .supplementary-box-left {
        position: static !important;
        left: unset !important;
        top: unset !important;
        transform: none !important;
        width: 90% !important;
        max-width: 350px !important;
        margin: 1rem auto !important;
        order: 2 !important;
        box-shadow: none !important;
    }
    
    .drugs-dosing-box {
        width: 90% !important;
        max-width: 350px !important;
        margin: 1rem auto !important;
    }
}

.supplementary-box-left {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 0.8rem;
    padding: 0.8rem;
    width: 220px;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
    z-index: 10;
}

.supplementary-box strong,
.supplementary-box-left strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--color-e); /* Anticholinergic Green */
}

/* Ensure newly upgraded h3 tags inside side boxes are appropriately scaled */
.supplementary-box h3,
.supplementary-box-left h3 {
    font-size: 1rem !important;
    color: var(--color-e);
    margin-top: 0;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.4);
    padding-bottom: 0.2rem;
    line-height: 1.2;
}

.supplementary-box ul,
.supplementary-box-left ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.supplementary-box ul li,
.supplementary-box-left ul li {
    padding: 0.15rem 0;
    font-size: 0.75rem;
    color: var(--text-primary);
}

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.site-footer a {
    text-decoration: none;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 8px 8px 0 8px; /* Stripes on top and sides only */
    background: repeating-linear-gradient(
        -45deg,
        #ef4444, /* Red */
        #ef4444 10px,
        #ffffff 10px, /* White */
        #ffffff 20px
    );
    border: 2px solid #ef4444;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.site-footer a span {
    color: #000; /* Black text */
    background-color: #fff; /* White background */
    padding: 0.4rem 1rem;
    display: block;
    border-radius: 2px 2px 0 0;
    border-bottom: 2px solid #ef4444; /* Bottom line to enclose it */
}

.site-footer a:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0,0,0,0.3);
}

.tile:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.tile:hover::before {
    opacity: 0.5;
}

.tile:focus {
    outline: 3px solid white;
    outline-offset: 4px;
}

.tile-content {
    flex-grow: 1;
    z-index: 10;
}

.tile-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile tile heading */
@media (max-width: 768px) {
    .tile-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        text-transform: uppercase;
    }
}

@media (max-width: 480px) {
    .tile-content h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        text-transform: uppercase;
    }
}

.crisis-list {
    list-style-type: none;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.crisis-list li {
    margin-bottom: 0.25rem;
}

.crisis-list a {
    display: block;
    padding: 4px 6px;
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.crisis-list a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.crisis-list a.highlight {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.tile-o .crisis-list a.highlight {
    background-color: rgba(255, 255, 255, 0.2);
}

.tile-d .crisis-list a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.tile-d .crisis-list a.highlight {
    background-color: rgba(0, 0, 0, 0.1);
    color: black;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.tile-icon {
    align-self: flex-end;
    opacity: 0.2;
    transition: opacity 0.3s;
    position: absolute;
    bottom: 2rem;
    right: 2rem;
}

.tile-icon svg {
    width: 64px;
    height: 64px;
}

/* Mobile tile icons */
@media (max-width: 768px) {
    .tile-icon {
        bottom: 1.5rem;
        right: 1.5rem;
        opacity: 0.3;
    }

    .tile-icon svg {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .tile-icon {
        bottom: 1rem;
        right: 1rem;
    }

    .tile-icon svg {
        width: 40px;
        height: 40px;
    }
}

.tile:hover .tile-icon {
    opacity: 0.4;
    transform: scale(1.1);
    transition: all 0.3s;
}

/* Tile specific colors */
.tile-ab {
    background-color: var(--color-ab);
}

.tile-ab:hover {
    background-color: var(--color-ab-hover);
}

.tile-c {
    background-color: var(--color-c);
}

.tile-c:hover {
    background-color: var(--color-c-hover);
}

.tile-d {
    background-color: var(--color-d);
    color: #1e293b; /* text colour for list items */
}



.tile-d:hover {
    background-color: var(--color-d-hover);
}

.tile-d .crisis-list {
    color: rgba(30, 41, 59, 0.9);
    text-shadow: none;
    font-weight: 600;
}

.tile-d h2 {
    text-shadow: none;
}

.tile-e {
    background-color: var(--color-e);
}

.tile-e:hover {
    background-color: var(--color-e-hover);
}

.tile-op {
    background-color: var(--color-o);
}

.tile-op:hover {
    background-color: var(--color-o-hover);
}

.tile-blank {
    background-color: var(--color-p); /* Enflurane Orange */
}

.tile-blank:hover {
    background-color: var(--color-p-hover);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 1rem;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #1e293b;
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: auto;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
}

#modal-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

#modal-body {
    line-height: 1.6;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Disclaimer Specific Styles */
.disclaimer-overlay {
    backdrop-filter: blur(16px);
    background-color: rgba(15, 23, 42, 0.95);
    z-index: 2000;
    /* Above everything else */
}

.disclaimer-content {
    text-align: center;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#disclaimer-title {
    color: var(--color-ab);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#disclaimer-body p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

#disclaimer-body strong {
    color: var(--text-primary);
}

.primary-btn {
    margin-top: 2rem;
    background-color: var(--color-c);
    color: white;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem 2rem;
    border: none;
    border-radius: 3rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.primary-btn:hover {
    background-color: var(--color-c-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Disclaimer Modal Mobile Overrides */
@media (max-width: 480px) {
    .modal {
        padding: 1.5rem 0.5rem;
    }
    
    .modal-content.disclaimer-content {
        padding: 1.75rem 1.25rem;
        border-radius: 1rem;
    }
    
    #disclaimer-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        letter-spacing: 1px;
    }
    
    #disclaimer-body p {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        line-height: 1.5;
    }
    
    .primary-btn {
        margin-top: 1.5rem;
        padding: 0.85rem 1.75rem;
        font-size: 1.1rem;
    }
}

/* Small inline CICO button */
.cico-btn {
    background-color: var(--color-c);
    color: #ffffff !important; /* Force white text */
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    text-decoration: none !important;
    display: inline-block;
    font-size: 0.85em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    line-height: 1.2;
    vertical-align: middle;
    margin: -0.25rem 0 0 0; /* Increased negative margin to perfectly level with all-caps text */
}

.cico-btn:hover {
    background-color: var(--color-c-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    opacity: 1 !important; /* Prevent the generic link hover opacity */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Crisis Detail Page Specific Styles */
.crisis-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

.crisis-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#crisis-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-c); /* Changed to red for all slide titles */
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile crisis title */
@media (max-width: 768px) {
    #crisis-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    #crisis-title {
        font-size: 1.5rem;
    }
}

.crisis-body {
    background-color: #1e293b;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Standardize in-text hyperlinks */
.crisis-body a:not(.primary-btn) {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.crisis-body a:not(.primary-btn):hover {
    opacity: 0.8;
}

/* Mobile crisis content */
@media (max-width: 768px) {
    .crisis-body {
        padding: 1.5rem 0.5rem;
        font-size: 1rem;
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
    }
    .crisis-body > .crisis-section {
        order: 1;
    }
    .crisis-body > .supplementary-box {
        order: 2;
    }
    .crisis-section {
        padding: 1rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .crisis-body {
        padding: 0.5rem 0.1rem;
        font-size: 0.95rem;
    }
    .crisis-section {
        padding: 0.5rem 0.2rem;
    }
    .supplementary-box,
    .supplementary-box-left {
        padding: 1rem;
    }
    
    /* Un-bunch nested lists to use available space */
    .crisis-section ul ul {
        padding-left: 0.6rem;
    }
    .crisis-section ul ul ul,
    .crisis-section ol ul {
        padding-left: 1.1rem;
    }
    .crisis-section > ul > li > ol {
        padding-left: 1.1rem;
    }
    .crisis-section > ul > li > ul > li::before {
        left: -0.6rem;
    }
    .crisis-section > ul > li > ul > li > ul > li::before,
    .crisis-section > ul > li > ol > li > ul > li::before {
        left: -0.9rem;
    }
}

.crisis-section {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    background-color: rgba(15, 23, 42, 0.6);
    border-left: 4px solid var(--color-ab);
    transition: transform 0.2s, box-shadow 0.2s;
}

.crisis-section:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.crisis-section:last-child {
    margin-bottom: 0;
}

.crisis-section h3 {
    color: var(--color-e);
    font-size: 1.15rem !important; /* Force uniform size across all headings, slightly smaller */
    margin-top: 1.8rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid rgba(239, 68, 68, 0.4);
    padding-bottom: 0.5rem;
    line-height: 1.3;
}

.crisis-section h3:first-of-type {
    margin-top: 0;
}

.crisis-section ul {
    list-style-type: none;
}

.crisis-section li {
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--text-secondary);
}

.crisis-section li::before {
    position: absolute;
    left: 0;
    color: var(--color-ab);
    font-weight: bold;
}

.crisis-section.warning-box {
    border-left-color: var(--color-d);
    background-color: rgba(234, 179, 8, 0.05);
}



.crisis-section.warning-box li::before {
    color: var(--color-d);
}

.crisis-section.alert-box {
    border-left-color: var(--color-c);
    background-color: rgba(239, 68, 68, 0.05);
}



.crisis-section.alert-box li::before {
    color: var(--color-c);
}

.highlight-red {
    color: var(--color-c);
    font-weight: 800;
}

/* Touch-friendly interactions for mobile */
@media (max-width: 768px) {
    .tile,
    .primary-btn {
        min-height: 44px; /* iOS recommended touch target size */
    }

    .crisis-list {
        opacity: 0.85;
        font-weight: 500;
    }

    .crisis-list li {
        margin-bottom: 0.15rem;
    }

    .crisis-list a {
        padding: 4px 8px; /* Reduced touch area to close gaps */
    }
}

/* Paediatric Calculator Styles */
.paeds-calc-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.paeds-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.paeds-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.4);
    border-color: rgba(56, 189, 248, 0.3);
}

.paeds-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: rgb(56, 189, 248);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paeds-card table tr td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.paeds-card table tr:last-child td {
    border-bottom: none;
}

.paeds-card table tr td:first-child {
    color: #94a3b8;
    font-weight: 600;
    width: 60%;
}

.paeds-card table tr td:last-child {
    color: #f8fafc;
    text-align: right;
    font-weight: 500;
}