/* Base reset */
* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  line-height: 1.6;
  color: #0f172a;
  margin: 0;
  background: #f8fafc
}

a {
  color: #0ea5e9;
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #0b1220;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .2px;
  display: flex;
}

.brand img {
  width: 160px;
  height: auto;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 14px;
  flex-wrap: wrap
}

.nav a {
  color: #cbd5e1;
  font-size: 14px
}

.nav a.active {
  color: #fff;
  text-decoration: underline
}

.main {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 24px
}

@media (max-width: 980px) {
  .main {
    grid-template-columns: 1fr
  }

  .toc {
    order: 2
  }
}

.toc {
  position: sticky;
  top: 64px;
  align-self: start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  max-height: 75vh;
  overflow: auto
}

.toc h3 {
  margin: .2rem 0 .6rem 0;
  font-size: 14px;
  color: #334155
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0
}

.toc li {
  padding: 4px 0
}

.toc a {
  font-size: 14px;
  color: #0f172a
}

.article {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  max-width: 100%;
  min-width: 0;
}

.article h1 {
  font-size: 28px;
  margin: 0 0 6px
}

.article .meta {
  color: #475569;
  font-size: 12px;
  margin-bottom: 16px
}

.blocks {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.block {
  padding: 16px;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  background: #fcfcfd
}

.block h2 {
  margin-top: 0
}

/* Author block */
.author {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 16px
}

.author .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0ea5e9;
  display: inline-block;
  flex: none;
  overflow: hidden
}

.author .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.author .info {
  font-size: 14px
}

/* FAQ accordion */
.faq .item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin: 10px 0;
  background: #fff
}

.faq .q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: #f1f5f9;
  border-radius: 12px;
  cursor: pointer
}

.faq .a {
  display: none;
  padding: 14px 16px
}

.faq .item.open .a {
  display: block
}

/* Footer */
.footer {
  margin-top: 32px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
  padding: 24px
}

code,
pre {
  background: #f1f5f9;
  border-radius: 8px;
  padding: .2em .4em
}

table {
  border-collapse: collapse;
  width: 100%
}

td,
th {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left
}

/* ------------------------------ */
/* Mobile navigation and burger  */
/* These styles add a hamburger button for small screens and toggle the primary navigation. */

/* Base burger button: hidden by default on larger screens */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fff;
}

/* Ensure the burger is hidden on larger screens */
@media (min-width: 769px) {
  .burger {
    display: none;
  }
}

/* Responsive adjustments for screens 768px and narrower */
@media (max-width: 768px) {

  .btns-group a {
    min-width: auto !important;
  }

  /* Allow header content to wrap so nav appears on a new row */
  .header .wrap {
    flex-wrap: wrap;
  }

  /* Hide nav by default and stack its links vertically when shown */
  .nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-left: 0;
    padding: 8px 0;
    background: #0b1220;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Show nav when it has .open class, toggled via JS */
  .nav.open {
    display: flex;
  }

  /* Style nav links for mobile */
  .nav a {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
  }

  /* Display the burger button and push it to the right */
  .burger {
    display: flex;
    margin-left: auto;
  }
}

.wp-block-table {
  margin: 0;
  display: block;
  overflow-x: auto;
}

.btns-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btns-group a {
  border: 1px solid #0b1220;
  padding: 5px 15px;
  border-radius: 5px;
  background: #1d3055;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  min-width: 170px;
  text-align: center;
  transition: .3s;
}

.btns-group a:hover {
  background: #0b1220;
}