/**
 * ============================================
 * Normalize.css - Modern CSS Reset
 * ============================================
 * 
 * A modern, opinionated CSS reset that provides
 * consistent cross-browser styling defaults.
 * 
 * Based on: normalize.css + modern best practices
 * Last Updated: 2024
 * Version: 2.0.0
 */

/* ============================================
   Box Sizing
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================
   Document
   ============================================ */
html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

/* ============================================
   Sections
   ============================================ */
body {
    margin: 0;
    font-family: var(--font-family-primary, sans-serif);
    font-size: var(--font-size-base, 1rem);
    font-weight: var(--font-weight-normal, 400);
    line-height: var(--line-height-normal, 1.5);
    color: var(--text-primary, #1f2937);
    background-color: var(--bg-primary, #ffffff);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ============================================
   Grouping Content
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-family-heading, sans-serif);
    font-weight: var(--font-weight-bold, 700);
    line-height: var(--line-height-tight, 1.2);
    color: var(--text-primary, #1f2937);
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

dl {
    margin: 0;
}

dd {
    margin: 0;
}

/* ============================================
   Text-level Semantics
   ============================================ */
a {
    background-color: transparent;
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast, 0.15s ease);
}

a:hover {
    color: var(--hover-text, #9333ea);
}

abbr[title] {
    border-bottom: none;
    text-decoration: underline;
    text-decoration: underline dotted;
}

b, strong {
    font-weight: var(--font-weight-bold, 700);
}

code, kbd, samp {
    font-family: var(--font-family-mono, monospace);
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* ============================================
   Embedded Content
   ============================================ */
img {
    border-style: none;
    max-width: 100%;
    height: auto;
    display: block;
}

svg {
    display: block;
    vertical-align: middle;
}

/* ============================================
   Forms
   ============================================ */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    padding: 0.35em 0.75em 0.625em;
    margin: 0;
    border: 0;
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

textarea {
    overflow: auto;
    resize: vertical;
}

[type="checkbox"],
[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

/* ============================================
   Interactive Elements
   ============================================ */
details {
    display: block;
}

summary {
    display: list-item;
    cursor: pointer;
}

/* ============================================
   Accessibility
   ============================================ */
[hidden] {
    display: none !important;
}

:focus {
    outline: 2px solid var(--border-focus, #9333ea);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--border-focus, #9333ea);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]::after {
        content: " (" attr(title) ")";
    }
    
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr,
    img {
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
}
