/* Modern CSS Reset & Base Styles */



/* Box sizing reset */

*,

*::before,

*::after {

  box-sizing: border-box;

}



/* Remove default margins and padding */

* {

  margin: 0;

  padding: 0;

}



/* HTML and body setup */

html {

  scroll-behavior: smooth;

  font-size: 100%; /* 16px base */

  line-height: 1.5;

  -webkit-text-size-adjust: 100%;

  -moz-text-size-adjust: 100%;

  text-size-adjust: 100%;

}



body {

  font-family: var(--font-family-primary);

  font-size: var(--font-size-base);

  line-height: var(--line-height-normal);

  color: var(--color-text-primary);

  background-color: var(--color-bg-primary);

  font-weight: var(--font-weight-normal);

  font-synthesis: none;

  text-rendering: optimizeLegibility;

  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;

  overflow-x: hidden;

}



/* Remove list styles */

ol,

ul {

  list-style: none;

}



/* Remove default link styles */

a {

  color: inherit;

  text-decoration: none;

}



/* Improve media defaults */

img,

picture,

video,

canvas,

svg {

  display: block;

  max-width: 100%;

  height: auto;

}



/* Remove button styles */

button,

input,

textarea,

select {

  font: inherit;

  color: inherit;

  background: none;

  border: none;

  outline: none;

}



button {

  cursor: pointer;

}



/* Form elements */

input,

textarea,

select {

  border-radius: 0;

  -webkit-appearance: none;

  -moz-appearance: none;

  appearance: none;

}



/* Remove textarea resize handle in some browsers */

textarea {

  resize: vertical;

}



/* Improve table defaults */

table {

  border-collapse: collapse;

  border-spacing: 0;

}



/* Remove default fieldset styles */

fieldset {

  border: none;

}



/* Remove default legend styles */

legend {

  display: block;

  width: 100%;

  padding: 0;

  margin-bottom: var(--space-lg);

  font-size: var(--font-size-lg);

  line-height: inherit;

  border: 0;

}



/* Improve quote styles */

blockquote,

q {

  quotes: none;

}



blockquote::before,

blockquote::after,

q::before,

q::after {

  content: '';

  content: none;

}



/* Improve hr styles */

hr {

  height: 1px;

  border: none;

  background: var(--color-border-primary);

  margin: var(--space-2xl) 0;

}



/* Focus styles */

:focus {

  outline: 2px solid var(--color-primary);

  outline-offset: 2px;

}



:focus:not(:focus-visible) {

  outline: none;

}



:focus-visible {

  outline: 2px solid var(--color-primary);

  outline-offset: 2px;

}



/* Skip link for accessibility */

.skip-link {

  position: absolute;

  top: -40px;

  left: 6px;

  background: var(--color-bg-primary);

  color: var(--color-text-primary);

  padding: var(--space-sm) var(--space-lg);

  border-radius: var(--radius-md);

  text-decoration: none;

  z-index: var(--z-modal);

  transition: top var(--duration-normal) var(--ease-out);

}



.skip-link:focus {

  top: 6px;

}



/* Screen reader only content */

.sr-only {

  position: absolute;

  width: 1px;

  height: 1px;

  padding: 0;

  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;

}



/* High contrast mode support */

@media (prefers-contrast: high) {

  :root {

    --color-border-primary: rgba(255, 255, 255, 0.3);

    --color-bg-card: rgba(255, 255, 255, 0.1);

  }

}



/* Reduced motion support */

@media (prefers-reduced-motion: reduce) {

  *,

  *::before,

  *::after {

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;

  }

}



/* Print styles */

@media print {

  *,

  *::before,

  *::after {

    background: transparent !important;

    color: black !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) ")";

  }

  

  a[href^="#"]:after,

  a[href^="javascript:"]:after {

    content: "";

  }

  

  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;

  }

}