:root {
  /* Company theme colors */
  --primary: #21aad4;        /* Company blue */
  --secondary: #4a8c32;      /* Company green */
  --primary-dark: #1c96bc;   /* Darker blue for hover states */
  --secondary-dark: #3e7529; /* Darker green for accents */
  
  /* Professional palette */
  --text-primary: #1a1a1a;   /* Almost black for main text */
  --text-secondary: #4a5568; /* Professional gray */
  --text-light: #718096;     /* Light gray for meta text */
  
  /* Corporate backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  --card-bg: #ffffff;
  
  /* Borders and dividers */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e0;
  --divider: #edf2f7;
  
  /* Shadows - professional and subtle */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Layout */
  --max-width: 1200px;
  --radius: 8px;
  --radius-lg: 12px;
  
  /* Typography */
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Hero section - professional header */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 48px 40px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: var(--secondary);
  opacity: 0.1;
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-inner h1 {
  margin: 0 0 8px 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: white;
}

.meta {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

/* Table of contents - clean and organized */
.toc {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  border: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.toc h2 {
  margin: 0 0 24px 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: toc-counter;
}

.toc ol li {
  margin: 0 0 12px 0;
  counter-increment: toc-counter;
  position: relative;
  padding-left: 40px;
}

.toc ol li::before {
  content: counter(toc-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: var(--secondary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.toc a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.toc a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Terms article - professional document styling */
.terms {
  background: var(--card-bg);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

/* Section headings - corporate hierarchy */
.terms h2 {
  margin: 48px 0 24px 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius);
  position: relative;
}

.terms h2:first-of-type {
  margin-top: 0;
}

.terms h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 24px;
  width: 40px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

/* Subsection headings */
.terms h3 {
  color: var(--secondary-dark);
  margin: 32px 0 16px 0;
  font-size: 1.125rem;
  font-weight: 600;
  padding-left: 16px;
  border-left: 4px solid var(--secondary);
}

/* Paragraph styling */
.terms p {
  color: var(--text-primary);
  margin: 16px 0;
  line-height: 1.7;
  font-size: 1rem;
}

/* List styling - professional bullets */
.terms ul {
  margin: 16px 0;
  padding-left: 0;
  list-style: none;
}

.terms ul li {
  margin: 12px 0;
  padding-left: 32px;
  position: relative;
  color: var(--text-primary);
  line-height: 1.7;
}

.terms ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* Nested lists */
.terms ul ul {
  margin: 8px 0;
  padding-left: 24px;
}

.terms ul ul li::before {
  background: var(--secondary);
  width: 6px;
  height: 6px;
}

/* Important notices and warnings */
.warning, .notice {
  background: linear-gradient(135deg, rgba(33, 170, 212, 0.05) 0%, rgba(74, 140, 50, 0.05) 100%);
  border: 1px solid rgba(33, 170, 212, 0.2);
  border-left: 4px solid var(--primary);
  padding: 24px;
  border-radius: var(--radius);
  margin: 24px 0;
  position: relative;
}

.warning::before {
  content: 'ⓘ';
  position: absolute;
  top: 16px;
  left: 16px;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
}

.warning p {
  margin-left: 24px;
  color: var(--text-primary);
}

/* Address and contact information */
address {
  font-style: normal;
  color: var(--text-secondary);
  margin: 24px 0;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

address a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

address a:hover {
  text-decoration: underline;
}

/* Footer styling */
.terms-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--divider);
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
}

/* Links - professional styling */
a {
  color: var(--primary);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Time elements */
time {
  font-weight: 500;
}

/* Professional responsive design */
@media (max-width: 1024px) {
  .container {
    padding: 32px 20px 48px;
  }
  
  .terms {
    padding: 32px 24px;
  }
  
  .hero {
    padding: 36px 24px;
  }
}

@media (max-width: 768px) {
  .hero-inner h1 {
    font-size: 2rem;
  }
  
  .terms h2 {
    font-size: 1.25rem;
    padding: 12px 16px;
  }
  
  .toc {
    padding: 24px 20px;
  }
  
  .terms {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 16px 32px;
  }
  
  .hero {
    padding: 24px 16px;
  }
  
  .hero-inner h1 {
    font-size: 1.75rem;
  }
  
  .terms ul li {
    padding-left: 24px;
  }
  
  .toc ol li {
    padding-left: 32px;
  }
}

/* Print styles for professional documents */
@media print {
  :root {
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero {
    background: white;
    color: black;
    box-shadow: none;
    border: 2px solid black;
  }
  
  .terms h2 {
    background: white;
    color: black;
    border: 1px solid black;
  }
  
  .toc, .terms {
    box-shadow: none;
    border: 1px solid black;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .hero::before {
    display: none;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-light: #000000;
    --border-medium: #000000;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
}