/* Dental Mobile App Screen 3 — Final architecture
   Build 046.2: final frozen topic identity and shared section-heading component.
   The four sibling topics are anchored above the question box. */

.screen[data-screen="topic"] > .screen3-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, #f7fbfa 100%);
}

.screen3-topic-header {
  flex: 0 0 auto;
  padding: 8px 0 4px;
  border-bottom: 0;
}

.screen3-topic-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.screen3-topic-hero {
  display: block;
  flex: 0 0 auto;
  width: 53px;
  height: 53px;
  object-fit: contain;
}

.screen3-topic-header h1 {
  margin: 0;
  color: var(--text);
  font-size: var(--interior-hero-title-size);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.screen3-card-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: auto;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 10px;
  scrollbar-width: thin;
}

.screen3-learning-flow {
  display: grid;
  gap: 8px;
}

.screen3-card {
  border: 1px solid rgba(15,143,136,.14);
  border-radius: 17px;
  padding: 10px 14px 11px;
  background: #fff;
  box-shadow: 0 6px 17px rgba(6,50,55,.05);
}

.screen3-card h2 {
  margin: 0 0 5px;
  color: #182f38;
  font-size: var(--type-card-title);
  line-height: var(--type-card-title-line);
  letter-spacing: -.01em;
  font-weight: var(--type-card-title-weight);
}

.screen3-card p,
.screen3-card li {
  color: var(--interior-body-color);
  font-size: var(--interior-body-size);
  line-height: var(--interior-body-line-height);
}

.screen3-card p { margin: 0; }

.screen3-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
}

.screen3-card li {
  position: relative;
  padding-left: 18px;
}

.screen3-card li::before {
  content: "•";
  position: absolute;
  left: 2px;
  top: 0;
  color: #0f8f88;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 900;
}

.screen3-card-decision {
  border-color: rgba(15,143,136,.22);
  background: #eaf7f4;
}

.screen[data-screen="topic"] > .screen3-related {
  flex: 0 0 auto;
  padding: 6px 14px 5px;
  border-top: 1px solid rgba(215,231,226,.9);
  background: rgba(255,255,255,.98);
}

.screen3-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.screen3-related-card {
  min-width: 0;
  min-height: 58px;
  border: 1px solid rgba(15,143,136,.15);
  border-radius: 13px;
  padding: 5px 3px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  background: #fff;
  color: var(--text);
  box-shadow: 0 4px 11px rgba(6,50,55,.04);
}

.screen3-related-card span {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff4ed;
  font-size: 13px;
}

.screen3-related-card strong {
  min-width: 0;
  width: 100%;
  font-size: var(--type-related-label);
  line-height: var(--type-related-label-line);
  overflow-wrap: normal;
  word-break: normal;
}

.screen3-related-card:active { transform: translateY(1px); }

@media (max-height: 700px) {
  .screen3-topic-header { padding-top: 6px; padding-bottom: 6px; }
  .screen3-topic-hero { width: 52px; height: 52px; }
  .screen3-card-scroll { padding-top: 4px; padding-bottom: 7px; }
  .screen3-learning-flow { gap: 6px; }
  .screen3-card { padding-top: 8px; padding-bottom: 9px; }
  .screen[data-screen="topic"] > .screen3-related { padding-top: 5px; padding-bottom: 4px; }
  .screen3-related-card { min-height: 54px; }
}

@media (max-width: 360px) {
  .screen[data-screen="topic"] > .screen3-page {
    padding-left: 10px;
    padding-right: 10px;
  }
  .screen[data-screen="topic"] > .screen3-related {
    padding-left: 10px;
    padding-right: 10px;
  }
  .screen3-related-grid { gap: 6px; }
  .screen3-related-card { min-height: 54px; }
}

@media (min-width: 700px) {
  .screen3-topic-header,
  .screen3-card-scroll,
  .screen[data-screen="topic"] > .screen3-related {
    max-width: 430px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}
