/* Scoped editorial layout; the main BrightenUp website stays unchanged. */
.blog-editorial,
.article-editorial {
  --editorial-ink: #17241f;
  --editorial-muted: #58635e;
  --editorial-line: #dfe5e1;
  background: #fff;
}

.blog-editorial h1,
.blog-editorial h2,
.article-editorial h1,
.article-editorial h2,
.article-editorial h3,
.blog-editorial .eyebrow,
.article-editorial .eyebrow {
  letter-spacing: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.blog-editorial [hidden],
.article-editorial [hidden] {
  display: none !important;
}

.blog-editorial a:focus-visible,
.article-editorial a:focus-visible,
.blog-editorial button:focus-visible,
.blog-editorial input:focus-visible,
.article-editorial summary:focus-visible {
  outline: 3px solid #709d85;
  outline-offset: 5px;
}

.blog-editorial .blog-hero {
  min-height: 0;
  padding: 4.2rem 0 2.4rem;
  background: #fff;
}

.blog-editorial .blog-hero-grid {
  display: block;
}

.blog-editorial .blog-hero h1 {
  max-width: none;
  margin-bottom: 1rem;
  font-size: 4.4rem;
  line-height: 1.05;
  color: var(--editorial-ink);
}

.blog-editorial .blog-hero p:not(.eyebrow) {
  max-width: 66ch;
  margin-bottom: 0;
  font-size: 1.15rem;
  color: var(--editorial-muted);
}

.blog-editorial .blog-list-section {
  padding: 1.5rem 0 5rem;
  border-top: 0;
}

.blog-editorial .blog-toolbar {
  margin-bottom: 1.6rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--editorial-line);
  border-bottom: 1px solid var(--editorial-line);
}

.blog-controls {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.blog-filters button {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--editorial-muted);
  font: 700 0.9rem/1.4 "Avenir Next", "Segoe UI", sans-serif;
  cursor: pointer;
}

.blog-filters button[aria-pressed="true"] {
  color: #fff;
  background: #244a38;
}

.blog-filters button:hover:not([aria-pressed="true"]) {
  background: #f0f4f1;
}

.blog-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.blog-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--editorial-muted);
  font-size: 0.88rem;
}

.blog-search input {
  width: 280px;
  max-width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #c6d2c9;
  border-radius: 5px;
  background: #fff;
  color: var(--editorial-ink);
  font: inherit;
}

.blog-result-count {
  color: var(--editorial-muted);
  font-size: 0.85rem;
}

.blog-editorial .blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.2rem 1.4rem;
}

.blog-editorial .blog-card {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--editorial-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.blog-editorial .blog-card:hover {
  border-color: #91ae9b;
  transform: translateY(-3px);
  box-shadow: none;
}

.blog-editorial .blog-card > a {
  display: flex;
  gap: 0;
  padding: 0;
  justify-content: flex-start;
}

.blog-card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f3f5f3;
  border-bottom: 1px solid var(--editorial-line);
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.3rem;
}

.blog-editorial .blog-category {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0;
  color: #34614a;
}

.blog-editorial .blog-card h2 {
  margin-bottom: 0.85rem;
  font-size: 1.55rem;
  line-height: 1.22;
  color: var(--editorial-ink);
}

.blog-editorial .blog-card p {
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--editorial-muted);
}

.blog-editorial .blog-meta,
.article-editorial .blog-meta {
  gap: 0.6rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--editorial-muted);
}

.blog-card-body .blog-meta {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--editorial-line);
  width: 100%;
}

.blog-editorial .blog-meta span,
.blog-editorial .blog-meta time,
.article-editorial .blog-meta span,
.article-editorial .blog-meta time {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.blog-empty {
  padding: 3rem 0;
  border-top: 1px solid var(--editorial-line);
  text-align: center;
  color: var(--editorial-muted);
}

.blog-reset {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  padding: 0.4rem 0;
  color: #244a38;
  cursor: pointer;
  font: inherit;
}

.article-editorial .article-page {
  padding: 2.4rem 0 5rem;
  background: #fff;
}

.article-editorial .article-shell {
  max-width: 1120px;
}

.article-editorial .article-back {
  margin-bottom: 1.8rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.article-editorial .article-header {
  max-width: 910px;
  margin-bottom: 2rem;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.article-editorial .article-header h1 {
  max-width: 25ch;
  font-size: 3.7rem;
  line-height: 1.08;
  margin-bottom: 1.3rem;
  color: var(--editorial-ink);
}

.article-editorial .article-header p:not(.eyebrow) {
  max-width: 67ch;
  margin-bottom: 1.3rem;
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--editorial-muted);
}

.article-editorial .article-media {
  margin: 0 0 2.5rem;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-editorial .article-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f5f3;
}

.article-editorial .article-media figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem 0;
  border: 0;
  color: var(--editorial-muted);
  font-size: 0.78rem;
}

.article-media-credit {
  flex-shrink: 0;
  color: #727c76;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 720px);
  justify-content: space-between;
  align-items: start;
  gap: 3rem;
}

.article-toc {
  position: sticky;
  top: 2rem;
  max-height: calc(100svh - 4rem);
  overflow-y: auto;
  padding-right: 1rem;
  scrollbar-width: thin;
}

.article-toc summary {
  cursor: pointer;
  padding: 0.8rem 0;
  border-top: 2px solid #244a38;
  color: var(--editorial-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.article-toc ol {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0;
  display: grid;
  gap: 0.7rem;
}

.article-toc a {
  display: block;
  padding: 0.3rem 0.4rem 0.3rem 0.75rem;
  border-left: 2px solid transparent;
  color: #65726b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.article-toc a:hover,
.article-toc a[aria-current="location"] {
  color: #244a38;
  border-left-color: #244a38;
}

.article-editorial .article-content {
  min-width: 0;
  padding: 0;
}

.article-editorial .article-content h2 {
  margin: 2.6rem 0 0.9rem;
  font-size: 1.95rem;
  line-height: 1.2;
  color: var(--editorial-ink);
  scroll-margin-top: 2rem;
}

.article-editorial .article-content h3 {
  font-size: 1.3rem;
  line-height: 1.3;
}

.article-editorial .article-content p {
  color: #3e4943;
  font-size: 1.03rem;
  line-height: 1.85;
}

.article-editorial .article-content a:not(.button):not(.article-related-link) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-editorial .article-content li {
  color: #3e4943;
}

.article-editorial .article-content li::before {
  box-shadow: none;
}

.article-editorial .article-keypoints {
  grid-template-columns: 1fr;
  gap: 0.8rem;
  padding: 1.2rem 1.4rem;
  border-left: 3px solid #b87564;
  background: #f3f6f3;
}

.article-editorial .article-keypoints span {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.65;
}

.article-editorial .article-table-wrap,
.article-editorial .article-related-link {
  border-radius: 6px;
  box-shadow: none;
}

.article-editorial .article-related-link:hover {
  box-shadow: none;
}

.article-editorial .article-faq details {
  margin: 0;
  padding: 1rem 0;
  border: 0;
  border-top: 1px solid var(--editorial-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-editorial .article-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-weight: 700;
}

.article-editorial .article-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.2rem;
}

.article-editorial .article-faq details[open] summary::after {
  content: "-";
}

.article-editorial .article-cta {
  border: 0;
  border-radius: 0;
  padding: 1.8rem;
  background: #edf3ef;
}

.article-editorial .article-cta h2 {
  margin-top: 0;
}

@media (max-width: 1000px) {
  .blog-editorial .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-layout {
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: 2rem;
  }
  .article-editorial .article-header h1 {
    font-size: 3.2rem;
  }
}

@media (max-width: 760px) {
  .blog-editorial .blog-hero {
    padding-top: 2.7rem;
  }
  .blog-editorial .blog-hero h1 {
    font-size: 3rem;
  }
  .blog-editorial .blog-hero p:not(.eyebrow) {
    font-size: 1rem;
  }
  .blog-editorial .blog-toolbar {
    align-items: flex-start;
  }
  .article-layout {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .article-toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    border-bottom: 1px solid var(--editorial-line);
  }
  .article-editorial .article-header h1 {
    font-size: 2.6rem;
  }
  .article-editorial .article-media {
    margin-bottom: 1.6rem;
  }
}

@media (max-width: 540px) {
  .blog-editorial .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .blog-search {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
  .blog-search input {
    width: 100%;
  }
  .blog-editorial .blog-hero h1 {
    font-size: 2.5rem;
  }
  .article-editorial .article-header h1 {
    font-size: 2.15rem;
  }
  .article-editorial .article-header p:not(.eyebrow) {
    font-size: 1rem;
  }
  .article-editorial .article-content h2 {
    font-size: 1.6rem;
  }
  .article-editorial .article-cta {
    padding: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-editorial .blog-card,
  .article-editorial .article-related-link {
    transition: none;
  }
}
