:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #657084;
  --line: #dbe3ea;
  --brand: #126b6f;
  --brand-dark: #0d4b4e;
  --accent: #f3b340;
  --soft: #e9f5f5;
  --max: 1380px;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  scroll-margin-top: 100px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--brand-dark);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo img {
  width: auto;
  height: 34px;
  object-fit: contain;
}

.site-footer .brand-logo img {
  height: 30px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--brand);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--ink);
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  gap: 48px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 28px 46px;
}

.hero-copy h1,
.page-intro h1,
.content-page h1 {
  margin: 8px 0 18px;
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 1.08;
}

.hero-copy p,
.page-intro p {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-media {
  margin: 0;
}

.hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.08);
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 28px;
}

.button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
.filter-button {
  background: var(--surface);
  color: var(--brand);
}

.filter-button.active {
  background: var(--brand);
  color: #fff;
}

.button-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.button-outline:hover {
  background: var(--soft);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0 16px;
  padding: 10px 0;
}

.trust-item {
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--brand);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.reviewed-by {
  font-style: italic;
}

.short-disclaimer {
  font-size: 0.92rem;
}

.section,
.page-shell,
.content-page,
.article-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 42px 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h2,
.newsletter-strip h2,
.sidebar-box h2 {
  margin: 6px 0 0;
  line-height: 1.2;
}

.topic-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.topic-card,
.post-card,
.sidebar-box,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topic-card {
  padding: 22px;
  text-decoration: none;
}

.topic-card span {
  display: block;
  color: var(--brand-dark);
  font-weight: 800;
}

.topic-card p,
.post-card p,
.sidebar-box p,
.content-page p,
.content-page li {
  color: var(--muted);
}

.post-card {
  overflow: hidden;
}

.post-card img,
.post-list-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}

.post-card-body,
.post-list-body {
  padding: 24px 28px;
}

.post-card h3,
.post-list-item h2 {
  margin: 10px 0 12px;
  line-height: 1.28;
}

.post-card-body p,
.post-list-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.read-link {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.text-link {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover,
.read-link:hover {
  text-decoration: underline;
}

.newsletter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--max);
  margin: 28px auto 54px;
  padding: 30px 20px;
  border-block: 1px solid var(--line);
}

.page-intro {
  margin-bottom: 28px;
}

.layout,
.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.post-list {
  display: grid;
  gap: 24px;
}

.post-list-item {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 24px; /* Makes the sidebar sticky so it stays visible while scrolling */
}

.sidebar-box {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); /* Soft, premium shadow */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-box:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.sidebar-box h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--soft);
}

.category-list,
.toc,
.related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-list a,
.toc a,
.related-list a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1.4;
  margin-left: -12px; /* Pull back to align text visually while extending hover area */
}

.category-list a:hover,
.toc a:hover,
.related-list a:hover {
  background: var(--soft);
  color: var(--brand);
  transform: translateX(4px);
}

.toc a {
  font-size: 0.95rem;
}

.related-list a {
  font-weight: 600;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  padding-left: 12px;
  margin-left: -3px;
}

.related-list a:hover {
  border-left-color: var(--brand);
  background: linear-gradient(90deg, var(--soft) 0%, transparent 100%);
  transform: translateX(6px);
}

.article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(22px, 4vw, 46px);
}

.article h1 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.12;
}

.article h2 {
  margin-top: 34px;
  line-height: 1.25;
}

.article p,
.article li {
  color: #3f4a5c;
  font-size: 1.05rem;
}

.article .featured-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 8px;
  margin: 24px 0;
}

.note-box,
.faq-item {
  margin: 18px 0;
  padding: 18px;
  border-left: 4px solid var(--brand);
  background: var(--soft);
}

/* Math Formula Styling (server-side rendered) */
.math-block {
  text-align: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
}

.math-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  line-height: 1.4;
}

.math-inline {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  font-size: 1.05em;
}

.math-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  line-height: 1.3;
  margin: 0 4px;
}

.math-num {
  border-bottom: 2px solid currentColor;
  padding: 0 8px 3px;
  white-space: nowrap;
}

.math-den {
  padding: 3px 8px 0;
  white-space: nowrap;
}

.faq-item h3 {
  margin: 0 0 8px;
}

.content-page {
  max-width: 960px;
}

.content-page h2 {
  margin-top: 30px;
}

.contact-card {
  display: grid;
  gap: 6px;
  max-width: 420px;
  padding: 18px;
}

.contact-card a {
  color: var(--brand);
  font-weight: 800;
}

.site-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px max(20px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: end;
}

.split-section,
.resource-section,
.intro-panel,
.category-summary {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: start;
}

.split-section h2,
.resource-section h2 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.14;
}

.rich-copy p,
.resource-copy p,
.guide-card p,
.standards-grid p {
  color: var(--muted);
  font-size: 1.05rem;
}

.guide-grid,
.standards-grid {
  display: grid;
  gap: 16px;
}

.guide-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.standards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card,
.standards-grid>div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.guide-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand);
  font-weight: 800;
}

.guide-card h3,
.standards-grid h3 {
  margin: 0 0 8px;
  line-height: 1.25;
}

.editorial-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resource-section {
  align-items: center;
}

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-list div {
  padding: 18px;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  color: var(--muted);
}

.resource-list strong {
  color: var(--ink);
}

.newsletter-strip p {
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {

  .hero,
  .layout,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .topic-grid,
  .post-grid,
  .guide-grid,
  .standards-grid,
  .featured-posts,
  .latest-posts,
  .compact-guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section,
  .resource-section,
  .intro-panel,
  .category-summary {
    grid-template-columns: 1fr;
    gap: 22px;
  }

}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-nav.open {
    display: flex;
  }

  .hero {
    padding-top: 30px;
  }

  .topic-grid,
  .post-grid,
  .guide-grid,
  .standards-grid,
  .featured-posts,
  .latest-posts,
  .compact-guides,
  .post-list-item {
    grid-template-columns: 1fr;
  }

  .post-list-body {
    padding: 20px;
  }

  .newsletter-strip,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer nav {
    justify-content: start;
  }
}

.intro-panel,
.feature-band,
.category-summary {
  border-top: 1px solid var(--line);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  padding-top: 52px;
  padding-bottom: 52px;
}

.intro-panel h2,
.category-summary h2 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.14;
}

.feature-band {
  padding-top: 52px;
}

.featured-posts,
.latest-posts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-guides {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-summary {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 42px;
  align-items: start;
  padding-top: 52px;
}

.category-summary p {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.05rem;
}

.category-counts {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-counts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.category-counts a {
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.category-counts span {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 900px) {

  .intro-panel,
  .category-summary {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .featured-posts,
  .latest-posts,
  .compact-guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {

  .featured-posts,
  .latest-posts,
  .compact-guides,
  .category-summary {
    grid-template-columns: 1fr;
  }

  .category-counts li {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* Homepage refresh */
.home-hero {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  gap: 52px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 28px 54px;
}

.home-hero-copy h1 {
  margin: 8px 0 18px;
  max-width: 780px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1.03;
}

.home-hero-copy>p {
  max-width: 700px;
  color: #4f5c70;
  font-size: 1.14rem;
}

.home-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.home-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.92rem;
}

.home-proof strong {
  margin-right: 5px;
  color: var(--ink);
}

.home-hero-media {
  margin: 0;
}

.home-hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 46px rgba(23, 32, 51, 0.1);
}

.home-hero-media figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 52px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-intro h2,
.home-question-band h2 {
  margin: 6px 0 0;
  font-size: clamp(1.9rem, 3vw, 3.25rem);
  line-height: 1.12;
}

.home-featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
}

.home-featured-card {
  position: relative;
  display: flex;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
}

.home-featured-card>a {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  z-index: 1;
}

.home-featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) brightness(0.4);
}

.home-featured-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 4vw, 44px);
  pointer-events: none;
}

.home-featured-body .post-meta {
  color: #ddd;
}

.home-featured-body h3 {
  margin: 12px 0 12px;
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.12;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.home-featured-body h3 a {
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
}

.home-featured-body p {
  color: #eaeaea;
  font-size: 1.08rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  pointer-events: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-featured-body .read-link {
  color: #fff;
  pointer-events: auto;
}

.home-side-list {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.home-side-list h3 {
  margin: 0 0 4px;
  line-height: 1.2;
}

.home-side-list a {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.home-side-list span,
.home-side-list small {
  color: var(--muted);
  font-size: 0.9rem;
}

.home-side-list strong {
  color: var(--ink);
  line-height: 1.25;
}

.home-topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-topic-grid .topic-card {
  min-height: 158px;
}

.home-question-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 44px;
  max-width: var(--max);
  margin: 10px auto;
  padding: 44px 20px;
  border-block: 1px solid var(--line);
}

.home-question-band p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.home-question-band ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-question-band li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3f4a5c;
}

.home-trust-section {
  border-top: 1px solid var(--line);
}

.standards-grid>article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

@media (max-width: 1000px) {

  .home-hero,
  .home-intro,
  .home-featured-layout,
  .home-question-band {
    grid-template-columns: 1fr;
  }

  .home-featured-card {
    grid-template-columns: 1fr;
  }

  .home-featured-card img {
    min-height: 260px;
    aspect-ratio: 16 / 9;
  }

  .home-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .home-hero {
    padding: 36px 20px 34px;
  }

  .home-hero-copy h1 {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .home-topic-grid,
  .home-topic-grid.topic-grid,
  .home-proof {
    grid-template-columns: 1fr;
  }

  .home-proof span {
    width: 100%;
  }
}

/* Tools and quizzes */
.tool-intro,
.quiz-intro {
  max-width: 980px;
}

.tool-grid,
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 20px 42px;
}

.tool-card,
.quiz-card,
.habit-checker {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tool-card,
.quiz-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.tool-card-head h2,
.quiz-card-head h2 {
  margin: 6px 0 8px;
  line-height: 1.2;
}

.tool-card-head p,
.quiz-card-head p {
  color: var(--muted);
}

.tool-form {
  display: grid;
  gap: 12px;
}

.tool-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

.tool-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.tool-result {
  min-height: 56px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: var(--soft);
  color: #344052;
}

.checklist-section {
  padding-top: 18px;
}

.habit-checker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  padding: 22px;
}

.habit-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.habit-options label,
.quiz-question label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3f4a5c;
}

.habit-options input,
.quiz-question input {
  margin-top: 6px;
}

.habit-result {
  align-self: start;
}

.quiz-question {
  display: grid;
  gap: 8px;
}

.quiz-question strong {
  line-height: 1.35;
}

@media (max-width: 900px) {

  .tool-grid,
  .quiz-grid,
  .habit-checker {
    grid-template-columns: 1fr;
  }

  .habit-options {
    grid-template-columns: 1fr;
  }
}

/* Enhanced quizzes */
.quiz-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto 26px;
  padding: 0 20px;
}

.quiz-picker-button {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.quiz-picker-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--brand);
  background: var(--soft);
}

.quiz-picker-button:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}

.quiz-picker-button.is-active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.quiz-picker-button.is-active span {
  color: var(--brand-dark);
  background: #d9fff8;
}

.quiz-picker-ready .enhanced-quiz-grid {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.quiz-picker-ready .enhanced-quiz:not(.is-active) {
  display: none;
}

.quiz-overview {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px 42px;
}

.quiz-overview h2 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.14;
}

.quiz-overview-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quiz-overview-steps article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quiz-overview-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand);
  font-weight: 800;
}

.quiz-overview-steps strong {
  display: block;
  line-height: 1.25;
}

.quiz-overview-steps p {
  margin-bottom: 0;
  color: var(--muted);
}

.enhanced-quiz-grid {
  align-items: start;
}

.enhanced-quiz {
  gap: 16px;
}

.quiz-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.quiz-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand);
  transition: width 180ms ease;
}

.answer-feedback {
  min-height: 0;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.answer-feedback.is-correct-text {
  color: #15624e;
}

.answer-feedback.is-wrong-text,
.answer-feedback.is-warning {
  color: #8a4d12;
}

.quiz-question label.is-correct {
  border-color: #95d5b2;
  background: #edf8f2;
}

.quiz-question label.is-wrong {
  border-color: #f0b8a8;
  background: #fff2ee;
}

.quiz-result a {
  color: var(--brand);
  font-weight: 800;
}

.quiz-sources {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 34px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbfa;
}

.quiz-sources h2 {
  margin: 6px 0 12px;
}

.quiz-sources ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.quiz-sources a {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 900px) {

  .quiz-overview,
  .quiz-overview-steps,
  .quiz-sources {
    grid-template-columns: 1fr;
  }

  .quiz-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .quiz-picker {
    grid-template-columns: 1fr;
  }
}

/* FAQs Section */
.faq-section {
  margin-top: 48px;
}

.faq-section h2 {
  color: var(--brand-dark);
  margin-bottom: 24px;
}

.faq-item {
  background: var(--soft);
  border-left: 4px solid var(--brand);
  padding: 18px 24px;
  margin-bottom: 16px;
  border-radius: 0 6px 6px 0;
}

.faq-item h3 {
  margin: 0 0 12px 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Table Styles */
.table-scroll {
  margin: 24px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article table, .content-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.article table th, .content-page table th,
.article table td, .content-page table td {
  border: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.article table th, .content-page table th {
  background-color: var(--soft);
  font-weight: 700;
  color: var(--brand-dark);
}

.article table tr:nth-child(even), .content-page table tr:nth-child(even) {
  background-color: #fafbfc;
}
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}
.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
@media(min-width: 768px) {
  .cookie-consent-content {
    flex-direction: row;
    justify-content: space-between;
  }
}
.cookie-consent-buttons {
  display: flex;
  gap: 0.5rem;
}
.cookie-consent-buttons .button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}
/* ============ NEW HOME & ABOUT STYLES ============ */

.home-3col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.home-topics-strip {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  overflow-x: auto;
  white-space: nowrap;
}

.home-topics-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 16px;
  justify-content: center;
}

.htopic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

.htopic:hover {
  background: var(--soft);
  border-color: var(--brand);
  color: var(--brand);
}

.home-trust-band {
  background: var(--brand-dark);
  color: #fff;
  padding: 60px 20px;
  margin-top: 40px;
}

.home-trust-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.htrust-item strong {
  display: block;
  font-size: 1.1rem;
  margin: 12px 0 8px;
}

.htrust-item p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.htrust-icon {
  font-size: 2rem;
}

.about-hero-section {
  background: linear-gradient(135deg, var(--soft) 0%, #e0f2fe 100%);
  padding: 100px 20px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.about-hero-section::before {
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(13,138,188,0.05) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  z-index: 0;
}
.about-hero-inner {
  position: relative;
  z-index: 1;
}

.about-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-hero-copy h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 24px;
}

.about-hero-copy p {
  font-size: 1.2rem;
  color: var(--muted);
}

.about-hero-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-body {
  padding-top: 60px;
  padding-bottom: 80px;
}

.about-section-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  margin-bottom: 80px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 60px;
}

.about-section-grid:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.about-section-label {
  position: sticky;
  top: 100px;
  align-self: start;
}

.about-section-label h2 {
  font-size: 2rem;
  margin-top: 8px;
}

.about-section-content {
  font-size: 1.1rem;
  color: var(--muted);
}

.about-section-content p {
  margin-bottom: 24px;
}

.about-trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 32px 0;
}

.about-trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-trust-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}

.about-trust-card strong {
  display: block;
  color: var(--ink);
  margin: 12px 0 8px;
}

.about-trust-card p {
  font-size: 0.95rem;
  margin: 0;
}

.about-trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--soft);
  border-radius: 50%;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.about-pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-pub-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
  color: var(--ink);
}

.about-pub-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

/* -------------------------------------
 * About Team Grid
 * ------------------------------------- */
.about-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.about-team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.about-team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  border-color: var(--brand);
}

.about-team-avatar-wrapper {
  margin-bottom: 20px;
}

.about-team-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--soft);
  transition: border-color 0.3s ease;
}

.about-team-card:hover .about-team-avatar {
  border-color: var(--brand);
}

.about-team-card h3 {
  margin: 0 0 6px 0;
  font-size: 1.3rem;
}

.about-team-credentials {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
  color: var(--brand);
  font-weight: 500;
}

.about-team-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px 0;
  flex-grow: 1;
}

@media (max-width: 900px) {
  .about-team-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 900px) {
  .about-hero-inner, .about-section-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .about-hero-copy h1 { font-size: 2.2rem; }
  .about-trust-grid { grid-template-columns: 1fr; }
}
/* -------------------------------------
 * Cookie Banner
 * ------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex; /* overridden by main.js block vs flex */
  flex-direction: column;
  gap: 16px;
  z-index: 9999;
}

.cookie-banner-content strong {
  display: block;
  font-size: 1.1rem;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.cookie-banner-content p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
}

@media (min-width: 600px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-banner-actions {
    flex-shrink: 0;
  }
}

/* -------------------------------------
 * Share Buttons
 * ------------------------------------- */
.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
  color: white !important;
}

.share-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.share-button.twitter { background: #000000; }
.share-button.facebook { background: #1877F2; }
.share-button.linkedin { background: #0A66C2; }
/* -------------------------------------
 * Author Profile Card
 * ------------------------------------- */
.author-profile-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
}

.author-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--soft);
  padding-bottom: 20px;
}

.author-avatar-large {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--soft);
}

.author-info-large h1 {
  font-size: 1.8rem;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.author-credentials {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

.author-bio p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}

.author-trust-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.trust-badge {
  background: var(--brand);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
