/* my-epiphany: Threats to Science series hub (threats-to-science.php, 2026-12-05).
   Colours follow the site: blue #009EE3 / #006FA6, ink #16202B, muted #5A6470. */

.tts { padding: 120px 0 70px; font-family: 'Open Sans', system-ui, sans-serif; color: #16202B; }
.tts .container { max-width: 1040px; }

/* Title */
.tts__head { text-align: center; margin-bottom: 26px; }
.tts__kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #006FA6; }
.tts__title { margin: 0 0 10px; font-size: clamp(30px, 4vw, 42px); line-height: 1.15; font-weight: 700; color: #16202B; }
.tts__lead { max-width: 680px; margin: 0 auto; font-size: 18px; line-height: 1.55; color: #5A6470; }

/* Introduction */
.tts__intro { max-width: 780px; margin: 0 auto 10px; }
.tts__intro p { font-size: 17px; line-height: 1.7; margin: 0 0 14px; }

.tts__h2 { margin: 42px 0 18px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; color: #16202B; }

/* Diagram */
.tts__map { margin: 0 0 22px; padding: 18px; border: 1px solid #E3E6EA; border-radius: 14px; background: #F7FAFC; }
.tts__svg { display: block; width: 100%; height: auto; }
.tts__edge line { stroke: #009EE3; stroke-width: 2.5; }
.tts__edge-label text { font-size: 14px; fill: #42526B; font-style: italic; }
.tts__node rect { fill: #fff; stroke: #B9D8EE; stroke-width: 1.5; transition: fill .15s, stroke .15s; }
.tts__node circle { fill: #009EE3; }
.tts__node-num { font-size: 14px; font-weight: 700; fill: #fff; }
.tts__node-name { font-size: 15px; font-weight: 600; fill: #16202B; }
.tts__node:hover rect, .tts__node:focus rect { fill: #E3F1FB; stroke: #009EE3; }
.tts__node:focus { outline: none; }
.tts__node:focus-visible rect { stroke: #006FA6; stroke-width: 3; }

/* The same links in words (always shown; the only version on small screens) */
.tts__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 22px; }
.tts__links li { padding: 14px 16px; border-left: 3px solid #009EE3; background: #fff; border-radius: 0 8px 8px 0; box-shadow: 0 1px 3px rgba(22,32,43,.08); }
.tts__pair { margin: 0 0 6px; font-weight: 600; font-size: 15px; line-height: 1.4; }
.tts__pair a { color: #006FA6; text-decoration: none; }
.tts__pair a:hover, .tts__pair a:focus { text-decoration: underline; }
.tts__arrow { margin: 0 6px; color: #009EE3; font-size: 17px; }
.tts__why { margin: 0; font-size: 15px; line-height: 1.55; color: #42526B; }

/* Topic cards */
.tts__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.tts__card-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid #E3E6EA; border-radius: 14px;
       background: #fff; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.tts__card-link:hover, .tts__card-link:focus-visible { box-shadow: 0 8px 22px rgba(22,32,43,.14); transform: translateY(-2px); text-decoration: none; color: inherit; }
.tts__card-link:focus-visible { outline: 3px solid rgba(0,158,227,.5); outline-offset: 2px; }
.tts__card-link img { display: block; width: 100%; height: 180px; object-fit: cover; }
.tts__card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.tts__card-num { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
       background: #009EE3; color: #fff; font-size: 13px; font-weight: 700; }
.tts__card-title { font-size: 19px; font-weight: 700; line-height: 1.3; color: #16202B; }
.tts__card-text { font-size: 15px; line-height: 1.55; color: #5A6470; }
.tts__card-more { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 700; color: #006FA6; }

/* What we can do */
.tts__next { margin-top: 44px; padding: 6px 24px 20px; border-radius: 14px; background: #16202B; color: #E4E8EC; }
.tts__next .tts__h2 { margin-top: 20px; color: #fff; }
.tts__next p { margin: 0; font-size: 16px; line-height: 1.7; }
.tts__next a { color: #5CC6F2; font-weight: 600; }
.tts__next a:hover, .tts__next a:focus { color: #fff; }

/* Small screens: the diagram's text gets too small to read, so the list carries the links */
@media (max-width: 640px) {
    .tts { padding-top: 96px; }
    .tts__map { display: none; }
    .tts__links { grid-template-columns: 1fr; }
    .tts__next { padding: 4px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .tts__card-link, .tts__node rect { transition: none; }
    .tts__card-link:hover { transform: none; }
}

@media print {
    .tts { padding-top: 20px; }
    .tts__map { break-inside: avoid; }
    .tts__card-link { box-shadow: none; }
}
