:root { 
  --bg:#0B0C0F; 
  --fg:#fff; 
  --mut:#bfbfc9; 
  --card:#15161b; 
  --line:#24252c; 
}

* { 
  box-sizing: border-box; 
}

body { 
  margin:0; 
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; 
  background:var(--bg); 
  color:var(--fg);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

a { 
  color: inherit; 
  text-decoration: none; 
}

.container { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 20px;
  width: 100%;
  overflow-x: hidden;
}

header { 
  position: sticky; 
  top:0; 
  background:rgba(11,12,15,.8); 
  backdrop-filter: blur(8px); 
  border-bottom:1px solid var(--line); 
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  position: relative;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.logo-section img {
  height: 40px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text .muted {
  font-size: 12px;
}

.logo-text strong {
  font-size: 14px;
  line-height: 1.2;
}

/* Navigation styles */
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a { 
  padding: 10px 14px; 
  border-radius: 999px; 
  display: inline-flex; 
  gap: 8px; 
  align-items: center; 
  font-size: 14px; 
  color: #e6e6ea; 
  white-space: nowrap;
}

nav a.active, nav a:hover { 
  background: #fff; 
  color: #000; 
}

.badge-section {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 12px;
  border-radius: 6px;
  transition: background 0.3s ease;
  min-width: 48px;
  min-height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 1000;
  position: relative;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active,
.mobile-menu-btn:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

#menu-icon {
  display: block;
  line-height: 1;
  pointer-events: none;
}

/* Mobile navigation overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--line);
  transition: right 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.mobile-nav-header strong {
  color: #F68318;
  font-size: 18px;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-links {
  padding: 20px;
  flex: 1;
}

.mobile-nav-links a {
  display: block;
  padding: 15px 0;
  color: #e6e6ea;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-nav-links a:last-child {
  border-bottom: none;
}

.mobile-nav-links a.active,
.mobile-nav-links a:hover {
  color: #F68318;
  background: rgba(246, 131, 24, 0.1);
  padding-left: 10px;
}

.mobile-nav-links a.active:before {
  content: '▶';
  position: absolute;
  left: -10px;
  color: #F68318;
}

.mobile-badges {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.mobile-badges .badge {
  display: block;
  margin-bottom: 10px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
}

.kicker { 
  color: #a8a8b5; 
  text-transform: uppercase; 
  letter-spacing: .2em; 
  font-size: 12px; 
  margin-bottom: 6px; 
}

h1 { 
  font-size: 34px; 
  margin: 14px 0; 
}

h2 { 
  font-size: 26px; 
  margin: 18px 0 10px; 
}

h3 { 
  font-size: 18px; 
  margin: 12px 0 8px; 
}

p, li { 
  color: #d7d7de; 
  line-height: 1.6; 
}

section { 
  padding: 32px 0; 
  border-bottom: 1px solid var(--line); 
}

.grid { 
  display: grid; 
  gap: 14px; 
}

.grid-2 { 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
}

.grid-3 { 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
}

.card { 
  background: var(--card); 
  border: 1px solid var(--line); 
  border-radius: 16px; 
  padding: 16px; 
}

.badge { 
  display: inline-flex; 
  padding: 6px 10px; 
  font-size: 12px; 
  border: 1px solid var(--line); 
  border-radius: 999px; 
  color: #e6e6ea; 
  margin-right: 8px; 
}

footer { 
  background: #0f1014; 
  border-top: 1px solid var(--line); 
  padding: 36px 0; 
  font-size: 14px; 
}

ul.inline { 
  list-style: disc; 
  padding-left: 18px; 
}

ol.inline { 
  padding-left: 18px; 
}

.muted { 
  color: #a8a8b5; 
  font-size: 14px; 
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  .container {
    padding: 0 15px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .header-content {
    padding: 10px 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  
  /* Hide desktop navigation on mobile */
  nav {
    display: none !important;
  }
  
  .badge-section {
    display: none !important;
  }
  
  /* Show mobile menu button */
  .mobile-menu-btn {
    display: block !important;
    flex-shrink: 0;
  }
  
  /* Mobile navigation is always ready to show on mobile */
  
  /* Adjust logo section for mobile */
  .logo-section {
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  
  .logo-section img {
    height: 32px;
    flex-shrink: 0;
  }
  
  .logo-text {
    min-width: 0;
    overflow: hidden;
  }
  
  .logo-text strong {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .logo-text .muted {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Typography adjustments for mobile */
  h1 {
    font-size: 28px;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 22px;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 16px;
  }
  
  section {
    padding: 24px 0;
  }
  
  .card {
    padding: 14px;
  }
  
  /* Grid adjustments for mobile */
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Footer adjustments */
  footer {
    padding: 24px 0;
    font-size: 12px;
  }
  
  footer .grid-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  footer .container > div:last-child {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  .container {
    padding: 0 10px;
    max-width: 100% !important;
    overflow-x: hidden;
  }
  
  .header-content {
    max-width: 100%;
    overflow: hidden;
  }
  
  .logo-text strong {
    font-size: 11px;
    max-width: 180px;
  }
  
  .logo-text .muted {
    font-size: 9px;
    max-width: 180px;
  }
  
  h1 {
    font-size: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  h2 {
    font-size: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .card {
    padding: 12px;
    overflow-x: hidden;
    word-wrap: break-word;
  }
  
  section {
    padding: 20px 0;
    overflow-x: hidden;
  }
  
  .badge {
    font-size: 10px;
    padding: 4px 8px;
  }
  
  /* Force all elements to respect container width */
  * {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  table {
    width: 100%;
    table-layout: fixed;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }
  
  nav a {
    font-size: 13px;
    padding: 8px 12px;
  }
  
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Large screen optimizations */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
  
  h1 {
    font-size: 38px;
  }
  
  h2 {
    font-size: 30px;
  }
}