/* =======================================================
   GOODUSE ARTICLES
   Repo-backed editorial library.
   ======================================================= */

body.gu-articles {
  max-width: none;
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(100, 41, 183, 0.08), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fbfaff 42%, #ffffff 100%);
  color: #171421;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body.gu-articles .gu-header,
body.gu-articles .gu-footer {
  max-width: 1120px;
}

.article-index,
.article-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 92px;
}

.article-label,
.article-section-heading span,
.article-cta-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #6f5ca8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.article-library-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: center;
  padding: 48px 0 68px;
}

.article-library-copy h1,
.article-topic-hero h1,
.article-hero h1 {
  margin: 14px 0 18px;
  color: #171421;
  font-size: 64px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.article-library-copy p,
.article-topic-hero p,
.article-hero p {
  max-width: 700px;
  margin: 0;
  color: #4f475e;
  font-size: 20px;
  line-height: 1.58;
  font-weight: 500;
}

.article-library-map {
  position: relative;
  min-height: 400px;
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 243, 255, 0.94)),
    linear-gradient(90deg, rgba(100, 41, 183, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(100, 41, 183, 0.06) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  box-shadow: 0 28px 80px rgba(47, 32, 78, 0.12);
  overflow: hidden;
}

.map-node,
.map-line {
  position: absolute;
}

.map-node {
  z-index: 2;
  min-width: 92px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(100, 41, 183, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: #372452;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(24, 18, 38, 0.08);
}

.map-node-core {
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #ffffff 0%, #f0e8ff 100%);
  color: #281343;
  font-size: 18px;
  box-shadow: 0 24px 56px rgba(100, 41, 183, 0.2);
}

.map-node-one { left: 38px; top: 44px; }
.map-node-two { right: 42px; top: 58px; }
.map-node-three { left: 44px; bottom: 54px; }
.map-node-four { right: 48px; bottom: 46px; }

.map-line {
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 185px;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(100, 41, 183, 0), rgba(100, 41, 183, 0.34), rgba(15, 140, 140, 0));
}

.map-line-one { transform: rotate(224deg); }
.map-line-two { transform: rotate(318deg); }
.map-line-three { transform: rotate(139deg); }
.map-line-four { transform: rotate(42deg); }

.article-topic-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 54px;
}

.article-topic-strip a,
.article-tags a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid rgba(100, 41, 183, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #352052;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(20, 16, 34, 0.04);
}

.article-topic-strip a span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(100, 41, 183, 0.1);
  color: #6429b7;
  font-size: 12px;
}

.article-section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.article-section-heading h2 {
  margin: 8px 0 0;
  color: #171421;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

.article-featured-section,
.article-all-section,
.article-related {
  margin-top: 54px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.article-card {
  min-height: 300px;
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 54px rgba(47, 32, 78, 0.08);
  overflow: hidden;
}

.article-card-featured {
  min-height: 360px;
  background:
    radial-gradient(circle at 86% 16%, rgba(15, 140, 140, 0.12), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%);
}

.article-card-link {
  display: flex;
  min-height: inherit;
  flex-direction: column;
  padding: 26px;
  color: inherit;
  text-decoration: none;
}

.article-card-meta,
.article-card-footer,
.article-byline,
.article-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #70667c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.article-card-meta span,
.article-hero-meta a {
  color: #6429b7;
  text-decoration: none;
}

.article-card h3 {
  margin: 22px 0 12px;
  color: #171421;
  font-size: 25px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: 0;
}

.article-card p {
  margin: 0;
  color: #51495c;
  font-size: 15.5px;
  line-height: 1.62;
}

.article-card-footer {
  justify-content: space-between;
  margin-top: auto;
  padding-top: 26px;
  color: #6a6178;
}

.article-card-footer span:last-child {
  color: #6429b7;
}

.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 34px;
  color: #756b83;
  font-size: 13px;
  font-weight: 700;
}

.article-breadcrumbs a {
  color: #6429b7;
  text-decoration: none;
}

.article-topic-hero {
  max-width: 820px;
  padding: 44px 0 16px;
}

.article-hero {
  max-width: 900px;
  padding: 44px 0 58px;
}

.article-hero h1 {
  max-width: 900px;
}

.article-hero p {
  max-width: 760px;
}

.article-byline {
  margin-top: 26px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.article-reading-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 760px);
  gap: 42px;
  align-items: start;
  justify-content: center;
}

.article-side {
  position: sticky;
  top: 24px;
}

.article-toc {
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 40px rgba(47, 32, 78, 0.06);
}

.article-toc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.article-toc span {
  color: #6f5ca8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-toc a {
  color: #403747;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.article-content {
  max-width: 760px;
  padding: 0 0 8px;
  color: #26202e;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 20px;
  line-height: 1.74;
  text-align: left;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content h2,
.article-content h3 {
  color: #171421;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}

.article-content h2 {
  margin: 54px 0 14px;
  font-size: 32px;
  line-height: 1.18;
  font-weight: 800;
}

.article-content h3 {
  margin: 36px 0 12px;
  font-size: 22px;
  line-height: 1.24;
  font-weight: 800;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content table,
.article-content pre {
  margin: 0 0 26px;
}

.article-content ul,
.article-content ol {
  padding-left: 1.25em;
}

.article-content li + li {
  margin-top: 8px;
}

.article-content a {
  color: #6429b7;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-content blockquote {
  padding: 4px 0 4px 24px;
  border-left: 3px solid rgba(100, 41, 183, 0.34);
  color: #3d314d;
  font-size: 22px;
  line-height: 1.6;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 16px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
}

.article-content th,
.article-content td {
  padding: 14px;
  border-bottom: 1px solid rgba(100, 41, 183, 0.1);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: rgba(100, 41, 183, 0.07);
  color: #342158;
  font-weight: 800;
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.article-content code {
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(100, 41, 183, 0.08);
  color: #392153;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.article-content pre {
  overflow-x: auto;
  padding: 20px;
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 18px;
  background: #171421;
  color: #f9f7ff;
  box-shadow: 0 18px 44px rgba(23, 20, 33, 0.16);
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.article-callout,
.article-cta {
  border: 1px solid rgba(100, 41, 183, 0.13);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 12%, rgba(15, 140, 140, 0.1), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8f5ff 100%);
  box-shadow: 0 22px 54px rgba(47, 32, 78, 0.09);
}

.article-callout {
  margin: 34px 0;
  padding: 24px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.article-callout h3 {
  margin: 0 0 10px;
  color: #2d184e;
  font-size: 17px;
}

.article-callout p {
  margin: 0;
  color: #3e3650;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
}

.article-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.article-cta h3 {
  margin: 8px 0 8px;
  color: #171421;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 800;
}

.article-cta p {
  margin: 0;
  color: #50465f;
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 600;
}

.article-cta a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: #6429b7;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(100, 41, 183, 0.28);
}

.article-prev-next,
.article-explore,
.article-related {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

.article-prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 58px;
}

.article-nav-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  color: #171421;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(47, 32, 78, 0.07);
}

.article-nav-card span {
  color: #6f5ca8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-nav-card strong {
  font-size: 18px;
  line-height: 1.28;
}

.article-nav-card-empty {
  visibility: hidden;
}

.article-explore {
  margin-top: 62px;
  padding: 34px;
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 10%, rgba(15, 140, 140, 0.10), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 245, 255, 0.94));
  box-shadow: 0 24px 64px rgba(47, 32, 78, 0.10);
}

.article-explore .article-section-heading {
  margin-bottom: 24px;
}

.article-section-heading p {
  max-width: 680px;
  margin: 10px 0 0;
  color: #5f596b;
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 600;
}

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

.article-explore-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid rgba(100, 41, 183, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  color: #21182f;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(47, 32, 78, 0.06);
}

.article-explore-card-featured {
  background:
    radial-gradient(circle at 92% 12%, rgba(100, 41, 183, 0.12), transparent 28%),
    #ffffff;
}

.article-explore-card span {
  color: #6f5ca8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-explore-card h3 {
  margin: 16px 0 10px;
  color: #171421;
  font-size: 21px;
  line-height: 1.18;
  font-weight: 800;
}

.article-explore-card p {
  margin: 0;
  color: #51495c;
  font-size: 14.5px;
  line-height: 1.58;
  font-weight: 600;
}

.article-explore-card strong {
  margin-top: auto;
  padding-top: 22px;
  color: #6429b7;
  font-size: 14px;
}

.article-explore-topics {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(100, 41, 183, 0.11);
}

.article-explore-topics > span {
  color: #6f5ca8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-explore-topics div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-explore-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid rgba(100, 41, 183, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #352052;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

@media (max-width: 980px) {
  .article-library-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 36px;
    padding-top: 38px;
  }

  .article-library-map {
    min-height: 320px;
  }

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

  .article-reading-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-side {
    position: static;
  }

  .article-side-left {
    order: 0;
  }

  .article-content {
    order: 1;
  }

  .article-toc {
    max-width: 760px;
  }
}

@media (max-width: 700px) {
  .article-index,
  .article-page {
    padding: 18px 20px 72px;
  }

  .article-library-copy h1,
  .article-topic-hero h1,
  .article-hero h1 {
    font-size: 42px;
    line-height: 1.08;
  }

  .article-library-copy p,
  .article-topic-hero p,
  .article-hero p {
    font-size: 17px;
  }

  .article-library-map {
    display: none;
  }

  .article-grid,
  .article-grid-compact {
    grid-template-columns: 1fr;
  }

  .article-card {
    min-height: 260px;
  }

  .article-card-link {
    padding: 22px;
  }

  .article-card h3 {
    font-size: 22px;
  }

  .article-prev-next,
  .article-explore {
    max-width: 100%;
  }

  .article-prev-next,
  .article-explore-grid {
    grid-template-columns: 1fr;
  }

  .article-prev-next {
    margin-top: 44px;
  }

  .article-nav-card-empty {
    display: none;
  }

  .article-explore {
    padding: 24px;
  }

  .article-section-heading h2 {
    font-size: 28px;
  }

  .article-content {
    font-size: 18px;
    line-height: 1.7;
    text-align: left !important;
  }

  .article-content h2,
  .article-content h3,
  .article-content p,
  .article-content li,
  .article-content blockquote,
  .article-content th,
  .article-content td {
    text-align: left !important;
  }

  .article-content h2 {
    font-size: 27px;
  }

  .article-content table {
    display: table;
    table-layout: fixed;
    overflow: hidden;
    white-space: normal;
    font-size: 13px;
  }

  .article-content th,
  .article-content td {
    padding: 12px 10px;
    overflow-wrap: anywhere;
  }

  .article-content pre,
  .article-content pre code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .article-cta {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .article-cta a {
    width: 100%;
  }
}
