/* ============================================================
   MESH Public Website CSS Stylesheet
   Theme: Sleek Dark Mode with HSL Tailored Colors & Khmer-First Typography
   ============================================================ */

/* Import Google Fonts (Outfit and Inter) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Kantumruy+Pro:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette (HSL Tailored) */
  --bg-primary: hsl(222, 47%, 11%);
  --bg-secondary: hsl(223, 47%, 16%);
  --bg-tertiary: hsl(224, 47%, 21%);
  
  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 75%);
  --text-muted: hsl(215, 16%, 55%);
  
  --primary: hsl(263, 90%, 65%);
  --primary-hover: hsl(263, 95%, 70%);
  --primary-glow: hsla(263, 90%, 65%, 0.3);
  
  --secondary: hsl(190, 95%, 45%);
  --secondary-hover: hsl(190, 100%, 50%);
  
  --accent: hsl(342, 90%, 60%);
  --success: hsl(142, 70%, 45%);
  --warning: hsl(38, 92%, 50%);
  
  --border-color: hsla(217, 30%, 60%, 0.15);
  --border-focus: hsla(263, 90%, 65%, 0.5);
  
  /* Typography */
  --font-en: 'Outfit', 'Inter', sans-serif;
  --font-kh: 'Kantumruy Pro', 'Inter', sans-serif;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  
  /* Animations */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-en);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Khmer Language Specific Font Mapping */
body.lang-km {
  font-family: var(--font-kh);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

/* Grid & Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-spacing {
  padding: 6rem 0;
}

.text-center {
  text-align: center;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-accent-text {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation Header */
header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary);
}

.logo-badge {
  font-size: 0.65rem;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.15rem 0.4rem;
  border-radius: 99px;
  vertical-align: middle;
  font-weight: 600;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

nav a:hover, nav a.active {
  color: var(--primary-hover);
  text-shadow: 0 0 10px var(--primary-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-btn:hover {
  background: var(--border-color);
  border-color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px hsla(263, 90%, 65%, 0.45);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

/* Main Layout Offset */
main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 300px);
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding: 8rem 0 6rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Sections General Header */
.section-header {
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-focus);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 1px var(--primary-glow);
}

.feature-card .icon-wrapper {
  background: var(--bg-tertiary);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  border: 1px solid var(--border-color);
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Why MESH Grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.why-card {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(22, 28, 45, 0.5) 100%);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}

.why-card .why-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.why-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.why-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Large CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.05) 0%, rgba(0, 0, 0, 0) 50%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-box p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Download Page Specifics */
.download-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.installer-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
}

.installer-card .badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--success);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  text-transform: uppercase;
}

.installer-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.installer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.meta-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.meta-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-item .value {
  font-size: 1.05rem;
  font-weight: 600;
}

.installer-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.option-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.option-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.option-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Requirements Table */
.req-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg-secondary);
}

th, td {
  padding: 1.25rem 1.5rem;
}

th {
  background: var(--bg-tertiary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-color);
}

td .spec-name {
  font-weight: 600;
  color: var(--text-primary);
}

/* Guide List */
.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.step-card {
  position: relative;
  padding-left: 3.5rem;
}

.step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 45px;
  height: 45px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
}

.step-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Pricing Page Specifics */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-smooth);
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 10px 30px var(--primary-glow);
  transform: translateY(-8px);
}

.pricing-card.popular::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.25rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  text-transform: uppercase;
}

.pricing-card.premium {
  border-color: var(--warning);
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.15);
  transform: translateY(-8px);
}

.pricing-card.premium::before {
  content: 'Best Value';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warning);
  color: #0b0f1a;
  padding: 0.25rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  text-transform: uppercase;
}

/* License Toggle Selector */
.license-selector {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.selector-option {
  flex: 1;
  text-align: center;
  position: relative;
  cursor: pointer;
}

.selector-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.selector-label {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.selector-option input[type="radio"]:checked + .selector-label {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.pricing-card.premium .selector-option input[type="radio"]:checked + .selector-label {
  background: var(--warning);
  color: #0b0f1a;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.pricing-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pricing-header .desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  height: 40px;
}

.price-box {
  display: flex;
  align-items: baseline;
  margin-bottom: 2rem;
}

.price-box .currency {
  font-size: 1.5rem;
  font-weight: 700;
}

.price-box .amount {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.price-box .period {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 3rem;
  flex-grow: 1;
}

.pricing-features li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-features li::before {
  content: '✓';
  color: var(--secondary);
  font-weight: 900;
}

.pricing-features li.disabled {
  color: var(--text-muted);
  text-decoration: line-through;
}

.pricing-features li.disabled::before {
  content: '✗';
  color: var(--accent);
}

/* Help Center Accordion */
.help-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.help-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 2rem;
}

.help-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  color: var(--secondary);
}

.accordion-item {
  border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  text-align: left;
  padding: 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header::after {
  content: '+';
  font-size: 1.4rem;
  transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-header::after {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth);
}

.accordion-content p {
  padding-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Contact Form & Info */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.channel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.channel-card .icon {
  font-size: 2rem;
  color: var(--primary);
}

.channel-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.channel-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-form-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3rem;
  border-radius: 16px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Feedback messages */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: none;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* Footer styling */
footer {
  background: hsl(223, 47%, 7%);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Release notes styling */
.release-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border-color);
}

.release-item {
  position: relative;
  margin-bottom: 4rem;
}

.release-item::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 6px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-primary);
}

.release-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.release-tag {
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
}

.release-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.release-body {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 12px;
}

.release-body h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.release-body ul {
  list-style-position: inside;
  margin-bottom: 1rem;
}

.release-body ul li {
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
}

/* Responsive Rules */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .download-hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  header {
    height: 70px;
  }
  main {
    margin-top: 70px;
  }
  .menu-toggle {
    display: flex;
  }
  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem;
  }
  nav.open {
    display: block;
  }
  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.5rem;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  .section-spacing {
    padding: 4rem 0;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-card.popular {
    transform: none;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .installer-options {
    grid-template-columns: 1fr;
  }
}

/* Badges System */
.badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-latest {
  background: var(--primary-glow);
  color: var(--primary-hover);
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.badge-stable {
  background: rgba(16, 185, 129, 0.1);
  color: hsl(142, 70%, 55%);
  border-color: var(--success);
}

.badge-beta {
  background: rgba(245, 158, 11, 0.1);
  color: hsl(38, 92%, 55%);
  border-color: var(--warning);
}

.badge-preview {
  background: rgba(14, 165, 233, 0.1);
  color: var(--secondary-hover);
  border-color: var(--secondary);
}

.badge-deprecated {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-muted);
  border-color: var(--text-muted);
}

/* Download Grid & Cards (Build 020) */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.download-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-smooth);
}

.download-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-focus);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.download-card.featured {
  border-color: var(--primary);
  box-shadow: 0 10px 30px var(--primary-glow);
}

.download-card.highlight {
  border-color: hsl(45, 90%, 50%);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
}

.card-header {
  margin-bottom: 2rem;
}

.card-header h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.edition-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  height: 48px;
}

.edition-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.badge-free {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.badge-popular {
  background: var(--primary-glow);
  color: hsl(263, 95%, 75%);
  border-color: var(--primary);
}

.badge-best-value {
  background: rgba(245, 158, 11, 0.15);
  color: hsl(45, 95%, 65%);
  border-color: hsl(45, 92%, 50%);
}

.card-meta {
  margin-bottom: 2.5rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-row .label {
  color: var(--text-muted);
}

.meta-row .value {
  font-weight: 600;
}

.card-actions {
  margin-top: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-full {
  width: 100%;
}

.release-notes-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  display: inline-block;
}

.release-notes-link:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
}

/* Download Counter */
.download-counter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(22, 28, 45, 0.4) 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-top: 1.5rem;
}

.counter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.counter-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary);
  background: linear-gradient(135deg, var(--secondary-hover) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Comparison Table feature symbols */
.feature-check {
  color: var(--success);
  font-weight: 800;
  font-size: 1.2rem;
}

.feature-cross {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 1.1rem;
}

/* Make comparison table responsive on mobile screen sizes */
@media (max-width: 768px) {
  .download-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Make table scrollable or format for cards */
  .download-comparison table {
    display: block;
    width: 100%;
  }
  
  .download-comparison thead {
    display: none; /* Hide standard headers for mobile layout */
  }
  
  .download-comparison tr {
    display: grid;
    grid-template-columns: 1fr;
    border-bottom: 1.5px solid var(--border-color);
    padding: 1rem 0;
  }
  
  .download-comparison td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none !important;
    padding: 0.5rem 1rem;
    text-align: left !important;
    background: none !important;
  }
  
  .download-comparison td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 1rem;
  }
  
  /* Add custom cell titles on mobile using CSS content */
  .download-comparison td:nth-child(1) {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
    display: block;
    text-align: center !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .download-comparison td:nth-child(1)::before {
    content: none;
  }
  
  .download-comparison td:nth-child(2)::before { content: 'Free:'; }
  .download-comparison td:nth-child(3)::before { content: 'Plus:'; }
  .download-comparison td:nth-child(4)::before { content: 'Pro:'; }
}

/* Reusable MESH branding styles */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: scale(1.05);
}

.brand-logo-sm {
  height: 28px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

.brand-logo-lg {
  height: 96px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 1.5rem auto;
  display: block;
}

.brand-wordmark {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: var(--font-en);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.brand-wordmark span {
  color: var(--primary);
}

@media (max-width: 768px) {
  .brand-logo {
    height: 32px;
  }
}


