/* Turtle data hub (/data/): the hub, the methodology page and the short data posts.
   Sits on top of styles.css + help-centre.css (nav, breadcrumb, footer). Built by docs/data-hub/build.py. */
.dh { padding: 56px 0 80px; }
.dh-col { max-width: 760px; }
.dh-col h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: 0; margin-bottom: 20px; }
.dh-lede { font-size: 1.2rem; line-height: 1.65; color: var(--ink); max-width: 690px; }
.dh-meta { color: var(--ink-soft); font-size: .92rem; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.dh-col h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); letter-spacing: 0; margin: 48px 0 14px; }
.dh-col h3 { margin: 28px 0 10px; }
.dh-col p, .dh-col li { max-width: 68ch; }
.dh-col a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.dh-col ul.dh-list { margin: 0 0 1.2em; padding: 0; list-style: none; }
.dh-col ul.dh-list li { position: relative; padding-left: 26px; margin-bottom: 12px; }
.dh-col ul.dh-list li::before { content: "\221E"; position: absolute; left: 0; top: 0; color: var(--apricot); font-weight: 700; }

/* the one big number */
.dh-stat { margin: 30px 0 6px; padding: 24px; border-radius: var(--radius-sm); background: var(--lilac); border: 1px solid var(--lilac-deep); }
.dh-stat b { display: block; font-family: var(--display); font-size: clamp(2.6rem, 8vw, 4rem); line-height: 1; color: var(--brand-deep); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.dh-stat p { margin: 0; color: var(--ink); font-size: 1.05rem; }

/* chart: inline SVG with % widths, so text stays the same size on any screen */
.dh-chart { margin: 30px 0 8px; padding: 22px 22px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.dh-chart figcaption { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin-bottom: 4px; }
.dh-chart .dh-sub { color: var(--ink-soft); font-size: .9rem; margin: 0 0 12px; }
.dh-chart svg { display: block; width: 100%; overflow: visible; }
.dh-chart svg text { font-family: "Instrument Sans", sans-serif; font-size: 14px; fill: var(--ink); }
.dh-chart svg text.v { font-weight: 700; font-variant-numeric: tabular-nums; }
.dh-chart svg .track { fill: var(--lilac); }
.dh-chart svg .bar { fill: var(--brand); }
.dh-chart svg .bar.hi { fill: var(--apricot); }
.dh-src { font-size: .85rem; color: var(--ink-soft); margin: 10px 0 0; }

/* fallback table */
.dh-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0 8px; }
.dh-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.dh-table caption { text-align: left; font-weight: 600; padding-bottom: 10px; color: var(--ink); }
.dh-table th, .dh-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.dh-table thead th { background: var(--ink); color: #fff; font-size: .86rem; font-weight: 600; }
.dh-table .num { text-align: right; white-space: nowrap; }
.dh-table tbody tr:last-child th, .dh-table tbody tr:last-child td { border-bottom: 0; }
.dh-note { font-size: .9rem; color: var(--ink-soft); }

/* use-and-credit box */
.dh-cite { margin: 44px 0 0; padding: 26px; border-radius: var(--radius-sm); background: #fff; border: 2px solid var(--brand); box-shadow: 0 10px 30px -14px rgba(88, 86, 214, .45); }
.dh-cite h2 { margin: 0 0 8px; font-size: 1.4rem; }
.dh-cite p { margin: 0 0 12px; }
.dh-cite label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
.dh-cite textarea { width: 100%; min-height: 92px; padding: 12px; font: .85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.dh-cite textarea:focus-visible, .dh-copy:focus-visible { outline: 3px solid var(--brand-deep); outline-offset: 2px; }
.dh-copy { font: inherit; font-weight: 600; font-size: .9rem; margin-top: 8px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--lilac-deep); background: #fff; color: var(--ink); cursor: pointer; }
html:not(.js) .dh-copy { display: none; }

/* key findings (plain, quotable sentences for readers, journalists and AI answers) */
.dh-key { margin: 26px 0 0; padding: 20px 22px; border-left: 4px solid var(--brand); background: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; box-shadow: var(--shadow-sm); }
.dh-key h2 { font-size: .8rem !important; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: 0 0 8px !important; }
.dh-key p { margin: 0; font-size: 1.05rem; line-height: 1.6; }

/* what this means */
.dh-means { margin: 44px 0 0; padding: 26px; border-radius: var(--radius-sm); background: var(--apricot-soft); border: 1px solid #F2D2C2; }
.dh-means h2 { margin: 0 0 10px !important; font-size: 1.45rem !important; }
.dh-means p:last-child { margin-bottom: 0; }

/* research */
.dh-research ul { list-style: none; margin: 0; padding: 0; }
.dh-research li { padding: 16px 0; border-top: 1px solid var(--line); }
.dh-research li:last-child { border-bottom: 1px solid var(--line); }
.dh-research li p { margin: 0 0 6px; }
.dh-research .ref { font-size: .86rem; color: var(--ink-soft); overflow-wrap: anywhere; }

/* FAQ */
.dh-faq details { border-top: 1px solid var(--line); }
.dh-faq details:last-child { border-bottom: 1px solid var(--line); }
.dh-faq summary { cursor: pointer; padding: 16px 40px 16px 0; position: relative; font-family: var(--display); font-weight: 700; font-size: 1.1rem; list-style: none; }
.dh-faq summary::-webkit-details-marker { display: none; }
.dh-faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.5rem; color: var(--brand); }
.dh-faq details[open] summary::after { content: "\2212"; }
.dh-faq details p { color: var(--ink-soft); }

/* quiet app line */
.dh-app { margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); }

/* hub cards */
.dh-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 28px 0 10px; padding: 0; list-style: none; }
.dh-card { display: flex; flex-direction: column; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.dh-card .n { font-family: var(--display); font-weight: 800; font-size: 2.3rem; line-height: 1; color: var(--brand-deep); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.dh-card h3 { font-size: 1.12rem; margin: 0 0 8px; line-height: 1.25; }
.dh-card h3 a { color: var(--ink); }
.dh-card p { font-size: .92rem; color: var(--ink-soft); margin: 0 0 6px; }
.dh-card .embed { margin-top: auto; padding-top: 8px; font-size: .85rem; }
.dh-wide { max-width: 1040px; }
@media (max-width: 760px) { .dh-cards { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .dh { padding: 34px 0 60px; }
  .dh-chart, .dh-cite, .dh-stat { padding: 18px; }
  .dh-table th, .dh-table td { padding: 9px 6px; font-size: .86rem; }
  .dh-table .num { white-space: normal; }
}
