/* =========================================================
   sasangraphic — blog (وبلاگ) styles
   Reuses the front-page design system (style.css): tokens,
   buttons, glass surfaces, section headers, reveal animations
   and the 980px/600px breakpoints. This file only adds the
   blog-specific layout on top of the shared design.
   ========================================================= */

/* ===================== BLOG HERO ===================== */
.blog-hero {
  min-height: 0;
  padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}
.blog-hero .container {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.blog-hero .hero-content {
  padding-block: 0;
  max-width: 780px;
}
.blog-hero-title {
  font-size: clamp(2.1rem, 3vw + 1.4rem, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.blog-hero .hero-sub {
  font-size: 1.05rem;
  max-width: 640px;
}
.blog-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.blog-hero::after {
  content: "";
  position: absolute;
  inset-inline-start: -12%;
  top: -35%;
  width: 52%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--glow-blue), transparent 65%);
  filter: blur(12px);
  opacity: 0.32;
  pointer-events: none;
}

/* hero visual — the left-hand column (RTL: second grid column).
   The image is prepared with a transparent background, so it sits
   in the hero with no border, frame, or glow — sized responsively. */
.blog-hero-visual {
  display: grid;
  place-items: center;
}
.blog-hero-visual img {
  width: 100%;
  max-width: min(440px, 100%);
  height: auto;
}

/* ===================== BREADCRUMBS ===================== */
.sg-breadcrumbs {
  margin-bottom: 1.7rem;
}
.sg-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.sg-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.sg-breadcrumbs li + li::before {
  content: "/";
  margin-inline-end: 0.4rem;
  color: var(--border-strong);
}
.sg-breadcrumbs a {
  color: var(--text-muted);
  transition: color var(--dur-fast);
}
.sg-breadcrumbs a:hover {
  color: var(--accent);
}
.sg-breadcrumbs [aria-current="page"] {
  color: var(--text);
}

/* ===================== CATEGORY PILLS ===================== */
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition:
    transform var(--dur-fast) var(--ease),
    border-color var(--dur-fast),
    background var(--dur-fast),
    color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.cat-pill:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 14px 34px -18px var(--accent-glow);
}
.cat-pill.is-active {
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in oklab, var(--accent) 62%, var(--violet))
  );
  color: var(--on-accent);
  border-color: transparent;
}
.cat-pill-count {
  font-size: 0.72rem;
  opacity: 0.8;
}

/* ===================== BLOG SEARCH ===================== */
.blog-search {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  min-width: min(330px, 100%);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.blog-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 14px 34px -18px var(--accent-glow);
}
.blog-search input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  padding: 0.55rem 0.9rem;
  flex: 1;
  min-width: 0;
  outline: none;
}
.blog-search input::placeholder {
  color: var(--text-faint);
}
.blog-search button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in oklab, var(--accent) 62%, var(--violet))
  );
  color: var(--on-accent);
  flex: none;
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast);
}
.blog-search button:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 30px -14px var(--accent-glow);
}
.blog-search button svg {
  width: 18px;
  height: 18px;
}

/* ===================== POSTS GRID + CARDS ===================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast),
    border-color var(--dur-fast);
}
.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 30px 60px -26px var(--accent-glow);
}
.post-thumb {
  position: relative;
  display: block;
  height: 210px;
  overflow: hidden;
}
.post-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(247, 247, 247, 0.1), transparent 60%);
  transition: opacity var(--dur-fast);
  pointer-events: none;
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-med) var(--ease);
}
.post-card:hover .post-thumb img {
  transform: scale(1.06);
}
.post-thumb-blank {
  background:
    radial-gradient(circle at 78% 22%, var(--glow-violet), transparent 55%),
    linear-gradient(135deg, var(--ink), var(--violet));
}
.post-thumb-blank::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.45;
}
.post-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.4rem 1.5rem 1.7rem;
}
.post-cat {
  align-self: flex-start;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
  display: inline-block;
  background: var(--accent-soft);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease);
}
.post-cat:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
}
.post-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.post-card-title a {
  transition: color var(--dur-fast);
}
.post-card-title a:hover {
  color: var(--accent);
}
.post-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}
.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}
.post-meta-item svg {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.85;
}
.post-meta-updated {
  color: var(--accent);
}

/* ===================== PAGINATION ===================== */
.post-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2.8rem;
}
.post-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 42px;
  height: 42px;
  padding: 0 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    transform var(--dur-fast) var(--ease),
    border-color var(--dur-fast),
    background var(--dur-fast),
    color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.post-pagination a.page-numbers:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 14px 34px -18px var(--accent-glow);
}
.post-pagination .page-numbers.current {
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in oklab, var(--accent) 62%, var(--violet))
  );
  color: var(--on-accent);
  border-color: transparent;
}
.post-pagination .page-numbers.dots {
  border: none;
  background: none;
  backdrop-filter: none;
}
.post-pagination .nav-arrow {
  font-size: 1rem;
  line-height: 1;
}

/* ===================== NO RESULTS ===================== */
.no-results {
  padding: 2.8rem 2rem;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.7rem;
}
.no-results h3 {
  font-size: 1.25rem;
  font-weight: 800;
}
.no-results p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.no-results .ghost-btn {
  margin-top: 0.6rem;
}

/* ===================== END-OF-ARCHIVE CTA ===================== */
.blog-cta-section {
  padding-top: 0;
}
.blog-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 2.8rem);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.8rem;
}
.blog-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, var(--glow-blue), transparent 60%);
  opacity: 0.25;
  pointer-events: none;
}
.blog-cta > * {
  position: relative;
  z-index: 1;
}
.blog-cta h3 {
  font-size: clamp(1.3rem, 1.5vw + 1rem, 1.8rem);
  font-weight: 800;
}
.blog-cta p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ===================== SINGLE POST ===================== */
.post-single {
  padding-top: calc(var(--nav-h) + clamp(2rem, 4vw, 3rem));
}
.post-header {
  max-width: 780px;
}
.post-single .post-cat {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.1rem;
}
.post-title {
  font-size: clamp(1.9rem, 2.4vw + 1.2rem, 3rem);
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 1rem;
}
.post-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.9;
}
.post-featured {
  margin: 2rem 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 2px;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, var(--accent), var(--violet));
}
.post-featured img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius-lg) - 2px);
}
.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  margin-top: 1.5rem;
  padding: 1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.post-author-avatar img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: block;
}
.post-meta-bar .post-meta-item {
  font-size: 0.84rem;
}

/* layout: content + sticky TOC (RTL: content first/right, TOC left) */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.6rem;
  align-items: start;
  margin-top: 2.4rem;
}
.post-toc-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

/* table of contents */
.sg-toc {
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  box-shadow: 0 20px 44px -30px rgba(0, 0, 0, 0.55);
}
.sg-toc summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}
.sg-toc summary::-webkit-details-marker {
  display: none;
}
.sg-toc-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.sg-toc-chevron svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-fast) var(--ease);
}
.sg-toc[open] .sg-toc-chevron svg {
  transform: rotate(180deg);
}
.sg-toc-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}
.sg-toc-list a {
  display: block;
  font-size: 0.86rem;
  line-height: 1.75;
  color: var(--text-muted);
  transition: color var(--dur-fast);
}
.sg-toc-list a:hover {
  color: var(--accent);
}
.sg-toc-l3 {
  padding-inline-start: 1.1rem;
}

/* article content typography */
.post-content {
  font-size: 1rem;
  line-height: 2;
}
.post-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.5;
  margin: 2rem 0 0.9rem;
}
.post-content h3 {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 1.6rem 0 0.8rem;
}
.post-content h4,
.post-content h5,
.post-content h6 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.3rem 0 0.7rem;
}
.post-content p {
  margin-bottom: 1.1rem;
}
.post-content > *:last-child {
  margin-bottom: 0;
}
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast);
}
.post-content a:hover {
  text-decoration-color: var(--accent);
}
.post-content ul,
.post-content ol {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.2rem;
  padding-inline-start: 1.5rem;
}
.post-content ul {
  list-style: disc;
}
.post-content ol {
  list-style: decimal;
}
.post-content li::marker {
  color: var(--accent);
}
.post-content img,
.post-content figure {
  max-width: 100%;
}
.post-content img {
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.4rem auto;
}
.post-content figure {
  margin: 1.6rem 0;
}
.post-content figure img {
  margin: 0 auto;
}
.post-content figcaption {
  font-size: 0.82rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: 0.6rem;
}
.post-content blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.3rem;
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.post-content blockquote p {
  margin: 0;
}
.post-content strong,
.post-content b {
  font-weight: 700;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: start;
}

/* tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.post-tags-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}
.post-tag {
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.26rem 0.72rem;
  border-radius: 999px;
  transition:
    background var(--dur-fast),
    transform var(--dur-fast) var(--ease);
}
.post-tag:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
}

/* social share */
.post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.3rem;
}
.post-share-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-inline-end: 0.35rem;
}
.share-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition:
    transform var(--dur-fast) var(--ease),
    border-color var(--dur-fast),
    color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.share-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -16px var(--accent-glow);
}
.share-btn svg {
  width: 18px;
  height: 18px;
}

/* end-of-article CTA */
.post-cta {
  margin-top: 2.2rem;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.7rem;
}
.post-cta h3 {
  font-size: 1.3rem;
  font-weight: 800;
}
.post-cta p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* previous / next navigation */
.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.post-nav-card {
  display: grid;
  gap: 0.45rem;
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius-md);
  transition:
    transform var(--dur-fast) var(--ease),
    border-color var(--dur-fast),
    background var(--dur-fast),
    box-shadow var(--dur-fast);
}
.post-nav-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow: 0 18px 40px -24px var(--accent-glow);
}
.post-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}
.post-nav-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.7;
}
.post-nav-card.next {
  text-align: end;
}

/* author box */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  padding: 1.9rem;
}
.author-avatar img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: block;
  flex: none;
}
.author-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.author-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0.35rem 0 0.5rem;
}
.author-bio {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.9;
}

/* ===================== COMMENTS ===================== */
.comments-section {
  margin-top: 2.4rem;
}
.comments-area {
  max-width: 820px;
}
.comments-head {
  margin-bottom: 2.2rem;
}
.comments-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0;
}
.comments-head .comments-title {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem);
  line-height: 1.4;
}
.comments-title svg {
  width: 1.3em;
  height: 1.3em;
  color: var(--accent);
  flex: none;
}
.comment-list {
  display: grid;
  gap: 1.1rem;
  margin: 0 0 2.2rem;
}
.comment-list .children {
  display: grid;
  gap: 1.1rem;
  list-style: none;
  margin: 1.1rem 0 0;
  margin-inline-start: clamp(1.1rem, 4vw, 2.75rem);
}
.comment-card {
  padding: 1.15rem 1.3rem;
}
.comment-item-pending > .comment-card {
  border-color: rgba(217, 119, 6, 0.35);
}
.comment-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.comment-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: block;
  flex: none;
}
.comment-id {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
}
.comment-author {
  font-weight: 700;
  font-size: 0.95rem;
}
.comment-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 62%, var(--violet)));
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
}
.comment-pending {
  font-size: 0.7rem;
  font-weight: 600;
  color: #d97706;
  background: rgba(217, 119, 6, 0.12);
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
}
.comment-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-inline-start: auto;
}
.comment-date svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
}
.comment-text {
  font-size: 0.95rem;
  line-height: 1.9;
}
.comment-text p {
  margin-bottom: 0.55rem;
}
.comment-text p:last-child {
  margin-bottom: 0;
}
.comment-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.comment-text blockquote {
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 1rem;
  color: var(--text-muted);
}
.comment-text ul,
.comment-text ol {
  padding-inline-start: 1.4rem;
  list-style: disc;
}
.comment-text ol {
  list-style: decimal;
}
.comment-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 0.85rem;
}
.comment-reply-link,
.comment-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  transition: opacity var(--dur-fast) var(--ease);
}
.comment-reply-link:hover,
.comment-edit-link:hover {
  opacity: 0.75;
}
.comments-empty,
.comments-closed {
  color: var(--text-muted);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.2rem;
}
.comment-respond {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.5vw, 2.1rem);
}
.comments-reply-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.3rem;
}
.comments-reply-title #cancel-comment-reply-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-inline-start: 0.75rem;
}
.comment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.comment-form .form-group {
  margin-bottom: 0;
}
.comment-form .form-fg-half {
  grid-column: span 1;
}
.comment-form .form-fg-full {
  grid-column: 1 / -1;
}
.comment-form input[type="email"] {
  direction: ltr;
  text-align: left;
}
.comment-notes,
.comment-logged-in {
  font-size: 0.82rem;
  color: var(--text-faint);
  grid-column: 1 / -1;
  margin: 0;
}
.comment-notes a,
.comment-logged-in a {
  color: var(--accent);
  font-weight: 600;
}
.comment-form .form-consent label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
}
.comment-form .form-consent input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  flex: none;
}
.comment-form .form-submit {
  grid-column: 1 / -1;
  margin: 0;
}
.comment-form .form-submit .cta-btn {
  width: 100%;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* TOC collapses above the article content on tablet/mobile */
  .post-toc-wrap {
    position: static;
    order: -1;
  }
  /* Blog hero collapses to one column — the image moves above the text */
  .blog-hero .container {
    grid-template-columns: 1fr;
  }
  .blog-hero-visual {
    order: -1;
    margin-top: 1.5rem;
  }
  .blog-hero-visual img {
    max-width: 340px;
  }
}

@media (max-width: 600px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .post-nav-grid {
    grid-template-columns: 1fr;
  }
  .post-nav-card.next {
    text-align: start;
  }
  /* Comments: single-column form, date sits next to the author name */
  .comment-form {
    grid-template-columns: 1fr;
  }
  .comment-form .form-fg-half {
    grid-column: 1 / -1;
  }
  .comment-date {
    margin-inline-start: 0;
  }
  .post-thumb {
    height: 195px;
  }
  .blog-hero-visual img {
    max-width: 280px;
  }
  .blog-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-hero-actions .cta-btn,
  .blog-hero-actions .blog-search button {
    justify-content: center;
  }
  .blog-search {
    min-width: 100%;
  }
  .post-meta-bar {
    padding: 0.95rem 1.05rem;
    gap: 0.5rem 1rem;
  }
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .post-featured {
    margin-top: 1.6rem;
  }
  .post-layout {
    margin-top: 2rem;
  }
}

/* =========================================================
   LEGAL PAGE (privacy policy) — clean presentation, same chrome
   The content typography reuses .post-content (headings, lists,
   spacing above); this section only adds the legal container and
   polish. The legal text itself is never modified.
   ========================================================= */
.container-narrow {
  width: min(760px, 92%);
  margin-inline: auto;
}
.sg-legal {
  padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  min-height: 72vh;
}
.legal-header {
  position: relative;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.legal-title {
  font-size: clamp(1.9rem, 2.6vw + 1rem, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
}
.legal-content {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
}
.sg-legal .post-content {
  font-size: 1rem;
}
.sg-legal .post-content h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
}
.sg-legal .post-content h2:first-child {
  margin-top: 0;
}
.sg-legal .post-content h3 {
  font-size: 1.12rem;
  margin-top: 1.75rem;
}
.sg-legal .post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--dur-fast);
}
.sg-legal .post-content a:hover {
  opacity: 0.75;
}
.sg-legal .post-content strong.privacy-policy-tutorial {
  display: block;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}
@media (max-width: 600px) {
  .legal-content {
    padding: 1.25rem;
  }
}





