/* =====================================
   DENARYA RESEARCH SYSTEM
   Institutional report layout
===================================== */

.research-page {
  min-height: 100vh;
  padding: 78px 20px 72px;
  background: #f4efe5;
  color: var(--text-primary, #211d17);
}

.research-article {
  width: min(1040px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(58, 45, 27, 0.14);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 72px rgba(45, 33, 16, 0.07);
}

/* =====================================
   REPORT HEADER
===================================== */

.research-hero {
  padding: 52px 62px 42px;
  border-bottom: 1px solid rgba(58, 45, 27, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.research-kicker,
.research-callout-label {
  margin-bottom: 18px;
  color: #8b6a3c;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.research-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.2rem, 4.2vw, 3.85rem);
  line-height: 1.01;
  letter-spacing: -0.055em;
}

.research-byline {
  margin: 16px 0 0;
  color: rgba(33, 29, 23, 0.62);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-subtitle {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(33, 29, 23, 0.68);
  font-size: 1.02rem;
  line-height: 1.74;
}

.research-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(58, 45, 27, 0.1);
}

.research-meta span {
  position: relative;
  color: rgba(33, 29, 23, 0.58);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(139, 106, 60, 0.55);
  transform: translateY(-50%);
}

/* =====================================
   REPORT BODY
===================================== */

.research-body {
  padding: 0;
}

.research-section,
.research-callout,
.research-footer {
  margin: 0;
}

.research-section {
  padding: 42px 62px;
  border-bottom: 1px solid rgba(58, 45, 27, 0.1);
}

.research-section h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.25vw, 1.9rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.research-section p,
.research-footer p {
  max-width: 760px;
  margin: 0;
  color: rgba(33, 29, 23, 0.72);
  font-size: 0.98rem;
  line-height: 1.86;
}

.research-section p + p {
  margin-top: 17px;
}

/* =====================================
   EXECUTIVE SUMMARY / TAKEAWAYS
===================================== */

.research-callout {
  padding: 34px 62px;
  border-bottom: 1px solid rgba(58, 45, 27, 0.1);
  border-left: 3px solid rgba(139, 106, 60, 0.72);
  background: rgba(248, 244, 236, 0.78);
}

.research-callout p {
  max-width: 800px;
  margin: 0;
  color: rgba(33, 29, 23, 0.9);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.76;
}

.research-callout-soft {
  background: rgba(250, 247, 241, 0.86);
}

.research-callout-soft p {
  font-size: 1.06rem;
}

/* =====================================
   REPORT FRAMEWORKS
===================================== */

.research-grid {
  display: grid;
  gap: 0;
  max-width: 820px;
  margin-top: 24px;
  border-top: 1px solid rgba(58, 45, 27, 0.14);
  border-bottom: 1px solid rgba(58, 45, 27, 0.14);
}

.research-grid-two {
  grid-template-columns: 1fr;
}

.research-note-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) 1fr;
  gap: 26px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(58, 45, 27, 0.1);
}

.research-note-card:last-child {
  border-bottom: 0;
}

.research-note-card h3 {
  margin: 0;
  color: rgba(33, 29, 23, 0.92);
  font-size: 0.95rem;
  line-height: 1.35;
  letter-spacing: -0.012em;
}

.research-note-card p {
  max-width: none;
  color: rgba(33, 29, 23, 0.66);
  font-size: 0.93rem;
  line-height: 1.72;
}

.research-example {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 820px;
  margin: 24px 0 22px;
  border-top: 1px solid rgba(58, 45, 27, 0.14);
  border-bottom: 1px solid rgba(58, 45, 27, 0.14);
}

.research-example div {
  padding: 18px 18px 18px 0;
  border-right: 1px solid rgba(58, 45, 27, 0.1);
}

.research-example div + div {
  padding-left: 18px;
}

.research-example div:last-child {
  border-right: 0;
}

.research-example span {
  display: block;
  margin-bottom: 8px;
  color: rgba(33, 29, 23, 0.48);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.research-example strong {
  display: block;
  color: #8b6a3c;
  font-size: 1rem;
  line-height: 1.35;
}

/* =====================================
   REPORT FOOTER
===================================== */

.research-footer {
  display: grid;
  gap: 20px;
  padding: 34px 62px 44px;
  background: rgba(248, 244, 236, 0.62);
}

.research-footer p {
  color: rgba(33, 29, 23, 0.56);
  font-size: 0.85rem;
  line-height: 1.75;
}

.research-back-link {
  width: fit-content;
  color: #8b6a3c;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.research-back-link:hover {
  text-decoration: underline;
}

/* =====================================
   DARK MODE
===================================== */

html[data-theme="dark"] .research-page,
body.dark-mode .research-page {
  background: #020202;
  color: rgba(250, 244, 233, 0.95);
}

html[data-theme="dark"] .research-article,
body.dark-mode .research-article {
  border-color: rgba(184, 146, 94, 0.18);
  background: rgba(7, 6, 5, 0.92);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
}

html[data-theme="dark"] .research-hero,
body.dark-mode .research-hero {
  border-bottom-color: rgba(184, 146, 94, 0.16);
  background: rgba(10, 8, 6, 0.78);
}

html[data-theme="dark"] .research-byline,
body.dark-mode .research-byline {
  color: rgba(244, 238, 226, 0.58);
}

html[data-theme="dark"] .research-subtitle,
html[data-theme="dark"] .research-section p,
html[data-theme="dark"] .research-note-card p,
body.dark-mode .research-subtitle,
body.dark-mode .research-section p,
body.dark-mode .research-note-card p {
  color: rgba(244, 238, 226, 0.68);
}

html[data-theme="dark"] .research-meta,
html[data-theme="dark"] .research-section,
html[data-theme="dark"] .research-callout,
html[data-theme="dark"] .research-footer,
body.dark-mode .research-meta,
body.dark-mode .research-section,
body.dark-mode .research-callout,
body.dark-mode .research-footer {
  border-color: rgba(184, 146, 94, 0.16);
}

html[data-theme="dark"] .research-meta span,
body.dark-mode .research-meta span {
  color: rgba(244, 238, 226, 0.54);
}

html[data-theme="dark"] .research-callout,
body.dark-mode .research-callout {
  border-left-color: rgba(212, 173, 115, 0.74);
  background: rgba(16, 13, 9, 0.72);
}

html[data-theme="dark"] .research-callout p,
body.dark-mode .research-callout p {
  color: rgba(250, 244, 233, 0.9);
}

html[data-theme="dark"] .research-grid,
html[data-theme="dark"] .research-example,
body.dark-mode .research-grid,
body.dark-mode .research-example {
  border-color: rgba(184, 146, 94, 0.2);
}

html[data-theme="dark"] .research-note-card,
html[data-theme="dark"] .research-example div,
body.dark-mode .research-note-card,
body.dark-mode .research-example div {
  border-color: rgba(184, 146, 94, 0.14);
}

html[data-theme="dark"] .research-note-card h3,
body.dark-mode .research-note-card h3 {
  color: rgba(250, 244, 233, 0.92);
}

html[data-theme="dark"] .research-example span,
body.dark-mode .research-example span {
  color: rgba(244, 238, 226, 0.45);
}

html[data-theme="dark"] .research-example strong,
html[data-theme="dark"] .research-back-link,
body.dark-mode .research-example strong,
body.dark-mode .research-back-link {
  color: rgba(212, 173, 115, 0.96);
}

html[data-theme="dark"] .research-footer,
body.dark-mode .research-footer {
  background: rgba(10, 8, 6, 0.76);
}

html[data-theme="dark"] .research-footer p,
body.dark-mode .research-footer p {
  color: rgba(244, 238, 226, 0.52);
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 760px) {
  .research-page {
    padding: 82px 12px 52px;
  }

  .research-article {
    width: 100%;
  }

  .research-hero {
    padding: 34px 24px 30px;
  }

  .research-subtitle {
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .research-meta {
    gap: 12px;
  }

  .research-meta span {
    font-size: 0.68rem;
  }

  .research-meta span:not(:last-child)::after {
    right: -8px;
  }

  .research-section,
  .research-callout,
  .research-footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  .research-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .research-note-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .research-example {
    grid-template-columns: 1fr;
  }

  .research-example div,
  .research-example div + div {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(58, 45, 27, 0.1);
  }

  .research-example div:last-child {
    border-bottom: 0;
  }

  html[data-theme="dark"] .research-example div,
  html[data-theme="dark"] .research-example div + div,
  body.dark-mode .research-example div,
  body.dark-mode .research-example div + div {
    border-bottom-color: rgba(184, 146, 94, 0.14);
  }
}