/* PolarDraft blog — fluid layout for all viewports (mobile → 4K) */

body.luxe.blog-site {
  padding-top: var(--site-header-height);
  scroll-padding-top: calc(var(--site-header-height) + 16px);
  --blog-gap: clamp(1rem, 2vw, 2rem);
  --blog-index-width: var(--page-width-marketing);
  --blog-article-width: var(--page-width-blog-article);
  --blog-sidebar-width: clamp(11rem, 14vw, 20rem);
}

.blog-wrap {
  width: var(--blog-index-width);
  max-width: calc(100% - 2 * var(--page-edge));
  margin: clamp(1.5rem, 3vw, 2.25rem) auto clamp(2.5rem, 5vw, 4rem);
  display: grid;
  gap: var(--blog-gap);
  box-sizing: border-box;
}

.blog-wrap.blog-wrap--article {
  width: var(--blog-article-width);
  max-width: calc(100% - 2 * var(--page-edge));
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
}

/* Footer aligns with shared fluid tokens from styles-luxe.css */
body.luxe.blog-site .footer {
  width: var(--blog-index-width);
  max-width: calc(100% - 2 * var(--page-edge));
}

body.luxe.blog-site:has(.blog-wrap--article) .footer {
  width: var(--blog-article-width);
}

.blog-hero {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  padding: 28px 30px;
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.2), transparent 52%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.blog-hero h1 {
  margin: 8px 0 12px;
  max-width: min(100%, 32ch);
  line-height: 1.12;
}

.blog-hero .subtext {
  margin: 0;
  max-width: min(100%, 72ch);
  line-height: 1.65;
  color: #cbd5e1;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.blog-filter-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.blog-filter-btn:hover,
.blog-filter-btn.is-active {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 116, 144, 0.28);
  color: #e0f2fe;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--blog-gap);
}

.blog-article-cover {
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.blog-article-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  min-height: 200px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.6);
}

.blog-image-credit {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.blog-image-credit a {
  color: #7dd3fc;
  text-decoration: none;
}

.blog-image-credit a:hover {
  text-decoration: underline;
}

.blog-related-inline {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.45);
}

.blog-related-inline h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.blog-related-inline ul {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
}

.blog-related-inline a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 500;
}

.blog-related-inline a:hover {
  text-decoration: underline;
}

.blog-pillar-link {
  margin: 0 0 1.25em;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(14, 116, 144, 0.12);
  font-size: 0.92rem;
}

.blog-table-wrap {
  overflow-x: auto;
  margin: 1em 0;
}

.blog-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.blog-data-table th,
.blog-data-table td {
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 10px 12px;
  text-align: left;
}

.blog-data-table th {
  background: rgba(30, 41, 59, 0.65);
  color: #e2e8f0;
}

.blog-category-hubs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 10px;
}

.blog-category-hub {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.55);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.blog-category-hub:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.blog-category-hub strong {
  color: #f1f5f9;
  font-size: 0.95rem;
}

.blog-category-hub span {
  font-size: 0.8rem;
  color: #94a3b8;
}

.blog-category-list ul.blog-category-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.blog-category-links li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.4);
}

.blog-category-links a {
  color: #7dd3fc;
  font-weight: 600;
  text-decoration: none;
}

.blog-category-links a:hover {
  text-decoration: underline;
}

.blog-list-meta {
  font-size: 0.8rem;
  color: #64748b;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.92));
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.42);
}

.blog-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
  text-decoration: none;
}

.blog-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.03);
}

.blog-card-media .blog-card-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

.blog-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.blog-card-media .blog-card-tag--featured {
  left: auto;
  right: 14px;
  bottom: auto;
  top: 14px;
  background: rgba(52, 211, 153, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  padding: 4px 10px;
  border-radius: 999px;
}

.blog-card--featured {
  border-color: rgba(52, 211, 153, 0.35);
}

.blog-pill {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-pill--featured {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}

.blog-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.blog-card-body h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.blog-card-body h2 a {
  color: inherit;
  text-decoration: none;
}

.blog-card-body h2 a:hover {
  color: #7dd3fc;
}

.blog-card-excerpt {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #94a3b8;
  flex: 1;
}

.blog-card-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
}

.blog-card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: #7dd3fc;
  text-decoration: none;
}

.blog-card-link:hover {
  text-decoration: underline;
}

/* Article layout — main column grows on 2K/3K/4K; sidebar scales with vw */
.blog-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--blog-sidebar-width);
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  align-items: start;
  width: 100%;
}

.blog-article-main {
  min-width: 0;
}

.blog-article-hero {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  margin-bottom: clamp(1rem, 2vw, 1.25rem);
  background:
    radial-gradient(circle at 88% 12%, rgba(52, 211, 153, 0.14), transparent 48%),
    radial-gradient(circle at 8% 22%, rgba(56, 189, 248, 0.22), transparent 52%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
}

.blog-article-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(1.65rem, 2.2vw + 0.5rem, 2.75rem);
  line-height: 1.15;
  max-width: min(100%, 42ch);
}

.blog-article-lead {
  margin: 0;
  font-size: clamp(1rem, 1.1vw + 0.65rem, 1.2rem);
  line-height: 1.65;
  color: #cbd5e1;
  max-width: min(100%, 90ch);
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  font-size: 0.84rem;
  color: #94a3b8;
}

.blog-breadcrumb {
  font-size: 0.84rem;
  margin-bottom: 14px;
}

.blog-breadcrumb a {
  color: #7dd3fc;
  text-decoration: none;
}

.blog-breadcrumb a:hover {
  text-decoration: underline;
}

.blog-breadcrumb span {
  color: #64748b;
}

.blog-prose {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1.1rem, 3vw, 2.75rem);
  background: rgba(15, 23, 42, 0.55);
  line-height: 1.78;
  color: #cbd5e1;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Index / shared: comfortable measure on narrow columns */
.blog-prose > * {
  max-width: min(100%, 80ch);
}

.blog-prose > ul,
.blog-prose > ol,
.blog-prose > .blog-callout {
  max-width: min(100%, 84ch);
}

/* Article detail: prose uses full main column (scales on 2K / 3K / 4K) */
.blog-wrap--article .blog-prose > *,
.blog-wrap--article .blog-prose > ul,
.blog-wrap--article .blog-prose > ol,
.blog-wrap--article .blog-prose > .blog-callout,
.blog-wrap--article .blog-faq,
.blog-wrap--article .blog-article-hero h1,
.blog-wrap--article .blog-article-lead {
  max-width: 100%;
}

.blog-prose h2 {
  margin: 1.75em 0 0.65em;
  font-size: clamp(1.2rem, 1.4vw + 0.5rem, 1.55rem);
  color: #f1f5f9;
  scroll-margin-top: calc(var(--site-header-height) + 20px);
  max-width: 100%;
}

.blog-prose h3 {
  margin: 1.35em 0 0.5em;
  font-size: clamp(1.02rem, 1vw + 0.45rem, 1.2rem);
  color: #e2e8f0;
  scroll-margin-top: calc(var(--site-header-height) + 20px);
  max-width: 100%;
}

.blog-prose p {
  margin: 0 0 1.1em;
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.blog-prose li {
  margin-bottom: 0.45em;
}

.blog-prose a {
  color: #7dd3fc;
  font-weight: 500;
}

.blog-prose a:hover {
  text-decoration: underline;
}

.blog-prose strong {
  color: #f1f5f9;
}

.blog-callout {
  margin: 1.4em 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  background: rgba(3, 105, 161, 0.16);
}

.blog-callout p:last-child {
  margin-bottom: 0;
}

.blog-faq {
  margin-top: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 20px 22px;
  background: rgba(2, 6, 23, 0.5);
}

.blog-faq h2 {
  margin-top: 0;
}

.blog-faq details {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 12px 0;
}

.blog-faq details:last-child {
  border-bottom: 0;
}

.blog-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #e2e8f0;
  list-style-position: outside;
}

.blog-faq p {
  margin: 10px 0 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.blog-sidebar {
  position: sticky;
  top: calc(var(--site-header-height) + 16px);
  display: grid;
  gap: 14px;
}

.blog-sidebar-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.88));
}

.blog-sidebar-card h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.blog-toc {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.blog-toc a {
  font-size: 0.86rem;
  color: #94a3b8;
  text-decoration: none;
}

.blog-toc a:hover {
  color: #7dd3fc;
}

.blog-author {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.blog-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0f172a;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.blog-cta-strip {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.35), rgba(15, 23, 42, 0.9));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.blog-cta-strip h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.blog-cta-strip p {
  margin: 0;
  color: #94a3b8;
  max-width: min(100%, 52ch);
}

.blog-wrap--article .blog-cta-strip p {
  max-width: min(100%, 68ch);
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-hero,
html[data-pd-theme="light"] body.luxe.blog-site .blog-card,
html[data-pd-theme="light"] body.luxe.blog-site .blog-article-hero,
html[data-pd-theme="light"] body.luxe.blog-site .blog-prose,
html[data-pd-theme="light"] body.luxe.blog-site .blog-faq,
html[data-pd-theme="light"] body.luxe.blog-site .blog-sidebar-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
  border-color: rgba(100, 116, 139, 0.3);
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-hero h1,
html[data-pd-theme="light"] body.luxe.blog-site .blog-article-hero h1,
html[data-pd-theme="light"] body.luxe.blog-site .blog-prose h2,
html[data-pd-theme="light"] body.luxe.blog-site .blog-prose h3 {
  color: #0f172a;
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-hero .subtext,
html[data-pd-theme="light"] body.luxe.blog-site .blog-article-lead,
html[data-pd-theme="light"] body.luxe.blog-site .blog-prose,
html[data-pd-theme="light"] body.luxe.blog-site .blog-card-excerpt {
  color: #334155;
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-prose a,
html[data-pd-theme="light"] body.luxe.blog-site .blog-breadcrumb a,
html[data-pd-theme="light"] body.luxe.blog-site .blog-card-link {
  color: #0369a1;
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-callout {
  background: rgba(224, 242, 254, 0.75);
  border-color: rgba(14, 116, 144, 0.28);
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-cta-strip {
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.9), rgba(255, 255, 255, 0.98));
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-filter-btn {
  background: #fff;
  color: #334155;
  border-color: rgba(100, 116, 139, 0.35);
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-filter-btn.is-active,
html[data-pd-theme="light"] body.luxe.blog-site .blog-filter-btn:hover {
  background: rgba(224, 242, 254, 0.9);
  color: #0c4a6e;
  border-color: rgba(14, 116, 144, 0.35);
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-related-inline {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(100, 116, 139, 0.28);
}

html[data-pd-theme="light"] body.luxe.blog-site .blog-related-inline a {
  color: #0369a1;
}

@media (max-width: 900px) {
  .blog-article-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  body.luxe.blog-site {
    --page-edge: 0.75rem;
  }
}
