/* ── Base typography & layout ─────────────────────────────────────── */
:root {
  --smile-blue: rgb(47, 164, 231);
  --smile-blue-dark: #2984b5;
  --smile-surface: #eef6fd;
  --smile-sidebar: #fef4e9;
  --smile-text-muted: #8f8f8f;
  --smile-content-max: 920px;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  color: #333;
}

.site-container {
  max-width: 1280px;
}

.site-content {
  margin-top: 1.25rem;
}

.site-content > [class*="col-md-9"] {
  max-width: var(--smile-content-max);
}

/* ── Masthead ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.masthead {
  padding: 0.75rem 0 0.25rem;
}

.masthead-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.masthead-link:hover {
  text-decoration: none;
}

.masthead-logo {
  height: 48px;
  width: auto;
}

.tagline {
  display: inline-block;
  color: var(--smile-blue);
  padding-bottom: 5px;
  font-weight: bold;
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
}

/* ── Navbar (Cerulean brand) ──────────────────────────────────────── */
.site-navbar {
  background: #2fa4e7 !important;
  border: none;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  margin-bottom: 0;
}

.site-navbar .navbar-nav .nav-link {
  padding-top: 12px;
  padding-bottom: 12px;
  color: rgba(255, 255, 255, 0.92);
}

.site-navbar .navbar-nav .nav-link:hover,
.site-navbar .navbar-nav .nav-link:focus {
  color: #fff;
}

.site-navbar .dropdown-menu .dropdown-item {
  color: #212529;
  font-weight: 500;
}

.site-navbar .dropdown-menu .dropdown-item:hover {
  background: var(--smile-surface);
}

@media (min-width: 992px) {
  .site-navbar .dropdown:hover > .dropdown-menu {
    display: block;
  }
}

/* ── Hero / jumbotron replacement ─────────────────────────────────── */
.hero-panel {
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
  color: rgb(85, 85, 85);
  background: var(--smile-surface);
  text-align: center;
  line-height: inherit;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  border-radius: 0.5rem;
}

.row-padded {
  margin-top: 30px;
}

.col-padded-top {
  margin-top: 30px;
  margin-bottom: 18px;
}

/* ── Code & tabs ──────────────────────────────────────────────────── */
.code {
  font-family: ui-monospace, "Menlo", "Lucida Console", Consolas, monospace;
  font-size: 11px;
}

@media (min-width: 1200px) {
  .code {
    font-size: 13px;
  }
}

.code.code-big {
  font-size: 14px;
}

@media (min-width: 992px) {
  .code.code-big {
    font-size: 16px;
  }
}

.code .string { color: #2b8eeb; }
.code .sparkop { color: #1663a8; }
.code .closure { color: #c1130e; }
.code .comment { color: #272; }
.code .tgf { color: #f28424; }
.code .keyword { font-weight: 600; }

.nav.nav-tabs {
  border-bottom-color: #dee2e6;
}

.nav.nav-tabs .nav-link {
  padding: 6px 11px;
  font-size: 14px;
  border-radius: 0.25rem 0.25rem 0 0;
  color: #495057;
}

.nav.nav-tabs .nav-link.active {
  font-weight: 600;
}

.tab-content pre[class*="language-"] {
  margin: 0;
  border-radius: 0 0 0.375rem 0.375rem;
  font-size: 0.85em;
}

.tab-content pre[class*="language-"] code {
  text-align: left;
  display: block;
}

.code-tab {
  margin-bottom: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

code {
  font-family: ui-monospace, "Menlo", "Lucida Console", Consolas, monospace;
  background: transparent;
  padding: 0;
  color: inherit;
}

/* ── Sidebar & TOC ────────────────────────────────────────────────── */
#sidebar {
  position: sticky;
  top: 7.5rem;
}

.sidebar-toc {
  background: var(--smile-sidebar);
  border-radius: 6px;
  padding: 4px 12px 1px 12px;
}

.sidebar-toc ul li {
  margin-bottom: 6px;
}

p.toc-header {
  margin-left: 15px;
  font-weight: bold;
  font-size: 16px;
}

/* ── News / community panels ──────────────────────────────────────── */
.news,
.community {
  background: var(--smile-sidebar);
  border-radius: 6px;
  padding: 4px 12px 1px 12px;
}

.news h1, .news h2, .news h3, .news h4, .news h5,
.community h1, .community h2, .community h3, .community h4, .community h5 {
  color: rgb(85, 85, 85);
}

.news ul li,
.community ul li {
  margin-bottom: 6px;
}

.news li a, .news li a:hover, .news li a:visited {
  color: rgb(85, 85, 85);
}

.news li .small,
.community li .small {
  color: #888;
  font-size: 12px;
}

.news h5,
.community h5 {
  font-size: 16px;
}

.community ul {
  list-style: inside;
  padding-left: 0;
}

/* ── Testimonial carousel ─────────────────────────────────────────── */
.testimonial-carousel {
  margin-top: 1rem;
  padding-bottom: 2.5rem;
}

.testimonial {
  padding: 0 25px;
}

.testimonial-content {
  background: var(--smile-blue);
  padding: 20px 39px 10px;
  border-radius: 20px;
  position: relative;
}

.testimonial-description {
  text-align: left;
  margin-bottom: 0;
  color: #fff;
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
}

.testimonial-review {
  text-align: right;
}

.testimonial-review .testimonial-title {
  display: inline-block;
  font-size: 16px;
  color: #fff;
}

.testimonial-review .testimonial-title > small {
  font-size: 13px;
  color: #fff;
}

.testimonial-carousel .carousel-indicators {
  margin-bottom: 0;
}

.testimonial-carousel .carousel-indicators [data-bs-target] {
  background-color: var(--smile-blue);
  opacity: 0.35;
}

.testimonial-carousel .carousel-indicators .active {
  opacity: 1;
}

.testimonial-carousel .carousel-control-prev,
.testimonial-carousel .carousel-control-next {
  width: 8%;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-carousel.carousel slide {
    transition: none;
  }
}

@media only screen and (max-width: 767px) {
  .testimonial {
    padding: 0 15px;
  }
  .testimonial-content {
    padding: 12px 16px 8px;
  }
}

/* ── Misc layout helpers ───────────────────────────────────────────── */
.caption {
  width: 100%;
  margin-top: 20px;
  text-align: center;
  color: var(--smile-text-muted);
}

footer {
  text-align: center;
  color: var(--smile-text-muted);
  padding-bottom: 18px;
}

footer a {
  color: var(--smile-blue-dark);
}

.col-right { text-align: center; }
.col-left { text-align: center; }

@media (min-width: 992px) {
  .col-right { text-align: right; }
  .col-left { text-align: left; }
}

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

.list-narrow { padding-left: 1.5em; }
.list-none { list-style: none; padding: 0; }

.col-padded {
  margin-top: 30px;
  margin-bottom: 30px;
}

.subproject {
  display: inline-block;
  font-weight: 200;
  color: #333;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
}

.btn-lg .small { font-size: 14px; }

.question {
  font-size: 16px;
  margin-top: 20px;
  color: #555;
  font-weight: 500;
}

.entry-date {
  color: #888;
  font-size: 14px;
}

.entry-header {
  margin-top: 30px;
  margin-bottom: 10px;
}

.btn-multiline {
  width: 280px;
  padding-top: 11px;
  padding-bottom: 11px;
  line-height: 1.25;
}

.tabs-below > .nav-tabs,
.tabs-right > .nav-tabs,
.tabs-left > .nav-tabs {
  border-bottom: 0;
}

figure {
  text-align: center;
  margin: 10px auto;
}

.download-btn {
  min-width: 300px;
  background-color: #5bb75b;
  color: #ffffff;
  text-align: center;
  line-height: 82px;
  font-size: 1.4em;
  cursor: pointer;
}

.two-sided-pill { border-radius: 3em; }
.centered { text-align: center; }

#tag-line-pill-button {
  height: 54px;
  line-height: 54px;
  width: 319px;
  color: white;
  font-size: 18px;
  background-color: #72D6FF;
  margin-top: 40px;
  letter-spacing: 3px;
  transition: all 0.3s ease;
}

.index-h1 {
  font-size: 16px;
  line-height: 150%;
}

.index-h2 {
  display: block;
  font-size: 14px;
  margin-left: 15px;
  line-height: 150%;
}

.index-h3 {
  line-height: 150%;
  display: block;
  font-size: 12px;
  margin-left: 26px;
}

.enlarge:hover {
  transform: scale(1.5, 1.5);
  transform-origin: 50% 50%;
}

#btnv {
  padding-top: 2em;
  padding-bottom: 2.5em;
  display: table;
  width: 100%;
}

#btnv .btn-arrow-left, #btnv .btn-arrow-right, #btnv .btn-next-text, #btnv .btn-prev-text {
  display: table-cell;
  vertical-align: middle;
}

#btnv .btn-next-text > span, #btnv .btn-prev-text > span {
  display: inline-block;
  width: 200px;
}

#btnv .btn-arrow-right, #btnv .btn-prev-text, .align-left, .text-left, div.body td, th {
  text-align: left;
}

#btnv .btn-arrow-left, #btnv .btn-next-text, .align-right, .modal-footer, .text-right {
  text-align: right;
}

/* Google custom search */
input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus, .gsc-search-button {
  box-sizing: content-box;
  line-height: normal;
}

.gsc-tabsArea div {
  overflow: visible;
}

h1 {
  border-bottom: 2px solid #CCC;
  padding-bottom: 10px;
}

.github-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.github-actions .btn {
  min-width: 9rem;
}
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--smile-blue);
  outline-offset: 2px;
}
