/* ===============================
   PAST PAPERS – GRID STYLING
================================ */

.past-papers {
  margin-top: 3rem;
}

/* YEAR SECTION */
.year-section {
  margin-bottom: 4rem;
}

.year-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
  border-bottom: 2px solid var(--primary-blue);
  padding-bottom: 0.5rem;
}

/* PAPER (P1 / P2) */
.paper-section {
  margin-bottom: 3rem;
}

.paper-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: #222;
}

/* PROVINCE GRID */
.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

/* PROVINCE CARD */
.province-card {
  background-color: #f9fbff;
  border: 1px solid #e2e6f0;
  border-radius: 10px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.province-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* PROVINCE NAME */
.province-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: #111;
}

/* LINKS */
.province-card a {
  display: inline-block;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  color: var(--primary-blue);
  background-color: #eef3ff;
  transition: background-color 0.15s ease;
}

.province-card a:hover {
  background-color: #dfe8ff;
}

/* MOBILE OPTIMIZATION */
@media (max-width: 600px) {
  .year-section h2 {
    font-size: 1.5rem;
  }

  .paper-section h3 {
    font-size: 1.2rem;
  }
}

/* =========================
   CONTENT READABILITY FIX
   ========================= */

.main-content {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

/* Improve paragraph readability */
.main-content p,
.main-content li {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 750px;
}

/* Section spacing */
.main-content section {
  margin-bottom: 3.5rem;
}

/* Headings hierarchy */
.main-content h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
}

.main-content h2 {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}

.main-content h3 {
  font-size: 1.2rem;
}

/* Lists */
.main-content ul,
.main-content ol {
  margin-top: 0.75rem;
  padding-left: 1.5rem;
}

.main-content li {
  margin-bottom: 0.5rem;
}

/* Mobile responsive overrides */
@media (max-width: 768px) {
  /* Adjust hero sections */
  .math-hero,
  .landing-hero,
  .hero {
    padding: 1.5rem 1rem !important;
  }
  
  .math-hero h1,
  .landing-hero h1,
  .hero h2 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-math-subtitle,
  .landing-subtitle,
  .hero p {
    font-size: 1rem !important;
  }
  
  /* Make cards smaller on mobile */
  .topic-card,
  .data-card,
  .prep-card,
  .formula-container,
  .application-scenario {
    padding: 1.2rem !important;
  }
  
  .topic-card h3 {
    font-size: 1.2rem !important;
    min-height: auto !important;
  }
  
  /* Fix progress tracker on mobile */
  .progress-steps {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  .progress-steps::before {
    display: none !important;
  }
  
  .progress-step {
    min-width: auto !important;
    margin-bottom: 0.5rem;
  }
  
  .step-indicator {
    width: 25px !important;
    height: 25px !important;
    font-size: 0.8rem !important;
  }
  
  .step-label {
    font-size: 0.7rem !important;
  }
  
  /* Adjust tables for mobile */
  .comparison-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  /* Fix grid layouts */
  .topics-grid,
  .data-container,
  .prep-container,
  .resources-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Adjust navigation buttons */
  .math-nav-button {
    padding: 0.8rem !important;
  }
  
  .math-nav-title {
    font-size: 0.9rem !important;
  }
  
  /* Adjust concept tags */
  .concepts-tags-grid {
    gap: 0.5rem !important;
  }
  
  .concept-tag {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
  }
  
  /* Fix form inputs on mobile */
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Extra small devices (phones under 480px) */
@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
  
  .math-hero h1,
  .landing-hero h1,
  .hero h2 {
    font-size: 1.5rem !important;
  }
  
  .topic-number {
    width: 35px !important;
    height: 35px !important;
    font-size: 1rem !important;
  }
  
  .progress-steps {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ===============================
   TOPICS GRID – UNIT LANDING PAGES
================================ */

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.topic-card {
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  border: 2px solid #e2e6f0;
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topic-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-blue);
}

.topic-card h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #222;
}

.topic-card h3 a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.topic-card h3 a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

.topic-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

.subject-note-box {
  background: #e8f5e9;
  border-left: 4px solid #2e7d32;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.subject-note-box .note-icon {
  color: #2e7d32;
  font-weight: bold;
  font-size: 0.9rem;
  background: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.subject-note-box p {
  margin: 0;
  color: #1e3a2a;
  line-height: 1.6;
  font-size: 0.95rem;
  flex: 1;
}

/* Mobile fix */
@media (max-width: 480px) {
  .subject-note-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1.25rem;
  }
  
  .subject-note-box .note-icon {
    white-space: normal;
    align-self: flex-start;
    width: fit-content;
  }
  
  .subject-note-box p {
    font-size: 0.9rem;
  }
}

.atmosphere-overview h2 {
  color: #2e7d32;
  margin-bottom: 1.25rem;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e0e0e0;
  flex-wrap: wrap;
}

.atmosphere-overview .section-icon {
  background: #2e7d32;
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  white-space: nowrap;
}

/* Mobile fix */
@media (max-width: 480px) {
  .atmosphere-overview h2 {
    font-size: 1.3rem;
    gap: 0.5rem;
  }
  
  .atmosphere-overview .section-icon {
    font-size: 0.85rem;
    padding: 0.2rem 0.8rem;
  }
}

/* ===============================
   HEADER & FOOTER (SA THEME)
================================ */

/* Site Header - fixed height */
.site-header {
    background-color: rgba(11, 26, 46, 0.8) !important;
    height: 70px;
    padding: 0;
    font-family: 'Inter', sans-serif;
    border-bottom: 5px solid;
    border-image: linear-gradient(to right, #007749, #FCB514, #E03C31, #0C1C8C, #007749) 1;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    overflow: visible;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Logo container */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    height: 100%;
}

/* Logo image */
.logo-img {
    height: 170px;
    width: auto;
    object-fit: contain;
    display: block;
    padding: 0;
    margin-left: -50px;
    position: relative;
    margin-top: 0;
}

/* Logo text */
.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-left: -100px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    line-height: 1;
    white-space: nowrap;
}

/* Tablet */
@media (max-width: 768px) {
    .site-header {
        height: 75px;
    }
    
    .logo-img {
        height: 160px;
        margin-left: -40px;
    }
    
    .logo-text {
        font-size: 1.8rem;
        margin-left: -80px;
    }
}

/* Mobile */
@media (max-width: 580px) {
    .site-header {
        height: 75px;
    }
    
    .logo-img {
        height: 170px;
        margin-left: -30px;
    }
    
    .logo-text {
        font-size: 1.6rem;
        margin-left: -60px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .site-header {
        height: 60px;
    }
    
    .logo-img {
        height: 150px !important; /* Fixed at 170px on mobile */
        margin-left: -40px;
    }
    
    .logo-text {
        font-size: 1.4rem;
        margin-left: -40px;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
    }
    
    .menu-toggle {
        font-size: 1.8rem;
    }
}

/* Very Small Mobile */
@media (max-width: 380px) {
    .logo-img {
        height: 140px;
        margin-left: -40px;
    }
    
    .logo-text {
        font-size: 1.2rem;
        margin-left: 0;
    }
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 2px solid #ffcb3c;
    color: white;
    width: 56px;
    height: 34px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: #ffcb3c;
    color: #0b1a2e;
    transform: rotate(15deg) scale(1.1);
}

.theme-toggle i {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    color: inherit;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
    z-index: 1001;
}

.menu-toggle:hover {
    color: #FCB514;
}

/* Navigation */
.main-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 2rem;
    margin-left: 2rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 5px 0;
    transition: all 0.2s;
    font-size: 1.05rem;
    font-weight: 500;
    background: transparent !important;
    border: none !important;
    white-space: nowrap;
}

.main-nav a:hover {
    color: #E03C31;
    transform: translateY(-2px);
}

/* Header right section */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1102;
    }
    
    .header-right {
        margin-left: 0.5rem;
        gap: 0.5rem;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -340px;
        bottom: 0;
        left: auto;
        width: 320px;
        max-width: 86vw;
        min-height: 100vh;
        min-height: 100dvh;
        box-sizing: border-box;
        background:
            linear-gradient(180deg, rgba(18, 35, 58, 0.98) 0%, rgba(7, 17, 31, 0.98) 100%) !important;
        flex-direction: column !important;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.65rem;
        padding: 92px 18px 28px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: right 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.38s ease;
        visibility: hidden;
        margin-left: 0;
        border-left: 1px solid #1a2c42;
        border-top-left-radius: 28px;
        border-bottom-left-radius: 28px;
        box-shadow: -18px 0 40px rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(18px);
        z-index: 1101;
        will-change: right;
    }

    .main-nav.active {
        right: 0;
        visibility: visible;
    }

    .main-nav::before {
        content: "Menu";
        display: block;
        width: 100%;
        color: #ffffff;
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        margin-bottom: 0.15rem;
    }

    .main-nav::after {
        content: "Quick navigation";
        display: block;
        width: 100%;
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.9rem;
        margin-bottom: 0.65rem;
    }

    .main-nav a {
        width: 100%;
        box-sizing: border-box;
        padding: 0.95rem 1rem;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.04) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
        white-space: normal;
        font-size: 1.05rem;
        font-weight: 600;
        color: #f4f7fb;
        transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease;
    }

    .main-nav a:hover,
    .main-nav a:focus-visible {
        background: linear-gradient(135deg, rgba(252, 181, 20, 0.16), rgba(224, 60, 49, 0.16)) !important;
        border-color: rgba(252, 181, 20, 0.45) !important;
        color: #ffffff;
        transform: translateX(-4px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
        outline: none;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(4, 12, 24, 0.55);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
        z-index: 1100;
        backdrop-filter: blur(3px);
    }

    .mobile-nav-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open .site-header {
        z-index: 1103;
    }

    .breadcrumb {
        position: fixed;
        top: 65px;
        left: 0.75rem;
        right: 0.75rem;
        margin-top: 0;
        margin-bottom: 0;
    }

    .site-header + .breadcrumb + .main-content,
    .site-header + .breadcrumb + main.main-content {
        padding-top: 4.5rem;
        margin-top: 0.75rem;
    }
}

/* Footer */
.site-footer {
    background-color: #0b1a2e;
    color: #dddddd;
    margin-top: 2rem;
    padding: 3rem 0 0 0;
    font-family: 'Inter', sans-serif;
    border-top: 5px solid;
    border-image: linear-gradient(to right, #007749, #FCB514, #E03C31, #0C1C8C, #007749) 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h3, 
.footer-column h4 {
    color: white;
    border-left: 4px solid #FCB514;
    padding-left: 10px;
    margin-bottom: 1.2rem;
}

.footer-column a {
    display: block;
    color: #cccccc;
    text-decoration: none;
    padding: 4px 0;
    transition: all 0.2s;
}

.footer-column a:hover {
    color: #E03C31;
    transform: translateX(5px);
}

.footer-column p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #aaaaaa;
}

.footer-bottom {
    background-color: #05101f;
    margin-top: 2rem;
    padding: 1.2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* AdSense-ready placement containers */
.adsense-slot {
    display: block;
    width: 100%;
    max-width: 970px;
    margin: 2rem auto;
    clear: both;
}

.adsense-slot:empty {
    display: none;
}

.adsense-slot > ins {
    display: block;
    min-height: 90px;
}

.adsense-slot--lesson-end {
    margin-top: 2.5rem;
}

/* Small reusable utilities for lesson markup */
.u-text-center {
    text-align: center;
}

.u-mt-05 {
    margin-top: 0.5rem;
}

.u-mt-1 {
    margin-top: 1rem;
}

.u-mb-1 {
    margin-bottom: 1rem;
}

.u-full-width {
    width: 100%;
}

.inline-icon-sm {
    width: 12px;
    height: 12px;
}

.inline-icon-md {
    width: 24px;
    height: 24px;
}

.muted-note {
    font-size: 0.75rem;
    color: var(--math-text-light);
}

.centered-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.stacked-action {
    width: 100%;
    margin-bottom: 1rem;
}

.result-explanation {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--math-text-light);
}

.mini-helper-text {
    font-size: 0.85rem;
    color: var(--math-text-light);
}

.micro-text {
    font-size: 0.8rem;
}

.product-size-note {
    font-size: 0.7rem;
}

.result-conclusion {
    color: var(--math-success);
}

.memory-score {
    margin-left: 1rem;
    font-weight: 600;
    color: var(--math-primary);
}

.answer-note {
    margin-top: 0.5rem;
    font-style: italic;
}

.ratio-part--success {
    background: var(--math-success);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.comparison-panel {
    background: var(--math-highlight);
    padding: 1.2rem;
    border-radius: 12px;
    border-left: 4px solid var(--math-primary);
}

.comparison-panel--accent {
    border-left-color: var(--math-accent);
}

.comparison-panel h4 {
    color: var(--math-primary);
    margin-bottom: 0.5rem;
}

.comparison-panel--accent h4 {
    color: var(--math-accent);
}

.number-line-legend {
    text-align: center;
    margin-top: 0.5rem;
}

.legend-negative {
    color: var(--math-warning);
}

.legend-zero {
    color: var(--math-accent);
}

.legend-positive {
    color: var(--math-primary);
}

.number-family-card--success {
    border-left-color: var(--math-success);
}

.number-family-card--primary {
    border-left-color: var(--math-primary);
}

.number-family-card--accent {
    border-left-color: var(--math-accent);
}

.number-family-card--purple {
    border-left-color: var(--math-purple);
}

.number-family-card--warning {
    border-left-color: var(--math-warning);
}

.number-family-card--teal {
    border-left-color: var(--math-teal);
}

.venn-circle--real {
    width: 280px;
    height: 280px;
    background: rgba(33, 150, 243, 0.15);
    border: 3px solid var(--math-primary);
    left: 10px;
    top: 20px;
}

.venn-circle--rational {
    width: 220px;
    height: 220px;
    background: rgba(255, 152, 0, 0.15);
    border: 3px solid var(--math-accent);
    left: 70px;
    top: 50px;
}

.venn-circle--integer {
    width: 160px;
    height: 160px;
    background: rgba(76, 175, 80, 0.15);
    border: 3px solid var(--math-success);
    left: 100px;
    top: 80px;
}

.venn-circle--natural {
    width: 100px;
    height: 100px;
    background: rgba(156, 39, 176, 0.2);
    border: 3px solid var(--math-purple);
    left: 130px;
    top: 110px;
}

.venn-circle--irrational {
    width: 180px;
    height: 180px;
    background: rgba(244, 67, 54, 0.1);
    border: 3px dashed var(--math-warning);
    left: 280px;
    top: 50px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: linear-gradient(to right, rgba(11, 26, 46, 0.8), transparent);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border-left: 4px solid #ffcb3c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 75px;
    z-index: 1002;
    backdrop-filter: blur(5px);
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    transition: all 0.2s ease;
    background: transparent !important;
}

.breadcrumb a:hover {
    color: #E03C31;
}

.breadcrumb .separator {
    color: #31e065;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0.1rem;
}

.breadcrumb .current {
    color: white;
    font-weight: 600;
    background: #31e065;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    border: 1px solid #ffcb3c;
}

/* Responsive Breadcrumb */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        top: 65px;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .breadcrumb::-webkit-scrollbar {
        display: none;
    }
}

/* ===== FIX MENU TOGGLE ICON SIZE ===== */
.menu-toggle i {
  width: 24px !important;
  height: 24px !important;
}

@media (max-width: 768px) {
  .menu-toggle i {
    width: 28px !important;
    height: 28px !important;
  }
}

/* Override the SVG rule that's shrinking icons */
.menu-toggle svg {
  max-width: none !important;
  height: auto !important;
}

/* ===== FIX BREADCRUMB SEPARATORS ON MOBILE ===== */
.breadcrumb .separator {
  display: inline-flex !important;
  align-items: center;
}

.breadcrumb .separator svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .breadcrumb .separator {
    display: inline-flex !important;
    flex-shrink: 0;
  }
  
  .breadcrumb .separator svg {
    width: 14px !important;
    height: 14px !important;
  }
}

      /* WhatsApp Float Styles */
      .whatsapp-float {
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 1000;
        transition: transform 0.3s ease;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        line-height: 0;
      }

      .whatsapp-float:hover {
        transform: scale(1.1);
      }

      .whatsapp-float img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: block;
      }

      @media (max-width: 768px) {
        .whatsapp-float {
          bottom: 20px;
          right: 20px;
        }
        .whatsapp-float img {
          width: 50px;
          height: 50px;
        }

/* Probability inline-style cleanup */
.prob-clean-001 { margin-top: 0.5rem; }
.prob-clean-002 { font-size: 0.75rem; margin-bottom: 0.5rem; }
.prob-clean-003 { text-align: center; margin-bottom: 1rem; }
.prob-clean-004 { width: 70px; height: 70px; background: var(--math-gradient-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: bold; border: 3px solid var(--math-accent); color: white; }
.prob-clean-005 { margin: 0; font-size: 0.7rem; }
.prob-clean-006 { flex-wrap: wrap; }
.prob-clean-007 { width: 60px; height: 60px; background: var(--math-gradient-4); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; border: 2px solid var(--math-primary); color: white; }
.prob-clean-008 { width: 70px; height: 70px; background: var(--math-primary); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: bold; border: 2px solid var(--math-accent); color: white; }
.prob-clean-009 { text-align: center; }
.prob-clean-010 { display: flex; gap: 1rem; justify-content: center; margin: 0.5rem 0; }
.prob-clean-011 { margin-top: 0.5rem; padding: 0.5rem; background: var(--math-highlight); border-radius: 8px; font-size: 0.8rem; }
.prob-clean-012 { margin-top: 0.8rem; }
.prob-clean-013 { margin: 0 0 0.5rem 0; }
.prob-clean-014 { width: 0%; }
.prob-clean-015 { font-size: 0.65rem; color: var(--math-text-light); text-align: center; margin-top: 0.5rem; }
.prob-clean-016 { width: 12px; height: 12px; }
.prob-clean-017 { background: var(--math-card-alt); padding: 1rem; border-radius: 12px; }
.prob-clean-018 { font-weight: 600; margin-bottom: 0.8rem; }
.prob-clean-019 { margin-top: 0.5rem; font-size: 0.75rem; text-align: center; }
.prob-clean-020 { width: 60px; height: 60px; background: var(--math-gradient-4); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; margin-bottom: 0.5rem; color: white; }
.prob-clean-021 { justify-content: center; }
.prob-clean-022 { margin-top: 0.5rem; justify-content: center; }
.prob-clean-023 { margin-top: 0.5rem; font-size: 0.75rem; }
.prob-clean-024 { text-align: center; margin-bottom: 0.8rem; }
.prob-clean-025 { flex: 1; min-width: 120px; }
.prob-clean-026 { text-align: center; margin-bottom: 0.5rem; }
.prob-clean-027 { flex: 1; min-width: 120px; background: var(--selector-bg); color: var(--math-text); border: 1px solid var(--math-border); border-radius: 30px; padding: 0.4rem 0.8rem; }
.prob-clean-028 { color: var(--math-purple); margin-bottom: 0.5rem; }
.prob-clean-029 { font-size: 1.2rem; font-weight: bold; color: var(--math-primary); margin-top: 0.3rem; }
.prob-clean-030 { margin: 1rem 0; }
.prob-clean-031 { margin: 0 0 0.3rem 0; }
.prob-clean-032 { margin: 0; }
.prob-clean-033 { display: inline-block; width: 12px; height: 12px; background: var(--math-warning); border-radius: 2px; }
.prob-clean-034 { display: inline-block; width: 12px; height: 12px; background: var(--math-accent); border-radius: 2px; }
.prob-clean-035 { display: inline-block; width: 12px; height: 12px; background: var(--math-success); border-radius: 2px; }
.prob-clean-036 { display: inline-block; width: 12px; height: 12px; background: var(--math-primary); border-radius: 2px; }
.prob-clean-037 { margin-top: 1rem; padding: 0.8rem; background: var(--math-card-alt); border-radius: 12px; }
.prob-clean-038 { justify-content: space-between; }
.prob-clean-039 { margin-top: 0.5rem; font-size: 0.7rem; }
.prob-clean-040 { border: 2px solid var(--math-accent); }
.prob-clean-041 { color: var(--math-accent); }
.prob-clean-042 { margin-top: 0.8rem; padding: 0.8rem; background: var(--math-card-alt); border-radius: 12px; }
.prob-clean-043 { margin-top: 0.3rem; font-size: 0.7rem; }
.prob-clean-044 { background: var(--math-success); padding: 0.2rem 0.5rem; border-radius: 20px; font-size: 0.65rem; }
.prob-clean-045 { background: var(--math-accent); padding: 0.2rem 0.5rem; border-radius: 20px; font-size: 0.65rem; }
.prob-clean-046 { background: var(--math-warning); padding: 0.2rem 0.5rem; border-radius: 20px; font-size: 0.65rem; }
.prob-clean-047 { color: var(--math-purple); text-align: center; }
.prob-clean-048 { font-size: 1.2rem; }
.prob-clean-049 { margin-top: 0.8rem; padding: 0.6rem; background: var(--math-highlight); border-radius: 12px; text-align: center; font-weight: bold; }
/* End probability inline-style cleanup */
/* AdSense-ready placeholder slots */
.adsense-slot {
  display: block;
  width: 100%;
  min-height: 90px;
  margin: 2rem auto;
  border: 1px dashed var(--math-border, #cbd5e1);
  border-radius: 8px;
  background: var(--math-card-alt, #f8fafc);
}

.adsense-slot::before {
  content: "Advertisement";
  display: block;
  padding: 1rem;
  color: var(--math-text-light, #64748b);
  font-size: 0.85rem;
  text-align: center;
}
