/* Saihatask blog detail — extends site.css without changing landing-page rules. */
.blog-page {
  --sky: var(--noon);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(36, 60, 230, .08), transparent 60%),
    radial-gradient(900px 500px at 90% 8%, rgba(255, 159, 90, .12), transparent 55%),
    linear-gradient(180deg, var(--dawn) 0%, var(--noon) 42%, #eef1ff 100%);
  color: var(--ink);
}

.blog-page .top {
  background: color-mix(in srgb, #f5f7ff 78%, transparent);
}

.blog-page .foot {
  background: var(--night);
  margin: 0;
  padding-top: 8px;
}

/* Mobile nav (blog page only — homepage keeps existing header behaviour) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.mobile-nav {
  position: fixed;
  top: 68px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 25;
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -28px rgba(16, 21, 58, .45);
  backdrop-filter: blur(14px);
}
.mobile-nav[hidden] {
  display: none !important;
}
.mobile-nav a {
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 500;
}
.mobile-nav a:hover {
  background: rgba(36, 60, 230, .06);
}
.mobile-nav .btn {
  margin-top: 8px;
  justify-content: center;
}

/* ---------- hero ---------- */
.article-hero {
  padding: 112px var(--gutter) 0;
  width: 100%;
  margin: 0;
}
.article-hero-inner {
  max-width: none;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(16, 21, 58, .1);
}
.article-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-bottom: 26px;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(36, 60, 230, .16);
  background: rgba(255, 255, 255, .55);
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.article-back:hover {
  background: #fff;
  border-color: rgba(36, 60, 230, .35);
  text-decoration: none;
}
.article-eyebrow-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(16, 21, 58, .28);
}
.article-tag {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(36, 60, 230, .1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.article-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -.04em;
  max-width: min(18ch, 100%);
  margin: 0 0 20px;
  color: var(--ink);
}
.article-excerpt {
  margin: 0 0 24px;
  max-width: min(62ch, 100%);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
}
.article-stats {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(16, 21, 58, .04);
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
}
.article-stats time {
  color: var(--ink);
  font-weight: 600;
}
.article-stats-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(16, 21, 58, .35);
}
/* ---------- layout ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: clamp(28px, 4vw, 56px);
  width: 100%;
  margin: 0;
  padding: 28px var(--gutter) 72px;
  align-items: start;
}

.article-body {
  max-width: none;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}
.article-lede {
  font-size: 1.12em;
  color: var(--ink-soft);
  margin: 0 0 1.5em;
}
.article-body h2 {
  font-size: clamp(26px, 3vw, 34px);
  max-width: none;
  margin: 2.2em 0 .7em;
  scroll-margin-top: 96px;
}
.article-body h3 {
  font-size: 22px;
  margin: 1.6em 0 .5em;
  scroll-margin-top: 96px;
}
.article-body p {
  margin: 0 0 1.15em;
  max-width: none;
  color: inherit;
}
.article-body a {
  color: var(--blue);
  font-weight: 500;
}
.article-body ul,
.article-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.25em;
  color: var(--ink-soft);
}
.article-body li {
  margin: 0 0 .55em;
  padding-left: .2em;
}
.article-body li::marker {
  color: var(--blue);
}
.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-quote {
  margin: 2em 0;
  padding: 22px 24px 22px 26px;
  border-left: 3px solid var(--blue);
  border-radius: 0 18px 18px 0;
  background: linear-gradient(135deg, rgba(36, 60, 230, .07), rgba(231, 227, 255, .55));
}
.article-quote p {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--ink);
}
.article-quote cite {
  font-style: normal;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.callout {
  margin: 1.8em 0;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
}
.callout-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
}
.callout p:last-child {
  margin: 0;
  color: var(--ink-soft);
}
.callout.tip {
  background: linear-gradient(135deg, rgba(36, 60, 230, .08), rgba(255, 255, 255, .8));
  border-color: rgba(36, 60, 230, .16);
}
.callout.note {
  background: linear-gradient(135deg, rgba(255, 159, 90, .14), rgba(255, 255, 255, .85));
  border-color: rgba(255, 159, 90, .28);
}
.callout.note .callout-label {
  color: #c45f1a;
}

/* ---------- aside ---------- */
.article-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}
.aside-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(16, 21, 58, .08);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px -30px rgba(16, 21, 58, .35);
}
.aside-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.toc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
}
.toc-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.toc-toggle[aria-expanded="false"] .toc-chevron {
  transform: rotate(-135deg);
}
.toc-toggle[aria-expanded="false"] + .toc {
  display: none;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.toc a {
  display: block;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
}
.toc a:hover,
.toc a.is-active {
  color: var(--ink);
  background: rgba(36, 60, 230, .06);
  border-left-color: var(--blue);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(16, 21, 58, .12);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.share-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-1px);
}
.share-feedback {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--blue);
  font-weight: 600;
}

.aside-cta p:nth-child(2) {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--ink-soft);
}
.aside-cta .btn {
  width: 100%;
}

/* ---------- end band ---------- */
.blog-end {
  background: var(--night);
  color: #fff;
  padding-top: 20px;
}
.related-blog {
  padding-top: 40px;
}
.blog-cta {
  padding: 20px var(--gutter) 40px;
}
.blog-cta-inner {
  max-width: none;
  margin: 0;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background:
    radial-gradient(600px 240px at 10% 0%, rgba(36, 60, 230, .45), transparent 60%),
    radial-gradient(500px 220px at 90% 100%, rgba(255, 159, 90, .28), transparent 55%),
    linear-gradient(135deg, #16205a, #0a1030 55%, #141b4a);
  border: 1px solid rgba(223, 228, 255, .16);
}
.blog-cta h2 {
  color: #fff;
  max-width: 14ch;
  margin-bottom: 12px;
}
.blog-cta p {
  margin: 0 0 24px;
  max-width: 48ch;
  color: #b9c0e8;
}
.blog-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.blog-cta-line {
  color: #fff !important;
  border-color: rgba(223, 228, 255, .55) !important;
}
.blog-cta-line:hover {
  background: rgba(255, 255, 255, .08) !important;
}

.blog-page .news {
  max-width: none;
  margin: 0;
  width: 100%;
}

/* Back to top */
.back-top {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 31;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 21, 58, .9);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px -12px rgba(16, 21, 58, .55);
  transition: opacity .2s ease, transform .2s ease;
}
.back-top[hidden] {
  display: none !important;
}
.back-top:hover {
  transform: translateY(-2px);
  background: var(--blue);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .share-btn:hover,
  .back-top:hover {
    transform: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 56px;
  }
  .article-aside {
    position: static;
    order: 2;
  }
  .article-body {
    order: 1;
  }
}
@media (max-width: 900px) {
  .blog-page .links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}
@media (max-width: 720px) {
  .article-hero {
    padding-top: 104px;
  }
  .article-title {
    max-width: none;
  }
  .article-layout {
    padding-top: 24px;
  }
  .article-body {
    font-size: 17px;
  }
  .back-top {
    left: 12px;
    bottom: 84px;
  }
}
@media (max-width: 520px) {
  .article-quote {
    padding: 18px;
  }
  .blog-cta-actions {
    flex-direction: column;
  }
  .blog-cta-actions .btn {
    width: 100%;
  }
}
