/* Our Reasons: research dashboard. Local draft. Builds on site/css/site.css (brand colors, type, bands, the one button). */

.draft { background: var(--sun); border-bottom: var(--line); padding: 8px var(--gutter); font-size: 0.9rem; font-weight: 700; text-align: center; }

.bar__back { margin-left: auto; font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.bar__back:hover { border-bottom-color: var(--red); }

/* Opening: the tagline is the page's spine */
.open { background: var(--blue); color: var(--white); border-bottom: var(--line); padding-block: clamp(56px, 9vw, 120px) clamp(40px, 6vw, 72px); }
.open h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.8rem, 10vw, 6.5rem); line-height: 0.95; margin: 0 0 0.3em; text-shadow: 4px 4px 0 var(--red); }
.open__tag { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.1rem, 2.6vw, 1.7rem); line-height: 1.2; color: var(--sun); margin: 0 0 1.2em; }
.open__say { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); line-height: 1.5; max-width: 38em; margin: 0; }
.open__say + .open__say { margin-top: 0.9em; }
.open__by { margin-top: 1.4em; font-style: italic; }

.jump { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: clamp(28px, 4vw, 44px); padding-top: 18px; border-top: 2px solid rgba(255,255,255,0.4); font-weight: 700; }
.jump a { text-decoration-color: var(--sun); }

/* Section furniture */
.sec__note { max-width: 44em; margin-bottom: 1.6em; }
.sub { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1.1; margin: 2.2em 0 0.6em; }
.sub:first-child { margin-top: 0; }
.src { font-size: 0.86em; line-height: 1.4; }
.src a { text-decoration-thickness: 1.5px; }

/* Verses */
.verses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(24px, 4vw, 56px); margin-top: 1.6em; }
.verses blockquote { margin: 0; padding: 18px 0; border-top: var(--line); font-size: 1.1em; }
.verses cite { display: block; margin-top: 6px; font-size: 0.86em; font-style: normal; font-weight: 700; }
@media (max-width: 700px) { .verses { grid-template-columns: 1fr; } }

/* Filter row above the tiles */
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; align-items: center; }
.filter__label { font-weight: 700; margin-right: 4px; }
.chip { font: inherit; font-weight: 700; color: var(--ink); background: var(--white); border: var(--line); border-radius: 999px; padding: 0.35em 1em; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.chip:hover { box-shadow: 0 0 0 3px var(--sun); }

/* Metric tiles: one number, what it is, where it came from */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tile { background: var(--white); border: var(--line); border-radius: var(--radius); padding: 18px 18px 16px; display: flex; flex-direction: column; border-top-width: 10px; }
.tile[hidden] { display: none; }
.tile--ground { border-top-color: var(--kelp-dark); }
.tile--food { border-top-color: var(--red); }
.tile--health { border-top-color: var(--blue); }
.tile--system { border-top-color: var(--ink); }
.tile__num { font-family: var(--display); font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1; margin: 0 0 0.25em; }
.tile__num small { font-family: var(--text); font-weight: 700; font-size: 0.42em; letter-spacing: 0; }
.tile__what { margin: 0 0 0.9em; line-height: 1.4; }
.tile .src { margin: auto 0 0; padding-top: 10px; border-top: 1px solid #d9d4c7; }
.tile__kind { display: block; font-weight: 700; }

/* The chain: read from the ground up. The bottom row is the first in the page's order. */
.chain { display: flex; flex-direction: column-reverse; border: var(--line); border-radius: var(--radius); overflow: hidden; }
.link { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: clamp(14px, 3vw, 36px); padding: 22px clamp(16px, 3vw, 32px); border-top: var(--line); align-items: start; }
.link:last-child { border-top: 0; }
.link h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1; margin: 0 0 0.3em; }
.link__up { font-size: 0.9em; font-weight: 700; margin: 0; }
.link p { margin: 0 0 0.6em; max-width: 46em; }
.link--microbe { background: #3b2a1c; color: var(--white); }
.link--soil { background: #6b4a2b; color: var(--white); }
.link--plant { background: var(--kelp-dark); color: var(--white); }
.link--animal { background: var(--field); }
.link--food { background: var(--sun); }
.link--gut { background: var(--sky); }
.link--body { background: var(--white); }
.grade { display: inline-block; font-weight: 700; font-size: 0.86em; border: 2px solid currentColor; border-radius: 999px; padding: 0.1em 0.8em; margin-bottom: 0.7em; }
.chain__hint { font-weight: 700; margin: 0 0 12px; }
@media (max-width: 640px) { .link { grid-template-columns: 1fr; gap: 6px; } }

/* Then and now */
.then { width: 100%; border-collapse: collapse; }
.then th, .then td { text-align: left; padding: 12px 14px 12px 0; border-top: var(--line); vertical-align: top; }
.then thead th { border-top: 0; font-size: 0.9em; }
.then td:nth-child(2), .then td:nth-child(3) { font-family: var(--display); font-size: 1.25em; line-height: 1.15; white-space: nowrap; }
.then td:nth-child(3) { color: var(--red); }
.then tr.then__layer th { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.15em; padding-top: 26px; border-top: 0; }
.scroll { overflow-x: auto; }
.scroll table { min-width: 640px; }

/* Charts */
.chart { margin: 0 0 clamp(28px, 4vw, 44px); background: var(--white); border: var(--line); border-radius: var(--radius); padding: clamp(14px, 2.4vw, 26px); }
.chart__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.15; margin: 0 0 0.5em; }
.chart__art { width: 100%; height: auto; }
.chart__scroll { overflow-x: auto; }
.chart__scroll .chart__art { min-width: 620px; }
.chart figcaption { margin-top: 12px; max-width: 52em; }
.chart details { margin-top: 10px; font-size: 0.92em; }
.chart summary { cursor: pointer; font-weight: 700; }
.chart details table { border-collapse: collapse; margin-top: 8px; }
.chart details th, .chart details td { text-align: left; padding: 4px 18px 4px 0; border-top: 1px solid #d9d4c7; }
.pair { display: grid; grid-template-columns: 1fr; }
.chart, .pair > * { min-width: 0; }
.chart--mid .chart__scroll { max-width: 820px; }

.key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 10px; font-size: 0.9em; font-weight: 700; }
.key span::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 7px; vertical-align: -2px; background: var(--blue); }
.key .key--red::before { background: var(--red); }

/* Plain lists of findings with their sources */
.finds { display: grid; gap: 0; }
.finds li { padding: 14px 0; border-top: var(--line); display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; }
.finds li:last-child { border-bottom: var(--line); }
.finds p { margin: 0; max-width: 50em; }
.band--blue .finds li, .band--green .finds li { border-color: rgba(255,255,255,0.4); }
.band--blue .star, .band--green .star { fill: var(--sun); }

.do { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.do .card h3 { font-size: 1.2rem; }
.do .card p { margin-bottom: 0.6em; }
@media (max-width: 760px) { .do { grid-template-columns: 1fr; } }

.method { font-size: 0.95em; }
.method li { padding: 8px 0; border-top: 1px solid #d9d4c7; max-width: 52em; }

.chart__swipe { display: none; font-size: 0.86em; font-style: italic; margin: 0 0 6px; }
@media (max-width: 680px) { .chart__swipe { display: block; } }

/* Two maps that slide over one another, hold, and return.
   The stage keeps one fixed size in both states, so nothing below it moves. */
.maps__stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: end; padding-block: 5.5% calc(6% + 4em); }
/* Each map sits in an equal half with the same side padding, and only the picture moves:
   exactly half its own box width, so the two land on the same spot whatever the labels above them do. */
.maps__one { margin: 0; padding-inline: 1.5%; }
.maps__one img { width: 100%; height: auto; transition: transform 1.6s cubic-bezier(0.65, 0, 0.2, 1); }
.maps__name { font-weight: 700; margin: 0 0 6px; text-align: center; transition: opacity 0.6s; }
.maps__one--cancer img { mix-blend-mode: multiply; }
.maps__stage[data-state="merged"] .maps__one--spray img { transform: translateX(calc(50% + 100% * 1.5 / 97)) scale(1.35); }
.maps__stage[data-state="merged"] .maps__one--cancer img { transform: translateX(calc(-50% - 100% * 1.5 / 97)) scale(1.35); }
.maps__stage[data-state="merged"] .maps__name { opacity: 0; }
.maps__say { position: absolute; left: 0; right: 0; bottom: 0; height: 4em; margin: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; line-height: 1.3; pointer-events: none; transition: opacity 0.7s; }
.maps__say--merged { opacity: 0; }
.maps__stage[data-state="merged"] .maps__say--merged { opacity: 1; transition-delay: 0.9s; }
.maps__stage[data-state="merged"] .maps__say--apart { opacity: 0; }
.maps__stage[data-state="apart"] .maps__say--apart { transition-delay: 0.9s; }
@media (max-width: 680px) { .maps__stage { padding-bottom: calc(6% + 5.6em); } .maps__say { height: 5.6em; font-size: 0.92em; } }
.maps__foot { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; margin-top: 4px; }
.maps__key { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; font-size: 0.9em; font-weight: 700; }
.maps__key i { display: inline-block; width: 20px; height: 14px; vertical-align: -2px; }
.maps__key i:first-of-type { margin-left: 8px; }
.maps__ring::before { content: ""; display: inline-block; width: 12px; height: 12px; border: 2.5px solid var(--ink); border-radius: 50%; margin-right: 7px; vertical-align: -2px; }
@media (prefers-reduced-motion: reduce) { .maps__one img, .maps__name, .maps__say { transition: none !important; } }

/* Know where your food comes from */
.know { display: grid; grid-template-columns: minmax(260px, 5fr) 7fr; gap: clamp(20px, 4vw, 56px); align-items: center; margin: 0 0 clamp(24px, 4vw, 40px); padding: clamp(20px, 3vw, 34px) 0 0; border-top: 2px solid rgba(255,255,255,0.4); }
.know__num { font-family: var(--display); font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 0.95; margin: 0 0 0.15em; color: var(--sun); }
.know__what { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.1rem, 2.2vw, 1.5rem); line-height: 1.15; margin: 0; }
.know__how p { margin: 0 0 0.7em; max-width: 40em; }
.know__turn { font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.55rem); font-weight: 700; line-height: 1.4; max-width: 34em; margin: clamp(24px, 4vw, 40px) 0 0; }
@media (max-width: 760px) { .know { grid-template-columns: 1fr; } }
