/* Blog article pages and the /blog/ journal-tips index. */

.blog-article {
  position: relative;
  z-index: 1;
}

.blog-hero {
  padding-top: clamp(1.4rem, 4vw, 2.8rem);
}

.blog-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}

.blog-hero h1 {
  max-width: none;
  margin-bottom: 0.9rem;
  font-size: clamp(1.95rem, 3.6vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.blog-dek {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.6;
}

.blog-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.blog-byline img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: var(--bg);
}

.blog-byline p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  line-height: 1.4;
}

.blog-author {
  color: var(--text);
  font-weight: 600;
}

.blog-cta {
  margin-top: 1.35rem;
}

.blog-generator {
  display: flex;
  justify-content: center;
  margin: 1.75rem 0 0.35rem;
}

.blog-generator .tool-card {
  width: min(100%, 40rem);
  min-width: 0;
  margin-inline: auto;
}

.blog-prose .tool-card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  scroll-margin-top: 6rem;
}

.blog-prose .tool-card ul,
.blog-prose .tool-card ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.blog-prose .tool-card li + li { margin-top: 0; }

.blog-prose .tool-card .jp-saved-list { margin: 0 0 0.9rem; }

.blog-prose .tool-card ol.jp-prompt-pool {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.blog-inline-cta {
  width: min(100%, 40rem);
  margin: 1.85rem auto 0.25rem;
  padding: 1.35rem 1.35rem 1.45rem;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(216, 162, 106, 0.14), rgba(255, 255, 255, 0.02));
}

.blog-prose .blog-inline-cta h3 { margin-top: 0; }

.blog-prose .blog-inline-cta p { margin-top: 0.7rem; }

.blog-prose .blog-inline-cta .blog-cta { margin-top: 1.1rem; }

.blog-prose .blog-inline-cta a.jp-btn,
.blog-prose .blog-inline-cta a.jp-btn:hover {
  color: #1a120c;
  text-decoration: none;
}

.blog-hero-figure {
  margin: 0;
}

.blog-hero-figure img,
.blog-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #100e0c;
}

.blog-crumb {
  margin-top: 1.35rem;
  padding-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.blog-crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  list-style: none;
}

.blog-crumb li {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.blog-crumb li:not(:last-child)::after {
  content: "/";
  color: var(--faint);
}

.blog-crumb a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-crumb a:hover,
.blog-crumb [aria-current="page"] {
  color: var(--text);
}

.blog-layout {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.15rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-bottom: clamp(2.5rem, 7vh, 4.5rem);
}

.blog-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  color: var(--text);
}

.blog-toc summary::-webkit-details-marker { display: none; }
.blog-toc summary::marker { content: ""; }

.blog-toc summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
}

.blog-toc[open] summary::after {
  transform: translateY(0.12rem) rotate(225deg);
}

.blog-toc ol {
  list-style: none;
  display: grid;
  gap: 0.15rem;
  margin: 0.35rem 0 0;
  padding: 0 0 0.4rem;
}

.blog-toc a {
  display: block;
  padding: 0.38rem 0.55rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.blog-toc a:hover,
.blog-toc a.is-current {
  color: var(--text);
  border-left-color: var(--accent);
  background: rgba(216, 162, 106, 0.08);
}

.blog-prose {
  min-width: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

.blog-prose > p,
.blog-prose li {
  line-height: 1.7;
}

.blog-prose > p + p,
.blog-prose h2 + p,
.blog-prose h3 + p { margin-top: 1rem; }

.blog-prose h2 {
  margin-top: 2.4rem;
  margin-bottom: 0.85rem;
  max-width: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text);
  scroll-margin-top: 10.5rem;
}

.blog-prose > h2:first-child { margin-top: 0; }

.blog-prose h3 {
  margin-top: 1.7rem;
  margin-bottom: 0.45rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  scroll-margin-top: 10.5rem;
}

.blog-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-prose a:hover { color: var(--text); }

.blog-prose strong { color: var(--text); font-weight: 600; }

.blog-prose p > strong:only-child {
  font-family: var(--display);
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.blog-prose ol,
.blog-prose ul {
  margin: 0.85rem 0 1.15rem;
  padding-left: 1.25rem;
}

.blog-prose li + li { margin-top: 0.55rem; }

.blog-figure {
  margin: 1.6rem 0 0.35rem;
}

.blog-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.table-wrap {
  max-width: 100%;
  margin: 1.15rem 0 1.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

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

.blog-table--compare { min-width: 44rem; }

.blog-table th,
.blog-table td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted);
}

.blog-table tr:last-child th,
.blog-table tr:last-child td { border-bottom: 0; }

.blog-table thead th {
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(216, 162, 106, 0.08);
}

.blog-table tbody th[scope="row"] {
  color: var(--text);
  font-weight: 600;
  min-width: 8.5rem;
}

.blog-related {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(3rem, 8vh, 5rem);
}

.blog-related h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text);
  scroll-margin-top: 10.5rem;
}

.blog-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 0.9rem;
  margin-top: 1.15rem;
}

.blog-cards a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  text-decoration: none;
}

.blog-cards a:hover {
  border-color: var(--accent);
  background: rgba(216, 162, 106, 0.1);
}

.blog-card-title {
  font-family: var(--display);
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.blog-card-text {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.blog-more {
  margin-top: 1.15rem;
  font-size: 1rem;
  line-height: 1.5;
}

.blog-more a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-more a:hover { color: var(--text); }

.blog-hub-hero,
.blog-hub-section { position: relative; z-index: 1; }

.blog-hub-hero {
  padding-top: clamp(1.35rem, 3.5vw, 2.4rem);
  padding-bottom: clamp(1.6rem, 4vw, 2.6rem);
}

.blog-hub-hero h1 {
  max-width: none;
  margin-top: 1.15rem;
  margin-bottom: 0.9rem;
  font-size: clamp(2.15rem, 4.8vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.blog-hub-lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.7;
}

.blog-hub-section {
  padding-top: clamp(1.75rem, 4vw, 2.6rem);
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
  border-top: 1px solid var(--border);
}

.blog-feature,
.blog-hub-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.blog-feature:hover,
.blog-hub-card:hover,
.blog-feature:has(a:focus-visible),
.blog-hub-card:has(a:focus-visible) {
  border-color: var(--accent);
  background: rgba(216, 162, 106, 0.1);
}

.blog-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.9fr);
  align-items: stretch;
}

.blog-feature-media {
  display: flex;
  min-height: 18rem;
  background: #100e0c;
}

.blog-feature .blog-cover {
  flex: 1 1 auto;
  width: 100%;
  min-height: 18rem;
}

.blog-hub-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
  gap: 0.95rem;
  margin-top: 0.95rem;
}

.blog-hub-card {
  display: flex;
  flex-direction: column;
}

.blog-cover {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  box-sizing: border-box;
  padding: clamp(0.95rem, 2vw, 1.45rem);
  color: #f7f1ea;
  background:
    radial-gradient(120% 85% at 0% 0%, rgba(216, 162, 106, 0.46), transparent 58%),
    radial-gradient(70% 80% at 100% 100%, rgba(216, 162, 106, 0.18), transparent 52%),
    linear-gradient(165deg, #3a2b1e 0%, #1a140f 46%, #070815 100%);
  box-shadow: inset 0 0 0 1px rgba(216, 162, 106, 0.32);
}

.blog-hub-card .blog-cover {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
}

.blog-cover-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.blog-cover-brand svg { display: block; flex: 0 0 auto; }

.blog-cover-brand b {
  font-weight: 700;
  color: #f7f1ea;
}

.blog-cover-brand span { color: #d8a26a; }

.blog-cover-title {
  max-width: 12em;
  margin-top: auto;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.28rem, 1.6vw, 1.55rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #f7f1ea;
}

.blog-feature .blog-cover-title {
  max-width: 10em;
  font-size: clamp(1.85rem, 2.8vw, 2.75rem);
}

.blog-cover-rule {
  display: block;
  width: 3.25rem;
  height: 2px;
  margin-top: 0.8rem;
  border-radius: 2px;
  background: #d8a26a;
}

.blog-hub-body {
  padding: 1.15rem 1.2rem 1.3rem;
}

.blog-hub-card .blog-hub-body { flex: 1 1 auto; }

.blog-hub-body time {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.blog-hub-body h3 {
  margin-bottom: 0.55rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  line-height: 1.28;
  overflow-wrap: break-word;
}

.blog-feature .blog-hub-body h3 {
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  line-height: 1.22;
}

.blog-hub-body h3 a {
  color: inherit;
  text-decoration: none;
}

.blog-hub-body h3 a::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
}

.blog-hub-body p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

@media (max-width: 800px) {
  .blog-feature { grid-template-columns: 1fr; }
  .blog-feature-media {
    min-height: 0;
    aspect-ratio: auto;
  }
  .blog-feature .blog-cover {
    min-height: 13.5rem;
    height: auto;
  }
  .blog-feature .blog-cover-title { font-size: 1.65rem; }
}

@media (max-width: 720px) {
  .blog-hub-hero h1 { max-width: none; }
  .blog-feature,
  .blog-hub-card { border-radius: 16px; }
  .blog-hub-body { padding: 1rem 1rem 1.15rem; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 960px) {
  .blog-prose h2,
  .blog-prose h3,
  .blog-related h2 { scroll-margin-top: 6rem; }

  .blog-layout {
    grid-template-columns: 15.75rem minmax(0, 1fr);
    gap: 2.4rem;
    align-items: start;
  }

  .blog-toc-nav { align-self: stretch; }

  .blog-toc {
    position: sticky;
    top: 5.6rem;
    max-height: calc(100vh - 7rem);
    overflow: auto;
    padding-right: 0.35rem;
  }
}

@media (max-width: 800px) {
  .blog-hero-grid { grid-template-columns: 1fr; }
  .blog-hero h1 { max-width: none; }
}

@media (max-width: 720px) {
  .blog-cta .jp-btn-primary { width: 100%; }
  .blog-hero-figure img,
  .blog-figure img { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
