* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background: #0f172a;
  margin: 0;
  padding: 0;
  color: #f8fafc;
}

.guia-wrap {
  background: #0f172a;
  min-height: 100vh;
}

/* Header & Nav from index.html */
header {
  padding: 1.5rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  header {
    backdrop-filter: none;
    background: #0f172a;
  }
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1550px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
}

@media (max-width: 768px) {
  header {
    padding: 1rem 0;
  }
  header nav {
    padding: 0 1.25rem;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  flex: 1;
}

.logo-icon img {
  height: clamp(28px, 6vw, 32px);
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-text {
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  color: #f8fafc;
}

.logo-text span {
  color: #06b6d4;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(0.5rem, 3vw, 2rem);
  align-items: center;
  justify-content: center;
}

.nav-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex: 1;
}

.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
  font-size: clamp(0.85rem, 3.5vw, 1rem);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #f8fafc;
}

/* ===== NAV DROPDOWN ===== */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
    background: transparent; border: none; cursor: pointer; color: #94a3b8;
    font-weight: 500; font-size: clamp(0.85rem, 3.5vw, 1rem); display: flex; align-items: center;
    gap: 0.3rem; padding: 0; white-space: nowrap; transition: color 0.3s; font-family: 'Inter', sans-serif;
}
.nav-dropdown-btn:hover, .nav-dropdown.open .nav-dropdown-btn { color: #f8fafc; }
.dropdown-arrow { transition: transform 0.3s ease; flex-shrink: 0; }
.nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
    list-style: none; position: absolute; top: calc(100% + 0.75rem); right: -60px; min-width: 240px;
    background: rgba(15, 23, 42, 0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 0.5rem; display: flex;
    flex-direction: column; gap: 0.15rem; opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s; z-index: 500;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
@media (min-width: 769px) {
    .nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
}
.nav-dropdown-menu li a {
    display: block; padding: 0.65rem 1rem; border-radius: 10px; color: #94a3b8;
    text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: background 0.2s, color 0.2s; white-space: nowrap;
}
.nav-dropdown-menu li a:hover, .nav-dropdown-menu li a.active { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }

[data-theme="light"] .nav-dropdown-menu { background: rgba(255,255,255,0.98); border-color: rgba(14, 165, 233, 0.2); box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
[data-theme="light"] .nav-dropdown-menu li a:hover, [data-theme="light"] .nav-dropdown-menu li a.active { background: rgba(14, 165, 233, 0.1); color: #0369a1; }
[data-theme="light"] .nav-dropdown-btn { color: #475569; }
[data-theme="light"] .nav-dropdown-btn:hover, [data-theme="light"] .nav-dropdown.open .nav-dropdown-btn { color: #0f172a; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background: #f8fafc;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

/* Guide original styles */
.g-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.g-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  transition: width 0.1s;
}

.g-hero {
  padding: 140px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.g-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 500;
  line-height: 1.1;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 16px;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.g-hero p {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: #94a3b8;
  line-height: 1.6;
  max-width: 800px;
  margin: 0;
  opacity: 0.9;
}

.g-hero em {
  font-style: normal;
  color: #cbd5e1;
}

/* Hero badge & accent (que-es-el-gpa style) */
.g-hero-badge {
  display: inline-block;
  background: rgba(165, 180, 252, 0.1);
  border: 1px solid rgba(165, 180, 252, 0.22);
  color: #a5b4fc;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.g-hero-accent {
  color: #38bdf8;
  display: block;
}

[data-theme="light"] .g-hero-badge {
  background: rgba(99, 120, 200, 0.07);
  border-color: rgba(99, 120, 200, 0.18);
  color: #6b7eb9;
}

[data-theme="light"] .g-hero-accent {
  color: #0369a1;
}



.g-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 24px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(15, 23, 42, 0.3);
}

.g-back-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38bdf8;
  transform: translateX(-5px);
}

.g-back-arrow {
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
}


.g-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 60px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.g-article {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px;
}

.g-section {
  margin-bottom: 36px;
}

.g-h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #f8fafc;
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 3px solid #6366f1;
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
}

.g-p {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 20px;
}

.g-article strong {
  color: #cbd5e1;
}

.g-h3 {
  color: #cbd5e1;
  margin: 1.5rem 0 0.5rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

.g-formula {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.95rem;
  color: #38bdf8;
}

.g-formula strong {
  display: block;
  color: #38bdf8;
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}

.g-success {
  background: rgba(16, 185, 129, 0.05);
  border-left: 3px solid #10b981;
  border-radius: 0 8px 8px 0;
  padding: 12px 20px;
  margin: 20px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #34d399;
}

.g-highlight {
  background: rgba(99, 102, 241, 0.05);
  border-left: 3px solid #6366f1;
  border-radius: 0 8px 8px 0;
  padding: 12px 20px;
  margin: 20px 0;
  font-size: 1rem;
  font-weight: 500;
  color: #818cf8;
}

.g-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 120px;
}

.g-sidebar-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
}

.g-tips-list {
  list-style: none;
  padding: 0;
}

.g-tip-item {
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 10px;
}

.g-sidebar-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: #f8fafc;
  margin-bottom: 18px;
  font-family: 'Outfit', sans-serif;
}

.g-faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 14px 0;
  cursor: pointer;
}

.g-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.g-faq-q {
  font-size: 1rem;
  font-weight: 500;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  user-select: none;
}

.g-faq-q span {
  font-size: 1.2rem;
  opacity: 0.6;
  font-weight: 400;
  transition: transform 0.3s;
}

.g-faq-item:hover .g-faq-q {
  color: #cbd5e1;
}

.g-faq-a {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-top: 8px;
  display: none;
}

.g-faq-item.open .g-faq-q {
  color: #38bdf8;
}

.g-faq-item.open .g-faq-q span {
  transform: rotate(45deg);
  opacity: 1;
}

.g-faq-item.open .g-faq-a {
  display: block;
}

.g-cta {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}

.g-cta-title {
  font-size: 1.3rem;
  font-weight: 500;
  color: #f8fafc;
  margin-bottom: 10px;
  font-family: 'Outfit', sans-serif;
}

.g-cta-p {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 20px;
  line-height: 1.6;
}

.g-cta-btn {
  display: inline-block;
  background: #6366f1;
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: 100%;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.g-cta-btn:hover {
  background: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4rem;
  padding: 2.5rem 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: #94a3b8;
}

.logo-footer .logo-icon img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-footer .logo-text,
.logo-footer .logo-text span {
  color: #94a3b8;
}

.footer-copy {
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
  flex: 1;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #f8fafc;
}

/* logo footer */
.logo-footer .logo-text-footer {
  font-size: 1.0em;
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .g-content {
    grid-template-columns: 1fr;
  }

  .g-sidebar {
    position: static;
  }

  .g-hero {
    padding: 32px;
    margin: 100px 24px 32px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    text-align: left;
  }

  .g-hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    margin-bottom: 12px;
  }

  .g-hero p {
    font-size: 1.05rem;
    line-height: 1.5;
  }

  .g-back-btn {
    width: 100%;
    justify-content: center;
    margin-top: 24px;
  }

  .g-content {
    padding: 0 24px 48px;
  }

  .g-article {
    padding: 24px;
  }

  /* Compact Dropdown Mobile Menu */
  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    height: auto;
    width: 210px;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    flex-direction: column;
    padding: 0.6rem;
    gap: 0.1rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 0.92rem;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid transparent;
    color: #94a3b8;
    display: block;
    line-height: 1.2;
    white-space: normal;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(6, 182, 212, 0.08);
    color: #f8fafc;
    border-color: rgba(6, 182, 212, 0.1);
  }

  /* Botón "Guías de uso ▾" centrado */
  .nav-dropdown-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.92rem;
    transition: all 0.2s;
  }

  .nav-dropdown.open .nav-dropdown-btn {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.15);
    color: #f8fafc;
  }

  /* Submenú de guías centrado */
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    margin: 0;
    border-radius: 14px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    width: 100%;
    min-width: auto;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 500px;
    padding-top: 0.2rem;
  }

  .nav-dropdown-menu li a {
    font-size: 0.85rem;
    padding: 0.65rem 0.8rem;
    text-align: center;
    border: none;
    border-left: none;
    border-radius: 10px;
    margin: 0;
    margin-left: 0;
    color: #94a3b8;
    display: block;
    line-height: 1.3;
    white-space: normal;
  }

  .nav-dropdown-menu li a:hover {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: #06b6d4;
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: #06b6d4;
  }
}

@media (max-width: 600px) {
  /* Mobile footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-copy {
    flex: none;
  }

  .footer-links {
    margin-left: 0;
    justify-content: center;
    width: 100%;
  }
}

/* CTA Cards for Article conversion */
.cta-inline-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  padding: 30px;
  margin: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

.cta-inline-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inline-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  color: #f8fafc;
  margin-bottom: 12px;
}

.cta-inline-card p {
  color: #94a3b8;
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.cta-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #6366f1;
  color: white;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.cta-inline-btn:hover {
  background: #4f46e5;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.cta-inline-btn svg {
  width: 20px;
  height: 20px;
}

/* ===== GPA TABLE (que-es-el-gpa) ===== */
.table-container {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gpa-table {
  width: 100%;
  border-collapse: collapse;
  color: #94a3b8;
  font-size: 0.95rem;
}

.gpa-table thead tr {
  background: rgba(99, 102, 241, 0.12);
}

.gpa-table th {
  padding: 12px 14px;
  text-align: left;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.gpa-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.5;
  vertical-align: top;
}

.gpa-table tbody tr:last-child td {
  border-bottom: none;
}

.gpa-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Light mode table */
[data-theme="light"] .gpa-table {
  color: #475569;
}
[data-theme="light"] .gpa-table thead tr {
  background: rgba(99, 102, 241, 0.08);
}
[data-theme="light"] .gpa-table th {
  color: #1e293b;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .gpa-table td {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .table-container {
  border-color: rgba(0, 0, 0, 0.08);
}

/* Stacked table on very small screens */
@media (max-width: 480px) {
  .gpa-table,
  .gpa-table thead,
  .gpa-table tbody,
  .gpa-table th,
  .gpa-table td,
  .gpa-table tr {
    display: block;
  }

  .gpa-table thead tr {
    display: none; /* hide headers */
  }

  .gpa-table tbody tr {
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
  }

  .gpa-table td {
    position: relative;
    padding: 10px 12px 10px 45%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 40px;
  }

  .gpa-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 10px;
    width: 42%;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .gpa-table tbody tr:last-child td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .gpa-table tbody tr:last-child td:last-child {
    border-bottom: none;
  }

  [data-theme="light"] .gpa-table tbody tr {
    border-color: rgba(0, 0, 0, 0.08);
  }
  [data-theme="light"] .gpa-table td::before {
    color: #1e293b;
  }
}

/* ===== RESPONSIVE LISTS (g-list) ===== */
.g-list {
  padding-left: 0;
  list-style: none;
  margin: 0 0 20px 0;
}

.g-list li {
  padding: 8px 0 8px 1.4rem;
  position: relative;
  line-height: 1.7;
  color: #94a3b8;
  font-size: 1.05rem;
}

.g-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #6366f1;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.7;
}

[data-theme="light"] .g-list li {
  color: #475569;
}

/* =============================================
   Estilos específicos para Tabla de letras (dentro de FAQ)
   ============================================= */

.letters-grid-wrapper {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.letters-table {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
}

.letters-table-head {
    display: grid;
    grid-template-columns: 90px 1fr 1fr 1fr 1fr;
    padding: 10px 16px;
    background: rgba(255,255,255,0.06);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim, #94a3b8);
    gap: 8px;
}

.letter-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr 1fr 1fr;
    padding: 8px 16px;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    border-top: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s ease;
}

.letter-row:hover { background: rgba(255,255,255,0.03); }

.letter-row span { color: var(--text-dim, #94a3b8); font-weight: 500; }
.letter-row .range { color: var(--text-dim, #94a3b8); opacity: 0.6; font-size: 0.78rem; }

/* Letter badges */
.letter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    width: 36px;
    height: 28px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
}

.grade-a-plus .letter-badge,
.grade-a .letter-badge      { background: rgba(34,197,94,0.15);  color: #4ade80; }
.grade-b .letter-badge      { background: rgba(59,130,246,0.15); color: #60a5fa; }
.grade-c .letter-badge      { background: rgba(234,179,8,0.15);  color: #facc15; }
.grade-d .letter-badge      { background: rgba(249,115,22,0.15); color: #fb923c; }
.grade-f .letter-badge      { background: rgba(239,68,68,0.15);  color: #f87171; }

.grade-pending { background: rgba(6,182,212,0.04); }
.pending-badge {
    background: rgba(6,182,212,0.12) !important;
    color: #22d3ee !important;
    font-size: 0.7rem !important;
    width: auto !important;
    padding: 4px 8px;
    white-space: nowrap;
}

.pending-note {
    grid-column: span 4;
    font-size: 0.8rem;
    color: #22d3ee !important;
    font-style: italic;
}

/* Pending explainer box */
.pending-explainer {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    background: rgba(6,182,212,0.06);
    border: 1px solid rgba(6,182,212,0.18);
    border-radius: 12px;
    font-size: 0.875rem;
}

.pending-explainer-icon {
    color: #22d3ee;
    flex-shrink: 0;
    margin-top: 2px;
}

.pending-explainer strong {
    display: block;
    color: #f8fafc;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.pending-explainer p {
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
}

/* Light mode letters */
[data-theme="light"] .letters-table     { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .letters-table-head { background: rgba(0,0,0,0.04); }
[data-theme="light"] .letter-row        { border-top-color: rgba(0,0,0,0.05); }
[data-theme="light"] .letter-row:hover  { background: rgba(0,0,0,0.02); }
[data-theme="light"] .pending-explainer { background: rgba(14,165,233,0.06); border-color: rgba(14,165,233,0.2); }

@media (max-width: 600px) {
    .letter-row,
    .letters-table-head {
        grid-template-columns: 70px 1fr 70px;
    }
    .letters-table-head span:nth-child(3),
    .letters-table-head span:nth-child(4),
    .letter-row span:nth-child(3),
    .letter-row span:nth-child(4) {
        display: none;
    }
    .pending-note { grid-column: span 3; }
}
