:root {
    /* Primary palette - inspired by football pitch greens and stadium atmosphere */
    --color-primary: #1a472a;
    --color-primary-light: #2d6a4f;
    --color-primary-dark: #0d2818;

    /* Accent - golden trophy/winner colors */
    --color-accent: #d4a012;
    --color-accent-light: #f0c040;
    --color-accent-dark: #a67c00;

    /* Neutrals */
    --color-bg: #fafafa;
    --color-bg-alt: #f0f2f5;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-muted: #5a5a6e;
    --color-text-light: #8a8a9e;
    --color-border: #e0e4e8;

    /* Semantic colors */
    --color-success: #2d6a4f;
    --color-warning: #d4a012;
    --color-info: #1e5f8a;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(26, 71, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 71, 42, 0.12);
    --shadow-lg: 0 8px 30px rgba(26, 71, 42, 0.16);
    --shadow-accent: 0 4px 20px rgba(212, 160, 18, 0.25);

    /* Typography */
    --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Consolas', monospace;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Layout */
    --content-width: 75ch;
    --wide-width: 90ch;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: rgb(121, 183, 34);
        --color-primary-light: rgb(150, 237, 28);
    }  
}

/* Reset and base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

::selection {
    background: var(--color-primary);
    color: white;
}

.breadcrumbs {
   
    align-items: center;
    margin: 25px 0;
    gap: 7px;        
}

.breadcrumbs a {
    color: #d4a012;
    text-decoration: none;
    font-size: 18px;
}

.breadcrumbs a:hover {
    color: #ab8829;
}

nav a {
    font-size: 1rem;
    transition: all var(--transition-fast);
}

nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

nav a:hover::after {
    width: 80%;
}

.nav-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-panel {
    padding-left: 15px;
}

.nav-panel li {
    
    padding-left: var(--space-sm); 
}

.nav-panel li::before {
    content: '';
    position: absolute;
    left: calc(-0.7 * var(--space-lg));
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border-radius: 50%;

}

.nav-panel a {
    position: relative;
    color: #1d8224;
}

/* Main content */
main {
    flex: 1;
    width: 100%;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
}


/* Hero image */
.hero-image {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
    display: block;
}

/* Article content area */
.article-content {
    padding: var(--space-2xl) var(--space-xl);
    max-width: var(--content-width);
    margin: 0 auto;
}

@media (max-width: 768px) {
    .article-content {
        padding: var(--space-xl) var(--space-lg);
    }
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.75rem);
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2, .toc-wrap__title {
    font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
    width: 100%;
}

h3 {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

h4 {
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

/* Paragraphs */
p {
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    text-align: justify;
    hyphens: auto;
}

p:last-child {
    margin-bottom: 0;
}

/* Links within content */
article a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

article a:hover {
    color: var(--color-accent-dark);
    text-decoration-color: var(--color-primary);
}

/* Strong and emphasis */
strong {
    font-weight: 600;
    color: var(--color-text);
}

em {
    font-style: italic;
    color: var(--color-text-muted);
}

li::marker {
    color: var(--color-accent);
    font-weight: 700;
}

ul li {
    list-style-type: none;
    position: relative;
}

ol li {
    list-style-type: none;

}

ol li::before {
    content: counter(item) ".";
    position: absolute;
    left: calc(-1 * var(--space-xl));
    color: var(--color-accent);
    font-weight: 700;
}

/* Nested lists */
li>ul,
li>ol {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
}

/* Blockquote */
blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-surface) 100%);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-text-muted);
    position: relative;
}

blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    color: var(--color-accent);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

blockquote p {
    margin-bottom: var(--space-sm);
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Figures and images */
figure {
    margin: var(--space-2xl) 0;
}

.hero-image, .article-image {
    margin: 55px 0;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.article-image:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-lg);
}

img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

figcaption {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: center;
    font-style: italic;
}

/* Tables */
table {
    width: 100%;
    margin: var(--space-xl) 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

tr:hover td {
    background: var(--color-bg-alt);
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--color-bg-alt);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
}

pre {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--color-primary-dark);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Horizontal rule */
hr {
    margin: var(--space-2xl) 0;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--color-border) 20%, var(--color-accent) 50%, var(--color-border) 80%, transparent 100%);
}

.toc ul {
    margin: 0;
    padding-left: var(--space-lg);
}

.toc li::before {
    background: var(--color-primary);
    width: 6px;
    height: 6px;
}

/* Info boxes */
.info-box {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
    border-left: 4px solid;
}

.info-box.tip {
    background: rgba(45, 106, 79, 0.1);
    border-color: var(--color-success);
}

.info-box.warning {
    background: rgba(212, 160, 18, 0.1);
    border-color: var(--color-warning);
}

.info-box.info {
    background: rgba(30, 95, 138, 0.1);
    border-color: var(--color-info);
}

/* FAQ section styling */
details {
    margin-bottom: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--transition-base);
}

details:hover {
    box-shadow: var(--shadow-sm);
}

details[open] {
    box-shadow: var(--shadow-md);
}

summary {
    padding: var(--space-lg);
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: background var(--transition-fast);
}

summary:hover {
    background: var(--color-bg-alt);
}

summary::marker {
    display: none;
}

summary::before {
    content: '+';
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

details[open] summary::before {
    content: '-';
    transform: rotate(180deg);
}

details>div {
    padding: 0 var(--space-lg) var(--space-lg);
}


footer a:hover {
    color: white;
}

/* Utility classes for content */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-accent {
    color: var(--color-accent);
}

.text-primary {
    color: var(--color-primary);
}

/* Reading progress indicator */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    z-index: 1000;
    transition: width 100ms linear;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Print styles */
@media print {

    header,
    footer,
    .progress-bar,
    .back-to-top {
        display: none;
    }

    main {
        padding: 0;
    }

    article {
        box-shadow: none;
    }

    h2 {
        break-after: avoid;
    }

    figure,
    blockquote {
        break-inside: avoid;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: currentColor;
    }

    h2 {
        border-bottom-width: 4px;
    }

    blockquote {
        border-left-width: 6px;
    }
}