/* Shared presentation for PappaChiara's editorial topic guides.
   Load after /styles.css and /guide/guide.css. */

.article--topic {
  max-width: 940px;
}

.topic-kicker {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.topic-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: center;
  margin: 8px 0 34px;
}

.topic-hero-copy {
  min-width: 0;
}

.topic-hero .lede-in {
  margin-bottom: 0;
}

.topic-visual {
  margin: 0;
  justify-self: end;
  width: min(100%, 360px);
}

.topic-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(20, 32, 30, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px rgba(0, 126, 121, 0.18);
}

.topic-visual figcaption {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.topic-facts,
.article .topic-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.topic-fact,
.article .topic-fact {
  min-width: 0;
  margin: 0;
  padding: 15px 16px;
  border: 1px solid rgba(0, 166, 160, 0.22);
  border-radius: var(--radius-md);
  background: rgba(0, 166, 160, 0.07);
}

.topic-fact strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topic-fact span {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.4;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 26px;
}

.compare-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.compare-card--teal {
  border-color: rgba(0, 166, 160, 0.32);
  background: rgba(0, 166, 160, 0.07);
}

.compare-card--sun {
  border-color: rgba(255, 194, 75, 0.5);
  background: rgba(255, 194, 75, 0.11);
}

.compare-card h3 {
  margin-top: 0;
}

.compare-card p:last-child,
.compare-card ul:last-child {
  margin-bottom: 0;
}

.step-list,
.article .step-list {
  display: grid;
  gap: 14px;
  padding: 0;
  counter-reset: topic-step;
  list-style: none;
}

.step-list > li,
.article .step-list > li {
  position: relative;
  min-height: 58px;
  margin: 0;
  padding: 16px 18px 16px 66px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  counter-increment: topic-step;
}

.step-list > li::before {
  position: absolute;
  top: 14px;
  left: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-deep);
  color: #fff;
  content: counter(topic-step);
  font-weight: 800;
}

.callout {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid rgba(0, 166, 160, 0.28);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius-md);
  background: rgba(0, 166, 160, 0.07);
}

.callout--warning {
  border-color: rgba(255, 194, 75, 0.56);
  border-left-color: var(--sun);
  background: rgba(255, 194, 75, 0.12);
}

.callout h3 {
  margin-top: 0;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.source-list a {
  overflow-wrap: anywhere;
}

.topic-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}

.topic-link {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink) !important;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.topic-link:hover,
.topic-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 166, 160, 0.42);
  box-shadow: 0 12px 28px rgba(0, 126, 121, 0.12);
}

.topic-link span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topic-link strong {
  display: block;
  line-height: 1.35;
}

@media (max-width: 840px) {
  .topic-hero {
    grid-template-columns: 1fr;
  }

  .topic-visual {
    justify-self: start;
    width: min(100%, 340px);
  }

  .topic-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .compare-grid,
  .topic-links {
    grid-template-columns: 1fr;
  }
}
