:root {
    /* Refined Color Palette */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #0ea5e9;
    --accent-glow: #38bdf8;
    --secondary: #f43f5e;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --text-main: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;

    /* Spacing & Radius */

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container-width: 1280px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background: var(--surface-alt);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--primary);
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.text-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #0369a1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0;
}

/* Hide custom elements before JS upgrades them to prevent FOUC */
srac-header:not(:defined),
srac-footer:not(:defined),
srac-sidebar:not(:defined) {
    visibility: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary);
    font-family: 'Space Grotesk', sans-serif;
    white-space: nowrap;
    letter-spacing: -0.03em;
}

.brand img {
    height: 90px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 100%;
}

.btn-nav {
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-nav:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), var(--surface-alt));
}

.hero-bg {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s infinite ease-in-out;
}

.hero-bg-2 {
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 15s infinite ease-in-out reverse;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-text p {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 400;
}

.card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

/* Main Content Layout */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding: 3rem 0 6rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Document List */
.doc-group {
    margin-bottom: 3rem;
}

.doc-group h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.doc-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.doc-icon {
    color: var(--secondary);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.doc-group h3 svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.doc-info {
    flex-grow: 1;
}

.doc-title {
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-bottom: 0.2rem;
}

.doc-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Sidebar */
.sidebar-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    position: sticky;
    top: 120px;
}

.sidebar-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.sidebar-link {
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--surface-alt);
    color: var(--text-main);
    font-size: 0.95rem;
}

.sidebar-link:last-child {
    border-bottom: none;
}

.sidebar-link:hover {
    color: var(--accent);
    padding-left: 4px;
}

/* Footer */
footer {
    background: white;
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h5 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-light);
    max-width: 300px;
}

.footer-col h6 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-main);
    font-weight: 500;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 40px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        position: static;
        margin-top: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

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

/* Search Bar */
.search-container {
    margin-bottom: 1rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper svg {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.search-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Case Summary */
.case-summary {
    margin-bottom: 3rem;
    font-size: 1.05rem;
    color: var(--text-main);
}

.case-summary p {
    margin-bottom: 1.5rem;
}

.case-summary a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(14, 165, 233, 0.3);
}

.case-summary a:hover {
    text-decoration-color: var(--accent);
}

/* Prose Content - Improved Typography */
.prose-content {
    max-width: 70ch;
}

.prose-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* Shared Page Templates Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 3rem;
    max-width: 900px;
    margin: -60px auto 4rem;
    /* Overlap hero */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.doc-intro {
    padding: 0;
    margin-bottom: 3rem;
}

.doc-intro h3 {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
    line-height: 1.3;
}

.doc-intro p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.doc-intro p:last-child {
    margin-bottom: 0;
}

.doc-intro a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.doc-intro a:hover {
    color: var(--secondary);
}

/* Ensure search input looks good on glass card */
.search-wrapper input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(200, 200, 200, 0.4);
}