/* Lex Agentica long-form article layer
   Uses the current homepage design tokens and components as the source of truth. */

.article-page {
  background: var(--cloud);
  color: var(--ink);
}

.article-hero {
  border-bottom: 1px solid var(--line);
  background: var(--cloud);
}

.article-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(560px, 1.18fr);
  gap: clamp(48px, 6vw, 88px);
  align-items: center;
  min-height: 560px;
  padding-top: 58px;
  padding-bottom: 58px;
}

.article-hero-copy {
  max-width: 700px;
}

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

.article-hero h1 em {
  color: inherit;
  font-style: normal;
}

.article-dek {
  max-width: 62ch;
  margin: 26px 0 0;
  color: #425b54;
  font-size: 1.125rem;
  line-height: 1.65;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.article-meta span + span::before {
  content: "·";
  margin-right: 18px;
  color: var(--line-dark);
}

.article-hero-figure {
  position: relative;
  width: 100%;
  max-width: 820px;
  justify-self: end;
  margin: 0;
}

.article-hero-figure::before {
  content: "";
  position: absolute;
  top: 26px;
  left: -14px;
  z-index: 2;
  width: 62px;
  height: 5px;
  background: var(--accent);
}

.article-hero-image-frame {
  overflow: hidden;
  border: 1px solid #0f413724;
  background: var(--paper);
  box-shadow: var(--shadow-evidence);
}

.article-hero-image-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  justify-content: center;
  gap: 68px;
  align-items: start;
  padding-top: 66px;
  padding-bottom: 96px;
}

.article-toc {
  position: sticky;
  top: 104px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 18px 0 14px;
}

.article-toc .toc-title {
  margin-bottom: 8px;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
}

.article-toc a {
  display: block;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.article-toc a:first-of-type {
  border-top: 0;
}

.article-toc a:hover {
  color: var(--forest);
}

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

.article-content p,
.article-content li {
  color: #425b54;
  font-size: 17px;
  line-height: 1.72;
}

.article-content p {
  margin: 0 0 20px;
}

.article-content .lead {
  color: var(--forest);
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.5;
}

.article-content h2 {
  margin: 66px 0 22px;
  color: var(--forest-dark);
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.12;
}

.article-content h3 {
  margin: 38px 0 14px;
  color: var(--forest-dark);
  font-size: 1.5rem;
  line-height: 1.25;
}

.article-content strong {
  color: var(--forest);
}

.source-link {
  color: var(--action-coral);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: rgba(189,84,58,.32);
}

.key-takeaways {
  margin: 40px 0 48px;
  padding: 28px 30px 26px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  background: var(--paper);
}

.block-label,
.commercial-translation-label {
  color: var(--action-coral);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
}

.key-takeaways h2 {
  margin: 8px 0 18px;
  font-size: 1.75rem;
}

.key-takeaways ul,
.question-list,
.action-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.key-takeaways li {
  position: relative;
  margin: 0;
  padding: 12px 0 12px 24px;
  border-top: 1px solid var(--line);
}

.key-takeaways li::before {
  content: "";
  position: absolute;
  top: 1.28em;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--forest);
  border-radius: 50%;
}

.commercial-translation {
  margin: 34px 0;
  padding: 18px 0 18px 22px;
  border-left: 3px solid var(--accent);
}

.commercial-translation-body {
  margin-top: 6px;
  color: var(--forest);
  font-family: var(--display);
  font-size: 1.18rem;
  line-height: 1.55;
}

.article-image {
  margin: 42px 0 48px;
}

.article-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #0f413724;
  background: var(--paper);
  box-shadow: var(--shadow-evidence);
}

.article-image.wide {
  width: 100%;
}

.question-list {
  margin: 26px 0 34px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.question-list li {
  position: relative;
  padding: 13px 0 13px 24px;
  border-top: 1px solid var(--line);
}

.question-list li:first-child {
  border-top: 0;
}

.question-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 30px 0 40px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.tech-card {
  padding: 26px 28px;
}

.tech-card:nth-child(even) {
  border-left: 1px solid var(--line);
}

.tech-card:nth-child(n+3) {
  border-top: 1px solid var(--line);
}

.tech-card h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.tech-card p {
  margin-bottom: 10px;
  font-size: 15.5px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 30px 0 38px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.readiness-card {
  padding: 26px 28px;
}

.readiness-card:nth-child(even) {
  border-left: 1px solid var(--line);
}

.readiness-card:nth-child(n+3) {
  border-top: 1px solid var(--line);
}

.readiness-tag {
  display: inline-block;
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.15rem;
}

.readiness-card h3 {
  margin: 8px 0 10px;
  font-size: 1.4rem;
}

.readiness-card p {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.action-list {
  counter-reset: action;
  margin: 28px 0 38px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.action-list li {
  counter-increment: action;
  position: relative;
  min-height: 78px;
  padding: 18px 0 18px 56px;
  border-top: 1px solid var(--line);
}

.action-list li:first-child {
  border-top: 0;
}

.action-list li::before {
  content: counter(action, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 0;
  color: var(--accent);
  font-family: var(--display);
  font-size: 1.25rem;
}

.pull-quote {
  margin: 48px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  color: var(--forest);
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.3;
}

.mini-cta {
  margin: 50px 0;
  padding: 36px 38px;
  border-top: 4px solid var(--accent);
  background: var(--forest);
  color: var(--paper);
}

.mini-cta .block-label {
  color: #f2d8cf;
}

.mini-cta h2 {
  margin: 8px 0 12px;
  color: var(--paper);
  font-size: 2rem;
}

.mini-cta p {
  color: #d2ddd7;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 17px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.btn-primary {
  background: var(--action-coral);
  color: var(--paper);
}

.btn-primary:hover {
  background: #a94732;
  color: var(--paper);
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,.46);
  color: var(--paper);
}

.btn-secondary:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.faq {
  margin-top: 64px;
  border-top: 1px solid var(--line-dark);
}

.faq > h2 {
  margin-top: 48px;
}

.faq details {
  border-bottom: 1px solid var(--line-dark);
}

.faq summary {
  position: relative;
  padding: 20px 44px 20px 0;
  color: var(--forest-dark);
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.35;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 14px;
  right: 4px;
  color: var(--accent);
  font-family: var(--body);
  font-size: 28px;
  font-weight: 300;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 700px;
  padding: 0 44px 22px 0;
  font-size: 16px;
}

.sources {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.sources-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 62px 24px 72px;
}

.sources h2 {
  margin: 8px 0 24px;
  font-size: 2rem;
}

.sources ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.sources li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.sources a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: rgba(15,65,55,.25);
}

.sources-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}



@media (max-width: 1180px) {
  .article-hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

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

  .article-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .article-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 0 24px;
  }

  .article-toc .toc-title {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .article-hero-grid {
    padding-top: 42px;
    padding-bottom: 46px;
  }

  .article-dek {
    font-size: 1.05rem;
  }

  .article-meta {
    display: grid;
    gap: 5px;
  }

  .article-meta span + span::before {
    content: none;
  }

  .article-hero-figure::before {
    left: -10px;
  }

  .article-layout {
    padding-top: 42px;
    padding-bottom: 70px;
  }

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

  .article-content p,
  .article-content li {
    font-size: 16px;
    line-height: 1.68;
  }

  .article-content .lead {
    font-size: 1.3rem;
  }

  .article-content h2 {
    margin-top: 52px;
  }

  .tech-grid,
  .readiness-grid {
    grid-template-columns: 1fr;
  }

  .tech-card:nth-child(even),
  .readiness-card:nth-child(even) {
    border-left: 0;
  }

  .tech-card + .tech-card,
  .readiness-card + .readiness-card {
    border-top: 1px solid var(--line);
  }

  .key-takeaways,
  .mini-cta {
    padding: 24px 22px;
  }

  .button-row {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .sources-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
}




/* Research comparison matrix: wider than the reading column on desktop,
   compact enough to scan, and converted to stacked cards on mobile. */
.research-matrix-wrap {
  width: calc(100% + 140px);
  margin: 30px 0 18px -70px;
  overflow-x: auto;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line-dark);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}

.research-matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #425b54;
  font-size: 14px;
  line-height: 1.52;
}

.research-matrix th,
.research-matrix td {
  padding: 16px 16px 17px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.research-matrix thead th {
  background: var(--forest);
  color: var(--paper);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .035em;
  font-weight: 800;
}

.research-matrix thead th:nth-child(1) { width: 16%; }
.research-matrix thead th:nth-child(2) { width: 31%; }
.research-matrix thead th:nth-child(3) { width: 25%; }
.research-matrix thead th:nth-child(4) { width: 28%; }

.research-matrix tbody th {
  color: var(--forest-dark);
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.3;
  font-weight: 700;
}

.research-matrix tbody tr:nth-child(even) {
  background: rgba(15,65,55,.025);
}

.research-matrix tbody tr:last-child th,
.research-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.matrix-note {
  margin-top: 10px;
  padding-left: 16px;
  border-left: 2px solid var(--line-dark);
}

@media (max-width: 1180px) {
  .research-matrix-wrap {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .research-matrix-wrap {
    overflow: visible;
    border-top-width: 2px;
    background: transparent;
  }

  .research-matrix,
  .research-matrix tbody,
  .research-matrix tr,
  .research-matrix th,
  .research-matrix td {
    display: block;
    width: 100%;
  }

  .research-matrix thead {
    display: none;
  }

  .research-matrix tbody tr {
    padding: 20px 0 18px;
    border-bottom: 1px solid var(--line-dark);
    background: transparent;
  }

  .research-matrix tbody th {
    padding: 0 0 14px;
    border: 0;
    font-size: 1.25rem;
  }

  .research-matrix td {
    position: relative;
    padding: 23px 0 0;
    border: 0;
    font-size: 15px;
    line-height: 1.62;
  }

  .research-matrix td::before {
    content: attr(data-label);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--action-coral);
    letter-spacing: .09em;
    text-transform: uppercase;
    font-size: 9px;
    font-weight: 800;
  }
}
