/* Blog pages. Loaded after /styles.css, only on /blog/ pages.
   Uses the site's own color variables, so the same file works on every niche site. */

/* ---------- Header ---------- */
.blog-header{ margin: 48px auto 36px; }
.blog-header .logo{ width: 84px; height: 84px; border-radius: 22px; }
.blog-header h1{
  font-size: 38px;
  line-height: 1.15;
  margin: 22px auto 12px;
  text-wrap: balance;
}
.blog-header h2{
  font-size: 19px;
  line-height: 1.5;
  font-weight: 400;
  max-width: 640px;
  text-wrap: balance;
}
.blog-nav{ gap: 8px; margin-top: 22px; }
.blog-nav a{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 15px;
  transition: background .15s ease, border-color .15s ease;
}
.blog-nav a:hover{ background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); }
.blog-nav a[aria-current="page"]{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  color: var(--fg);
}

/* ---------- Layout ---------- */
.post-page .blog-wrap{ max-width: 820px; }
.post-card{ padding: 44px 52px 40px; border-radius: 32px; }
.blog-index .blog-card{ padding: 40px; border-radius: 32px; }

/* ---------- Post meta pills ---------- */
.post-meta-top{ flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.post-meta-top .dot{ display: none; }
.post-meta-top .readtime{
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.05);
}
.post-meta-top .tag{
  border-color: rgba(240,181,74,0.45);
  color: var(--accent);
}

/* ---------- Article typography ---------- */
.post-content{ font-size: 18px; line-height: 1.75; color: rgba(242,229,215,0.82); }
.post-content p{ margin: 0 0 18px; }
.post-content strong{ color: var(--fg); }
.post-content h2{ font-size: 24px; line-height: 1.3; margin: 40px 0 12px; }
.post-content h3{ font-size: 18px; line-height: 1.4; margin: 22px 0 6px; color: var(--fg); }
.post-content ul{ margin: 4px 0 22px; padding-left: 22px; }
.post-content ul li{ margin: 6px 0; }
.post-content ul li::marker{ color: var(--accent); }
.post-content img{ border-radius: 18px; margin: 0 0 26px; }
.callout{
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: rgba(240,181,74,0.08);
  padding: 16px 18px;
  margin: 26px 0;
}
.post-content .lead-note{ color: var(--muted); font-size: 16px; margin: 6px 0 0; }

/* ---------- Practice test ---------- */
.post-content .quiz{ list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
.q{
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(0,0,0,0.12);
}
.q-num{
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.post-content .q-text{ color: var(--fg); font-size: 18px; font-weight: 700; line-height: 1.5; margin: 0 0 16px; }
.post-content .choices{ list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.post-content .choices li{ margin: 0; }
.choice{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(242,229,215,0.88);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 14px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.choice:hover{ background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); }
.choice:disabled{ cursor: default; }
.choice:disabled:not(.right):not(.wrong){ opacity: .55; }
.choice .l{
  flex: 0 0 26px;
  height: 26px;
  margin-top: -1px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.choice.right{ border-color: rgba(92,184,128,0.75); background: rgba(92,184,128,0.14); }
.choice.right .l{ background: #5cb880; border-color: #5cb880; color: #0b1326; }
.choice.wrong{ border-color: rgba(224,110,110,0.75); background: rgba(224,110,110,0.12); }
.choice.wrong .l{ background: #e06e6e; border-color: #e06e6e; color: #0b1326; }

.answer{ margin-top: 14px; }
.answer summary{
  cursor: pointer;
  list-style: none;
  width: fit-content;
  font-size: 15px;
  color: var(--muted);
}
.answer summary::-webkit-details-marker{ display: none; }
.answer summary:hover{ color: var(--fg); }
.answer .h{ display: none; }
.answer[open] .s{ display: none; }
.answer[open] .h{ display: inline; }
.answer .box{
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid var(--accent);
}
.post-content .answer .box p{ font-size: 16px; line-height: 1.6; margin: 0 0 8px; }
.post-content .answer .box p:last-child{ margin: 0; }

.result{
  margin: 24px 0 30px;
  padding: 22px;
  border-radius: 20px;
  text-align: center;
  background: rgba(240,181,74,0.08);
  border: 1px solid rgba(240,181,74,0.25);
}
.result strong{ display: block; font-size: 24px; color: var(--fg); margin-bottom: 2px; }
.result span{ color: var(--muted); font-size: 16px; }

/* ---------- One question at a time ----------
   All questions are in the HTML. The script adds .stepper to show one at a time.
   Without the script, everything shows as a list. */
.quiz-wrap{ margin: 26px 0 34px; scroll-margin-top: 16px; }
.quiz-bar, .quiz-nav{ display: none; }
.stepper .quiz-bar{ display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.quiz-progress{ flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.quiz-progress span{ display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .25s ease; }
.quiz-toggle{
  font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer;
  border-bottom: 1px solid var(--link-underline);
}
.quiz-toggle:hover{ color: var(--fg); }
.stepper .q{ display: none; }
.stepper .q.active{ display: block; }
.stepper .result{ display: none; }
.stepper .quiz-nav{ display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.stepper.done .quiz-nav, .stepper.done .quiz, .stepper.done .quiz-bar{ display: none; }
.stepper.done .result{ display: block; margin-top: 0; }
:not(.stepper) > .quiz-bar + .quiz{ margin-top: 0; }
.quiz-wrap:not(.stepper) .quiz-bar{ display: flex; justify-content: flex-end; margin-bottom: 10px; }

.btn{
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: #0b1326;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn.ghost{ background: transparent; color: var(--fg); border-color: var(--border); }
.btn.ghost:hover{ background: rgba(255,255,255,0.06); }
.btn:disabled{ opacity: .35; cursor: default; transform: none; }

.missed{ text-align: left; margin: 18px auto 0; max-width: 560px; }
.post-content .missed p{ margin: 0 0 6px; font-size: 15px; color: var(--muted); }
.post-content .missed ul{ margin: 0; font-size: 15px; line-height: 1.5; }
.result-btns{ display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.result-cta{ margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(240,181,74,0.2); }
.post-content .result-cta p{ margin: 0; color: var(--fg); font-size: 16px; }

/* ---------- Related links ---------- */
.related{ margin: 40px 0 0; }
.post-content .related ul{
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.post-content .related li{ margin: 0; }
.post-content .related a{
  display: block;
  height: 100%;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,0.10);
  transition: background .15s ease, border-color .15s ease;
}
.post-content .related a:hover{ background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.22); }

/* ---------- Call to action ---------- */
.post-cta{
  margin-top: 40px;
  padding: 34px 28px 30px;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(116,155,191,0.18), rgba(116,155,191,0.05));
  border: 1px solid var(--border);
}
.post-cta h2{ margin: 0 0 8px; font-size: 26px; }
.post-cta p{ color: var(--muted); max-width: 520px; margin: 0 auto; }
.badges{ display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin: 20px 0 0; }
.badges a, .badges a:hover{ display: inline-block; line-height: 0; border: 0; text-decoration: none; box-shadow: none; }
.badges a{ transition: transform .15s ease; }
.badges a:hover{ transform: translateY(-1px); }
.post-content .badges img, .badges img{ height: 54px; width: auto; margin: 0; border-radius: 0; }
.post-back{ text-align: center; margin: 22px 0 0; }

/* ---------- Blog index ---------- */
.blog-index .blog-top{ margin: 0 0 14px; }
.blog-index .blog-top ~ .blog-top{ margin-top: 40px; }
.blog-index .blog-list{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 0; }
.post-item{ border-radius: 20px; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.post-item:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }
.post-link{ height: 100%; padding: 20px 22px; }
.post-item h3{ font-size: 19px; line-height: 1.3; margin: 0 0 8px; }
.post-item p{ font-size: 15px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px){
  .blog-header{ margin: 28px auto 26px; }
  .blog-header .logo{ width: 72px; height: 72px; border-radius: 18px; }
  .blog-header h1{ font-size: 28px; }
  .blog-header h2{ font-size: 17px; }
  .post-card{ padding: 28px 20px; border-radius: 26px; }
  .blog-index .blog-card{ padding: 26px 18px; border-radius: 26px; }
  .blog-index .blog-list{ grid-template-columns: 1fr; }
  .post-content{ font-size: 17px; }
  .post-content h2{ font-size: 22px; margin-top: 32px; }
  .q{ padding: 18px 16px; }
  .post-cta{ padding: 26px 18px; }
  .badges img{ height: 48px; }
}

/* ---------- Footer disclaimer ---------- */
.disclaimer{ max-width: 743px; width: calc(100% - 40px); margin: -24px auto 40px; font-size: 13px; color: var(--muted-2); }
