/*
Theme Name: StatStudyHub Learning
Theme URI: https://statstudyhub.com
Author: Joseph Mburu
Author URI: https://statstudyhub.com
Description: Lightweight learning-first WordPress theme for StatStudyHub statistics guides, topic hubs, calculators, statistical tables, and controlled ad placements.
Version: 1.8.0
License: GPLv2 or later
Text Domain: statstudyhub-learning
*/

:root {
  --ssh-blue: #037ef3;
  --ssh-blue-dark: #0264c8;
  --ssh-heading: #0f172a;
  --ssh-text: #1f2937;
  --ssh-muted: #475569;
  --ssh-border: #dbe3ec;
  --ssh-soft: #f7f9fc;
  --ssh-white: #ffffff;
  --ssh-header-h: 70px;
  --ssh-adminbar-h: 0px;
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; scroll-behavior: smooth; scroll-padding-top: calc(var(--ssh-header-h) + var(--ssh-adminbar-h) + 16px); }
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ssh-text);
  background: var(--ssh-white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: var(--ssh-header-h); }
#content { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--ssh-blue); text-decoration: none; }
a:hover { color: var(--ssh-blue-dark); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(3,126,243,.28); outline-offset: 2px; }

/* Header */
.ssh-site-header { position: fixed; top: var(--ssh-adminbar-h); left: 0; right: 0; width: 100%; z-index: 1000; background: #fff; border-bottom: 1px solid var(--ssh-border); }
.ssh-header-main { min-height: 70px; display: flex; align-items: center; gap: 24px; }
.ssh-site-brand { flex: 0 0 auto; display: inline-flex; align-items: center; }
.ssh-site-logo { display: block; width: auto; max-width: 220px; height: 44px; object-fit: contain; }
.ssh-primary-navigation { display: flex; align-items: center; margin-left: auto; }
.ssh-primary-menu, .ssh-mobile-primary-menu { list-style: none; margin: 0; padding: 0; }
.ssh-primary-menu { display: flex; align-items: center; gap: 22px; }
.ssh-primary-menu > li { position: relative; }
.ssh-primary-menu a { color: var(--ssh-heading); font-weight: 650; font-size: 15px; white-space: nowrap; }
.ssh-primary-menu a:hover, .ssh-primary-menu .current-menu-item > a, .ssh-primary-menu .current-menu-ancestor > a { color: var(--ssh-blue); text-decoration: none; }
.ssh-primary-menu .sub-menu { display: none; position: absolute; z-index: 60; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: 8px 0; border: 1px solid var(--ssh-border); background: #fff; box-shadow: 0 8px 18px rgba(15,23,42,.08); }
.ssh-primary-menu .sub-menu li { margin: 0; }
.ssh-primary-menu .sub-menu a { display: block; padding: 8px 12px; white-space: normal; font-weight: 550; }
.ssh-primary-menu li:hover > .sub-menu, .ssh-primary-menu li:focus-within > .sub-menu { display: block; }
.ssh-header-search { display: flex; align-items: stretch; }
.ssh-header-search input { width: 210px; min-height: 40px; border: 1px solid var(--ssh-border); border-right: 0; border-radius: 5px 0 0 5px; padding: 7px 10px; color: var(--ssh-text); background: #fff; }
.ssh-header-search button { min-height: 40px; border: 1px solid var(--ssh-blue); border-radius: 0 5px 5px 0; background: var(--ssh-blue); color: #fff; font-weight: 650; padding: 7px 12px; }
.ssh-menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--ssh-border); background: #fff; border-radius: 5px; }
.ssh-menu-bars, .ssh-menu-bars::before, .ssh-menu-bars::after { display: block; width: 20px; height: 2px; background: var(--ssh-heading); content: ""; margin: auto; }
.ssh-menu-bars::before { transform: translateY(-6px); }
.ssh-menu-bars::after { transform: translateY(4px); }
.ssh-header-panel { display: none; }
.ssh-mobile-primary-links { display: none; }
.ssh-topic-strip { border-top: 1px solid #eef2f6; overflow-x: auto; scrollbar-width: none; }
.ssh-topic-strip::-webkit-scrollbar { display: none; }
.ssh-topic-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.ssh-topic-strip .ssh-topic-links { min-height: 40px; }
.ssh-topic-links a { color: var(--ssh-muted); font-size: 14px; font-weight: 550; }
.ssh-topic-links a:hover { color: var(--ssh-blue); text-decoration: none; }

/* Global ad areas */
.ssh-global-top-ad, .ssh-footer-ad-band { background: #fff; }
.ssh-ad-slot { margin: 24px auto; text-align: center; max-width: 100%; clear: both; }
.ssh-ad-label { color: #738095; font-size: 11px; line-height: 1.3; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .03em; }
.ssh-ad-code { max-width: 100%; overflow: hidden; }
.ssh-ad-slot--compact-banner { max-width: 970px; margin-top: 10px; margin-bottom: 10px; }
.ssh-ad-slot--sidebar { max-width: 300px; margin: 0 auto 24px; }
.ssh-ad-slot--multiplex { margin: 34px 0; }
.ssh-category-intro-ad-wrap { padding-top: 12px; padding-bottom: 8px; }
.ssh-sticky-sidebar-ad { position: sticky; top: calc(var(--ssh-adminbar-h) + var(--ssh-header-h) + 16px); align-self: flex-start; }

/* Breadcrumbs and shared page headers */
.ssh-breadcrumbs, #breadcrumbs { color: var(--ssh-muted); font-size: 14px; margin: 0 0 18px; }
.ssh-breadcrumbs a, #breadcrumbs a { color: var(--ssh-muted); }
.ssh-breadcrumbs a:hover, #breadcrumbs a:hover { color: var(--ssh-blue); }
.ssh-library-header, .ssh-topic-hub-header { padding: 34px 0 24px; border-bottom: 1px solid var(--ssh-border); background: #fff; }
.ssh-library-header h1, .ssh-topic-hub-header h1 { color: var(--ssh-heading); font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.13; font-weight: 760; margin: 0 0 14px; }
.ssh-library-intro, .ssh-topic-hub-description { max-width: 900px; color: var(--ssh-muted); font-size: 18px; line-height: 1.7; margin: 0; }
.ssh-topic-hub-description p:last-child, .ssh-library-intro p:last-child { margin-bottom: 0; }

/* Article reading layout */
.ssh-reading-shell { max-width: 1500px; }
.ssh-article { max-width: 800px; margin: 0 auto; }
.ssh-article-header { margin-bottom: 24px; }
.ssh-single-title { color: var(--ssh-heading); font-size: clamp(2.15rem, 4vw, 3.15rem); line-height: 1.1; font-weight: 780; letter-spacing: -.025em; margin: 0 0 14px; }
.ssh-post-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--ssh-muted); font-size: 14px; }
.ssh-featured-image { margin: 0 0 28px; }
.ssh-featured-image img { display: block; width: 100%; border-radius: 4px; }

.entry-content { color: var(--ssh-text); font-size: 18px; line-height: 1.78; overflow-wrap: anywhere; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { color: var(--ssh-heading); font-weight: 750; line-height: 1.22; scroll-margin-top: calc(var(--ssh-header-h) + 18px); }
.entry-content h2 { font-size: clamp(1.7rem, 2.6vw, 2rem); margin: 1.65em 0 .65em; }
.entry-content h3 { font-size: clamp(1.35rem, 2vw, 1.55rem); margin: 1.45em 0 .55em; }
.entry-content h4 { font-size: 1.18rem; margin: 1.3em 0 .5em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.15em 1.35em; padding: 0; }
.entry-content li { margin: .34em 0; }
.entry-content strong { font-weight: 750; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.entry-content blockquote { margin: 1.5em 0; padding: 10px 0 10px 18px; border-left: 4px solid var(--ssh-blue); color: var(--ssh-muted); background: transparent; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .94em; }
.entry-content th, .entry-content td { border: 1px solid var(--ssh-border); padding: 9px 11px; vertical-align: top; }
.entry-content th { background: var(--ssh-soft); color: var(--ssh-heading); font-weight: 700; }
.entry-content pre { overflow: auto; padding: 14px 16px; background: #101827; color: #edf2f7; border-radius: 4px; }
.entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.entry-content :not(pre) > code { background: #f0f3f7; color: #172033; padding: 2px 5px; border-radius: 3px; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { color: var(--ssh-muted); font-size: 14px; text-align: center; margin-top: 8px; }

/* Collapsed floating table of contents.
 * Closed by default; opens on hover/focus on pointer devices and on tap/click.
 * The dropdown contains H2 links only and never creates an inner scrollbar. */
.ssh-article-toc {
  position: relative;
  z-index: 35;
  width: 100%;
  margin: 24px 0 30px;
}
.ssh-article-toc.is-stuck {
  position: fixed;
  z-index: 100;
  margin: 0;
}
.ssh-toc-placeholder {
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.ssh-article-toc-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid var(--ssh-border);
  border-radius: 5px;
  background: #fff;
  color: var(--ssh-heading);
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}
.ssh-article-toc-trigger:hover,
.ssh-article-toc-trigger:focus-visible {
  border-color: #b8c7d9;
  outline: none;
}
.ssh-article-toc-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--ssh-blue);
}
.ssh-article-toc-label { flex: 1 1 auto; }
.ssh-article-toc-chevron {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .14s ease;
}
.ssh-article-toc.is-open .ssh-article-toc-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}
.ssh-article-toc-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  padding: 14px 18px 16px;
  border: 1px solid var(--ssh-border);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}
.ssh-article-toc.is-open .ssh-article-toc-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.ssh-article-toc-list {
  columns: 2;
  column-gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ssh-article-toc-list li {
  break-inside: avoid;
  margin: 0;
  padding: 0;
}
.ssh-article-toc a {
  display: block;
  padding: 7px 0;
  color: var(--ssh-text);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.ssh-article-toc a:hover,
.ssh-article-toc a:focus {
  color: var(--ssh-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* Learning rail */
.ssh-learning-rail { border-right: 1px solid var(--ssh-border); align-self: stretch !important; overflow: visible; }
.ssh-learning-nav { position: sticky; top: calc(var(--ssh-adminbar-h) + var(--ssh-header-h) + 16px); max-height: calc(100vh - var(--ssh-adminbar-h) - var(--ssh-header-h) - 32px); overflow-y: auto; scrollbar-width: thin; padding-right: 18px; }
.ssh-learning-nav-title { color: var(--ssh-heading); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .025em; margin-bottom: 10px; }
.ssh-learning-menu .sub-menu { list-style: none; margin: 4px 0 7px 12px; padding: 0 0 0 10px; border-left: 1px solid var(--ssh-border); }
.ssh-learning-menu .sub-menu li { margin: 2px 0; }
.ssh-learning-menu .sub-menu a { font-size: 14px; font-weight: 500; }
.ssh-learning-menu .current-menu-item > a, .ssh-learning-menu .current-menu-ancestor > a { color: var(--ssh-blue); font-weight: 750; }

.ssh-learning-topic-list, .ssh-learning-subtopic-list, .ssh-learning-guide-list { list-style: none; margin: 0; padding: 0; }
.ssh-learning-topic-item { border-top: 1px solid #edf1f5; }
.ssh-learning-topic-item:first-child { border-top: 0; }
.ssh-learning-topic-link { display: block; padding: 8px 0; color: var(--ssh-muted); font-size: 14px; font-weight: 650; }
.ssh-learning-topic-item.is-current-topic > .ssh-learning-topic-link { color: var(--ssh-blue); }
.ssh-learning-subtopic-list { padding: 0 0 6px 10px; }
.ssh-learning-subtopic-list a { display: block; color: var(--ssh-muted); font-size: 13.5px; padding: 4px 0; }
.ssh-learning-subtopic-list a[aria-current="page"] { color: var(--ssh-blue); font-weight: 700; }
.ssh-learning-guide-list { padding: 2px 0 8px 14px; border-left: 1px solid #e5ebf2; }
.ssh-learning-guide-list a { display: block; color: #344154; font-size: 13.5px; line-height: 1.4; padding: 4px 0; }
.ssh-learning-guide-list a:hover { color: var(--ssh-blue); text-decoration: none; }
.ssh-learning-all-link { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 700; }
.ssh-mobile-topic-nav { margin: 0 0 24px; border: 1px solid var(--ssh-border); padding: 0; }
.ssh-mobile-topic-nav summary { cursor: pointer; color: var(--ssh-heading); font-weight: 700; padding: 11px 14px; }
.ssh-mobile-topic-nav ul { list-style: none; margin: 0; padding: 0 14px 12px; columns: 2; }
.ssh-mobile-topic-nav li { break-inside: avoid; margin: 4px 0; }
.ssh-mobile-topic-nav a { font-size: 14px; }

/* Right ad rail */
.ssh-ad-rail { min-width: 0; align-self: stretch; }
.ssh-ad-rail .ssh-ad-slot--sidebar { margin-bottom: 26px; }

/* Author */
.ssh-author-card, .ssh-calculator-author-box { display: flex; gap: 16px; margin-top: 40px; padding: 22px 0 0; border-top: 1px solid var(--ssh-border); background: transparent; }
.ssh-author-card h2, .ssh-calculator-author-box h2 { color: var(--ssh-heading); font-size: 18px; margin: 0 0 4px; }
.ssh-author-name { font-weight: 700; margin-bottom: 4px; }
.ssh-author-card p, .ssh-calculator-author-box p { color: var(--ssh-muted); margin: 0; font-size: 15px; line-height: 1.6; }
.ssh-author-avatar img { border-radius: 50%; }

/* Topic/category hubs */
.ssh-section-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ssh-heading); padding-bottom: 8px; margin-bottom: 4px; }
.ssh-section-heading-row h2, .ssh-section-title, .ssh-topic-calculators h2, .ssh-guides-topic-directory h2, .ssh-all-guides h2 { color: var(--ssh-heading); font-size: 24px; font-weight: 760; margin: 0; }
.ssh-section-heading-row span { color: var(--ssh-muted); font-size: 14px; }
.ssh-simple-article-list { margin-bottom: 34px; }
.ssh-simple-article-item { padding: 20px 0; border-bottom: 1px solid var(--ssh-border); }
.ssh-simple-article-item h2, .ssh-simple-article-item h3 { font-size: 20px; line-height: 1.3; margin: 0 0 7px; }
.ssh-simple-article-item h2 a, .ssh-simple-article-item h3 a { color: #0e4f8f; }
.ssh-simple-article-item p { color: var(--ssh-muted); margin: 0 0 7px; }
.ssh-list-meta { color: var(--ssh-muted); font-size: 13px; }
.ssh-topic-calculators { border-top: 1px solid var(--ssh-border); padding-top: 28px; margin-top: 34px; }
.ssh-inline-link { display: inline-block; margin-top: 10px; font-weight: 650; }
.ssh-topic-hub-sidebar .ssh-learning-nav { margin-bottom: 28px; padding-right: 0; }

/* Tool link lists / calculator directory */
.ssh-calculator-directory-group { padding: 0 0 30px; margin: 0 0 30px; border-bottom: 1px solid var(--ssh-border); }
.ssh-calculator-directory-group:last-child { border-bottom: 0; }
.ssh-directory-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 5px; }
.ssh-directory-heading h2 { color: var(--ssh-heading); font-size: 25px; font-weight: 760; margin: 0; }
.ssh-directory-heading a { font-size: 14px; font-weight: 650; white-space: nowrap; }
.ssh-directory-description { color: var(--ssh-muted); margin: 0 0 12px; }
.ssh-tool-link-list { list-style: none; margin: 0; padding: 0; }
.ssh-tool-link-list--columns { columns: 2; column-gap: 30px; }
.ssh-tool-link-list li { break-inside: avoid; border-bottom: 1px solid #edf1f5; }
.ssh-tool-link-list a { display: block; padding: 8px 0; color: #075fae; font-weight: 600; line-height: 1.4; }
.ssh-tool-link-list a:hover { color: var(--ssh-blue); }

/* Sidebar link boxes */
.ssh-sidebar-card { margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--ssh-border); background: #fff; }
.ssh-sidebar-card h2 { color: var(--ssh-heading); font-size: 18px; font-weight: 750; margin: 0 0 8px; }
.ssh-sidebar-list { list-style: none; margin: 0; padding: 0; }
.ssh-sidebar-list li { border-top: 1px solid #edf1f5; }
.ssh-sidebar-list li:first-child { border-top: 0; }
.ssh-sidebar-list a { display: block; padding: 7px 0; color: #075fae; font-size: 15px; font-weight: 600; }

/* Homepage */
.ssh-home-hero { padding: 52px 0 46px; border-bottom: 1px solid var(--ssh-border); background: #fff; }
.ssh-home-hero-inner { max-width: 850px; }
.ssh-home-hero h1 { color: var(--ssh-heading); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.035em; margin: 0 0 18px; }
.ssh-home-hero p { color: var(--ssh-muted); font-size: 20px; line-height: 1.65; margin: 0 0 24px; }
.ssh-home-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ssh-home-section { padding: 46px 0; border-bottom: 1px solid var(--ssh-border); }
.ssh-home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.ssh-home-section-heading h2, .ssh-simple-feature-row h2 { color: var(--ssh-heading); font-size: 28px; font-weight: 780; margin: 0 0 5px; }
.ssh-home-section-heading p, .ssh-simple-feature-row p { color: var(--ssh-muted); margin: 0; max-width: 760px; }
.ssh-home-section-heading > a { font-weight: 650; white-space: nowrap; }
.ssh-topic-directory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ssh-border); border-left: 1px solid var(--ssh-border); }
.ssh-topic-directory a { padding: 13px 15px; border-right: 1px solid var(--ssh-border); border-bottom: 1px solid var(--ssh-border); color: #114f89; font-weight: 650; background: #fff; }
.ssh-topic-directory a:hover { color: var(--ssh-blue); background: #fbfdff; text-decoration: none; }
.ssh-simple-feature-row { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.ssh-home-multiplex-section { padding: 18px 0; }
.ssh-home-calculator-groups { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px 36px; }
.ssh-home-calculator-group { min-width: 0; padding-top: 14px; border-top: 2px solid var(--ssh-heading); }
.ssh-home-calculator-group h3 { color: var(--ssh-heading); font-size: 19px; line-height: 1.3; font-weight: 760; margin: 0 0 7px; }
.ssh-home-calculator-group h3 a { color: var(--ssh-heading); text-decoration: none; }
.ssh-home-calculator-group h3 a:hover { color: var(--ssh-blue); }
.ssh-home-calculator-group p { color: var(--ssh-muted); font-size: 15px; line-height: 1.6; margin: 0 0 9px; }
.ssh-home-calculator-more { display: inline-block; font-size: 14px; font-weight: 700; }

.ssh-recent-guide-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.ssh-home-guide-item { min-width: 0; border: 1px solid var(--ssh-border); background: #fff; }
.ssh-home-guide-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ssh-soft); }
.ssh-home-guide-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ssh-home-guide-body { padding: 15px 16px 17px; }
.ssh-guide-category { color: var(--ssh-muted); font-size: 12px; font-weight: 700; }
.ssh-home-guide-item h3 { font-size: 18px; line-height: 1.35; margin: 5px 0 7px; }
.ssh-home-guide-item h3 a { color: var(--ssh-heading); text-decoration: none; }
.ssh-home-guide-item h3 a:hover { color: var(--ssh-blue); text-decoration: underline; text-underline-offset: 2px; }
.ssh-home-guide-excerpt { color: var(--ssh-muted); font-size: 14.5px; line-height: 1.55; margin: 0; }

/* Calculator page wrapper: plugin owns inner calculator UI */
.ssh-calculator-template { background: #fff; }
.ssh-calculator-main-card { max-width: 860px; margin: 0 auto; }
.ssh-calculator-topline { margin-bottom: 16px; }
.ssh-calculator-header { border-bottom: 1px solid var(--ssh-border); padding-bottom: 16px; margin-bottom: 22px; }
.ssh-calculator-title { color: var(--ssh-heading); font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.1; font-weight: 790; }
.ssh-calculator-meta-row, .ssh-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.ssh-calculator-content { color: var(--ssh-text); }
.statstudy-calculator { border-color: #cfe2f5 !important; background: #fff !important; }
.statstudy-calculator h2 { color: var(--ssh-heading) !important; }
.statstudy-calculator .btn-primary { background: var(--ssh-blue); border-color: var(--ssh-blue); }
.statstudy-calculator .btn-primary:hover { background: var(--ssh-blue-dark); border-color: var(--ssh-blue-dark); }

/* Share */
.ssh-share-dropdown { position: relative; }
.ssh-share-toggle { min-height: 38px; border: 1px solid var(--ssh-border); background: #fff; color: var(--ssh-heading); border-radius: 4px; padding: 6px 11px; font-weight: 650; }
.ssh-share-menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); width: 170px; border: 1px solid var(--ssh-border); background: #fff; padding: 5px; }
.ssh-share-menu a, .ssh-share-menu button { display: block; width: 100%; border: 0; background: transparent; color: var(--ssh-text); text-align: left; padding: 7px 9px; font-size: 14px; }
.ssh-share-menu a:hover, .ssh-share-menu button:hover { background: var(--ssh-soft); text-decoration: none; }

/* Citation */
.ssh-citation-box { margin-top: 28px; border: 1px solid var(--ssh-border); background: #fff; }
.ssh-citation-header { padding: 16px 18px 10px; }
.ssh-citation-title { color: var(--ssh-heading); font-size: 20px; font-weight: 750; margin: 0 0 4px; }
.ssh-citation-description { color: var(--ssh-muted); margin: 0; }
.ssh-citation-tabs { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--ssh-border); border-bottom: 1px solid var(--ssh-border); }
.ssh-citation-tab { border: 0; border-right: 1px solid var(--ssh-border); background: #fff; color: var(--ssh-muted); padding: 9px 13px; font-weight: 650; }
.ssh-citation-tab.is-active { color: var(--ssh-blue); box-shadow: inset 0 -2px 0 var(--ssh-blue); }
.ssh-citation-panel { padding: 16px 18px; }
.ssh-citation-text { color: var(--ssh-text); line-height: 1.6; }
.ssh-copy-citation { margin-top: 10px; border: 1px solid var(--ssh-blue); background: #fff; color: var(--ssh-blue); border-radius: 4px; padding: 7px 11px; font-weight: 650; }

/* Pagination */
.ssh-category-pagination { margin-top: 30px; }
.ssh-category-pagination .nav-links, .ssh-category-pagination ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.ssh-category-pagination a, .ssh-category-pagination span { display: inline-flex; min-width: 38px; min-height: 38px; align-items: center; justify-content: center; border: 1px solid var(--ssh-border); padding: 5px 9px; }
.ssh-category-pagination .current { border-color: var(--ssh-blue); color: var(--ssh-blue); }

/* Author profile */
.ssh-author-page .ssh-author-card { display: block; margin: 0 0 28px; padding: 0; border: 1px solid var(--ssh-border) !important; border-radius: 6px; background: #fff; }
.ssh-author-page .ssh-author-card .card-body { display: flex; gap: 20px; padding: 24px; }
.ssh-author-page .ssh-author-stat { display: flex; align-items: baseline; gap: 7px; color: var(--ssh-text); }
.ssh-author-page .ssh-author-stat strong { color: var(--ssh-heading); font-size: 18px; }
.ssh-author-profile-links { gap: 8px !important; }
.ssh-author-profile-links a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 11px; border: 1px solid var(--ssh-border); border-radius: 4px; color: var(--ssh-blue); font-size: 14px; font-weight: 650; text-decoration: none; }
.ssh-author-profile-links a:hover { border-color: var(--ssh-blue); color: var(--ssh-blue-dark); text-decoration: none; }

/* Search/author/general archives */
.ssh-author-page, .ssh-blog-index, .ssh-page-template { color: var(--ssh-text); }
.ssh-blog-title a, .ssh-author-list a { color: var(--ssh-blue); }
.ssh-blog-thumb img { border-radius: 4px; }
.ssh-blog-excerpt, .ssh-blog-meta, .ssh-author-stat { color: var(--ssh-muted); }

/* Contact */
.ssh-contact-wrap { max-width: 800px; margin: 0 auto; }
.ssh-contact-card { border: 1px solid var(--ssh-border); padding: 22px; background: #fff; }
.ssh-contact-card input, .ssh-contact-card textarea, .ssh-contact-card select { width: 100%; border: 1px solid var(--ssh-border); border-radius: 4px; padding: 10px 11px; color: var(--ssh-text); background: #fff; }

/* Footer */
.ssh-pro-footer { margin-top: 40px; border-top: 1px solid var(--ssh-border); background: #f8fafc; color: var(--ssh-muted); }
.ssh-footer-logo { width: auto; max-width: 190px; height: 38px; object-fit: contain; }
.ssh-footer-brand { display: inline-flex; margin-bottom: 12px; }
.ssh-footer-about { max-width: 410px; font-size: 15px; line-height: 1.65; margin: 0; }
.ssh-footer-title { color: var(--ssh-heading); font-weight: 750; margin-bottom: 8px; }
.ssh-footer-links { list-style: none; padding: 0; margin: 0; }
.ssh-footer-links li { margin: 5px 0; }
.ssh-footer-links a { color: var(--ssh-muted); font-size: 14px; }
.ssh-footer-two-col { columns: 2; column-gap: 22px; }
.ssh-footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--ssh-border); margin-top: 28px; padding-top: 16px; color: var(--ssh-muted); font-size: 13px; }
.ssh-footer-bottom a { color: var(--ssh-muted); }

/* MathJax */
mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
mjx-container[display="true"] { display: block !important; text-align: left !important; margin: .7em 0 !important; }

/* Buttons */
.btn { border-radius: 4px; font-weight: 650; }
.btn-primary { background-color: var(--ssh-blue); border-color: var(--ssh-blue); }
.btn-primary:hover { background-color: var(--ssh-blue-dark); border-color: var(--ssh-blue-dark); }
.btn-outline-primary { color: var(--ssh-blue); border-color: var(--ssh-blue); }

/* 404 */
.ssh-404-mark { color: #7b8798; font-size: 15px; font-weight: 800; letter-spacing: .08em; }

@media (max-width: 1199.98px) {
  .ssh-topic-strip { display: none; }
  .ssh-primary-navigation { display: none; }
  .ssh-header-search-desktop { display: none; }
  .ssh-menu-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .ssh-header-panel { display: none; border-top: 1px solid var(--ssh-border); padding: 12px 0 16px; }
  .ssh-header-panel.is-open { display: block; }
  .ssh-mobile-primary-links { display: block; margin-bottom: 12px; }
  .ssh-mobile-primary-menu > li { border-bottom: 1px solid #eef2f6; }
  .ssh-mobile-primary-menu a { display: block; color: var(--ssh-heading); font-weight: 700; padding: 9px 0; }
  .ssh-mobile-primary-menu .sub-menu { list-style: none; margin: 0 0 8px 14px; padding: 0 0 0 12px; border-left: 1px solid var(--ssh-border); }
  .ssh-mobile-primary-menu .sub-menu a { font-weight: 550; padding: 6px 0; }
  .ssh-header-search-mobile { margin-top: 14px; max-width: 430px; }
  .ssh-header-search-mobile input { flex: 1; width: auto; }
}

@media (min-width: 1200px) {
  .ssh-header-panel { display: none !important; }
}

@media (max-width: 991.98px) {
  .ssh-article-toc { margin: 22px 0 26px; }
  .ssh-article-toc-list { columns: 1; }
  .ssh-ad-slot--sidebar { display: none; }
  .ssh-ad-rail { display: none; }
  .ssh-topic-hub-sidebar .ssh-ad-slot--sidebar, .ssh-calculator-library-sidebar-column .ssh-ad-slot--sidebar { display: none; }
  .ssh-sticky-sidebar-ad { position: static; }
  .ssh-topic-directory { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ssh-home-calculator-groups { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ssh-recent-guide-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ssh-simple-feature-row { align-items: flex-start; flex-direction: column; }
  .ssh-footer-two-col { columns: 1; }
}

@media (max-width: 767.98px) {
  .ssh-article-toc { margin: 22px 0 26px; }
  .ssh-article-toc-trigger { min-height: 50px; padding: 11px 14px; font-size: 15px; }
  .ssh-article-toc-panel { padding: 10px 14px 12px; }

  .ssh-site-logo { max-width: 180px; height: 38px; }
  .ssh-header-main { min-height: 62px; gap: 12px; }
  .ssh-home-hero { padding: 38px 0 34px; }
  .ssh-home-hero p { font-size: 18px; }
  .ssh-home-section { padding: 34px 0; }
  .ssh-home-section-heading { align-items: flex-start; flex-direction: column; }
  .ssh-topic-directory { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ssh-home-calculator-groups { grid-template-columns: 1fr; gap: 24px; }
  .ssh-recent-guide-list { grid-template-columns: 1fr; }
  .ssh-tool-link-list--columns { columns: 1; }
  .ssh-directory-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .ssh-entry-content, .entry-content { font-size: 17px; line-height: 1.72; }
  .ssh-mobile-topic-nav ul { columns: 1; }
  .ssh-footer-bottom { flex-direction: column; }
  .ssh-calculator-meta-row, .ssh-meta-row { align-items: flex-start; flex-direction: column; }
  .ssh-share-menu { left: 0; right: auto; }
}

@media (max-width: 479.98px) {
  .ssh-topic-directory { grid-template-columns: 1fr; }
  .ssh-home-actions .btn { width: 100%; }
  .ssh-author-card, .ssh-calculator-author-box { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Darker utility text than Bootstrap's default for educational readability. */
.text-muted { color: var(--ssh-muted) !important; }
