/* ==========================================================
   MATERIALITY ASSESSMENT — materiality-assessment.css
   Companion to style.css — uses same CSS variables
   ========================================================== */

/* ── Hero ── */
.ma-hero {
  padding: 56px 0 64px;
  background: linear-gradient(140deg, #05193a 0%, #0b3272 55%, #1268b3 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ma-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(18,104,179,0.35) 0%, transparent 70%);
  pointer-events: none;
}
.ma-hero-inner {
  position: relative;
  z-index: 1;
}
.ma-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 20px;
}
.ma-hero-title {
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 28px;
  max-width: 640px;
}
.ma-hero-title strong { font-weight: 700; }
.ma-hero-lead {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.88);
  max-width: 620px;
  margin: 0;
}

/* ── Section wrapper ── */
.ma-section {
  padding: 60px 0;
}
.ma-section--alt {
  background: var(--surface-2);
}
.ma-section--dark {
  background: #05193a;
  color: #fff;
}

/* ── Section rule / heading ── */
.ma-rule {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 36px;
}
.ma-rule h2 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}
.ma-rule-line {
  flex: 1;
  height: 1.5px;
  background: var(--border);
}
.ma-section--dark .ma-rule h2 { color: #fff; }
.ma-section--dark .ma-rule-line { background: rgba(255,255,255,0.2); }

/* ── DMA Framework — two column layout ── */
.ma-dma-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: start;
}
.ma-dma-text p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 16px;
}
.ma-dma-text p:last-child { margin-bottom: 0; }
.ma-dma-text strong { font-weight: 600; color: var(--text); }
.ma-dma-dims {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue);
  background: var(--surface-2);
}
.ma-dma-dims li {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 10px;
  list-style: none;
  padding-left: 20px;
  position: relative;
}
.ma-dma-dims li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.ma-dma-dims li:last-child { margin-bottom: 0; }

/* ── Diagram card ── */
.ma-diagram-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ma-diagram-card img {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
}
.ma-diagram-caption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* ── Assessment Process + Outcomes ── */
.ma-process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.ma-process-intro {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 28px;
}
.ma-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ma-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.ma-step:last-child { border-bottom: none; }
.ma-step-num {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.ma-step-body {}
.ma-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 5px;
  line-height: 1.3;
}
.ma-step-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
  opacity: 0.85;
}

/* Outcomes */
.ma-outcomes-text p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 14px;
}
.ma-outcomes-text p:last-child { margin-bottom: 0; }

/* ── Stakeholders ── */
.ma-stakeholders {
  margin-top: 48px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.ma-stk-head {
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 22px;
}
.ma-stk-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ma-stk-col {
  padding: 22px 24px;
}
.ma-stk-col + .ma-stk-col {
  border-left: 1px solid var(--border);
}
.ma-stk-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.ma-stk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.ma-stk-item:last-child { border-bottom: none; }
.ma-stk-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue);
}
.ma-stk-icon svg {
  width: 16px;
  height: 16px;
}
.ma-stk-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

/* ── Double Materiality Matrix ── */
.ma-matrix-wrap {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 32px;
  text-align: center;
}
.ma-matrix-wrap img {
  width: 100%;
  max-width: 780px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ── Material Topics ── */
.ma-topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ma-topic-col {
  border: 1px solid var(--border);
  background: var(--surface);
}
.ma-topic-head {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.ma-topic-head--env  { background: #00944a; }
.ma-topic-head--soc  { background: #f5a81d; color: #111; }
.ma-topic-head--gov  { background: #622d91; }
.ma-topic-list {
  list-style: none;
  padding: 14px 18px;
  margin: 0;
}
.ma-topic-list li {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.ma-topic-list li:last-child { border-bottom: none; }
.ma-topic-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 18px;
}
.ma-topic-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  padding: 10px 18px 14px;
  margin: 0;
  /* border-top: 1px solid var(--border); */
}

/* ── IRO Table ── */
.ma-iro-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
}
.ma-iro-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}
.ma-iro-table thead th {
  background: #1268b3;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 11px 14px;
  text-align: left;
  border-right: 2px solid rgba(255,255,255,0.25);
  line-height: 1.3;
  white-space: nowrap;
}
.ma-iro-table thead th:last-child { border-right: none; }
.ma-iro-table tbody tr {
  border-bottom: 1px solid var(--border);
}
.ma-iro-table tbody tr:last-child { border-bottom: none; }
.ma-iro-table td {
  padding: 12px 14px;
  font-size: 16px;
  color: var(--text);
  vertical-align: middle;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.ma-iro-table td:last-child { border-right: none; }
.ma-iro-table tbody tr:nth-child(even) td { background: var(--surface-2); }

/* Impact badges */
.ma-impact-icons {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
}
.ma-impact-pos,
.ma-impact-neg {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.ma-impact-pos { border: 2px solid #00944a; color: #00944a; }
.ma-impact-neg { border: 2px solid #dc4d28; color: #dc4d28; }

/* Risk/Opp icons */
.ma-ro-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ma-risk-icon,
.ma-opp-icon {
  width: 22px;
  height: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.ma-risk-icon { border: 2px solid #f5a81d; color: #f5a81d; border-radius: 50%; }
.ma-opp-icon  { border: 2px solid #1268b3; color: #1268b3; }

/* Upstream text */
.ma-upstream {
  font-size: 14px;
  line-height: 1.65;
  white-space: nowrap;
}
.ma-upstream span { display: block; }
.ma-upstream strong { font-weight: 600; color: var(--text); }

/* Timeframe bar */
.ma-timeframe {
  display: flex;
  gap: 0;
  align-items: center;
}
.ma-tf-bar {
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.ma-tf--short   { background: #1268b3; }
.ma-tf--medium  { background: #f5a81d; }
.ma-tf--long    { background: #00944a; }
.ma-tf--s2m     { background: linear-gradient(90deg,#1268b3 50%,#f5a81d 50%); }
.ma-tf--m2l     { background: linear-gradient(90deg,#f5a81d 50%,#00944a 50%); }

.ma-tf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 16px;
}
.ma-tf-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text);
  font-weight: 400;
}
.ma-tf-legend-item span {
  display: inline-block;
  width: 22px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* IRO Icon legend */
.ma-iro-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 14px;
}
.ma-iro-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text);
}

/* ── SBOs / UN SDGs Alignment Table ── */
.ma-align-container {
  overflow-x: auto;
  border: 1px solid var(--border);
}
.ma-align-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}
.ma-align-table thead th {
  background: #1268b3;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 11px 14px;
  text-align: left;
  border-right: 2px solid rgba(255,255,255,0.2);
  line-height: 1.3;
}
.ma-align-table thead th:last-child { border-right: none; }
.ma-align-cluster-row td {
  padding: 0;
  border: none;
}
.ma-align-cluster-label {
  display: block;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
.ma-align-table tbody td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
  vertical-align: top;
  border: 1px solid var(--border);
  background: var(--surface);
}
.ma-align-cluster-row td { background: transparent !important; }
.ma-align-topics {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ma-align-topics li {
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.ma-align-topics .tn {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.ma-align-response ul {
  padding-left: 16px;
  margin: 0;
}
.ma-align-response ul li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 5px;
}
.ma-align-response ul li:last-child { margin-bottom: 0; }
.ma-sbo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ma-sbo-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
html[data-theme="dark"] .ma-sbo-badge { background: #e9ecf5; color: #0b1020; }
.ma-sdg-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.ma-sdg-icons img {
  width: 50px;
  height: 50px;
  border-radius: 3px;
  object-fit: cover;
}
.ma-align-table tbody tr:nth-child(even) td:not(.ma-align-cluster-row td) {
  background: var(--surface-2);
}

/* ── Cluster colour bands ── */
.ma-cluster--env    .ma-align-cluster-label { background: #00944a; }
.ma-cluster--soc    .ma-align-cluster-label { background: #f5a81d; color: #111; }
.ma-cluster--govt   .ma-align-cluster-label { background: #2a357e; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .ma-dma-grid { grid-template-columns: 1fr; }
  .ma-process-grid { grid-template-columns: 1fr; gap: 40px; }
  .ma-topics-grid { grid-template-columns: 1fr 1fr; }
  .ma-stk-body { grid-template-columns: 1fr; }
  .ma-stk-col + .ma-stk-col { border-left: none; border-top: 1px solid var(--border); }
}
@media (max-width: 767px) {
  .ma-hero { padding: 40px 0 48px; }
  .ma-section { padding: 40px 0; }
  .ma-topics-grid { grid-template-columns: 1fr; }
  .ma-diagram-card { padding: 18px; }
  .ma-matrix-wrap { padding: 16px; }
  .ma-rule h2 { white-space: normal; }
}

/* ── Scroll animation (inherits .anim from style.css) ── */
.anim {
  opacity: 0;
  transform: translateY(22px);
  transition: none;
}
