/* Kangaroos in your garden (/kangaroo-4/). Loaded after guide.css.
   Pieces the magpie template doesn't have: a size range on the ruler, the Whiteman Park
   plant chart (percentage of seedlings eaten) and the fence cross-section. */

/* Quick facts: the ruler shows a range (97 to 223 cm), not a single length */
.sp-kangaroo .ruler { --max: 250; }
.ru-bar.rng { left: calc(var(--a) / var(--max) * 100%); width: calc((var(--v) - var(--a)) / var(--max) * 100%); }
.ru-val.from { left: calc(var(--a) / var(--max) * 100%); margin-left: 0; transform: translateX(-100%); padding-right: 5px; top: 20px; font-weight: 700; color: var(--ink2); }
.sp-kangaroo .ru-row { height: 44px; align-items: start; padding-top: 6px; }

/* Plants: one bar per species, 0 to 100% of seedlings eaten */
.kp { margin: 30px 0 0; max-width: 980px; }
.kp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; margin: 0; padding-bottom: 7px; border-bottom: 3px solid var(--ink); font-stretch: 75%; font-weight: 750; font-size: 15px; }
.kp-head span { font-weight: 600; color: var(--ink2); }
.kp-axis { position: relative; height: 24px; margin-right: 46px; font-stretch: 75%; font-size: 12px; font-weight: 650; color: var(--ink2); font-variant-numeric: tabular-nums; }
.kp-axis span { position: absolute; bottom: 4px; transform: translateX(-50%); }
.kp-axis span:first-child { transform: none; }
.kp-axis span:last-child { transform: translateX(-100%); }
.kp-list { list-style: none; margin: 0; padding: 0; }
.kp-list li { padding: 8px 0 9px; border-bottom: 1px solid var(--hair2); }
.kp-lab { margin: 0 0 5px; font-size: 14.5px; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.kp-lab b { font-stretch: 112%; font-weight: 800; }
.kp-lab i { color: var(--ink2); font-size: 13.5px; }
.kp-lab b, .kp-lab i { background: var(--white); position: relative; }
.kp-trk { position: relative; height: 18px; margin-right: 46px; background: linear-gradient(90deg, var(--hair) 1px, transparent 1px) 0 0 / 25% 100%; box-shadow: inset -1px 0 0 var(--hair); }
.kp-bar { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 1%); background: var(--c); border-radius: 0 2px 2px 0; transform-origin: 0 50%; transition: transform .8s var(--ease); }
.kp-val { position: absolute; top: 0; left: calc(var(--v) * 1%); margin-left: 3px; padding: 0 3px; background: var(--white); font-stretch: 75%; font-weight: 800; font-size: 14px; line-height: 18px; font-variant-numeric: tabular-nums; transition: opacity .3s .5s var(--ease); }
.kp-list li.lo .kp-bar { background: var(--ink); }
.kp-tag { font-stretch: 75%; font-weight: 750; font-size: 12px; line-height: 1; padding: 3px 5px 2px; border-radius: 2px; background: var(--ink); color: #fff; white-space: nowrap; }
.kp-list li:nth-child(n+6) .kp-bar { transition-delay: .08s; }
.kp-list li:nth-child(n+12) .kp-bar { transition-delay: .16s; }
.kp.is-hidden .kp-bar { transform: scaleX(0); }
.kp.is-hidden .kp-val { opacity: 0; }
.kp-cap { font-stretch: 75%; font-size: 13.5px; line-height: 1.45; color: var(--ink2); margin: 12px 0 0; max-width: 52em; }
.kp-notes { display: grid; gap: 0; margin: 34px 0 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); max-width: 60em; }
.kp-notes li { padding: 13px 0 14px; border-bottom: 1px solid var(--hair2); font-size: 16.5px; line-height: 1.45; }
.kp-notes b { font-weight: 750; }
@media (min-width: 760px) {
  .kp-list li { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 18px; align-items: center; }
  .kp-lab { margin: 0; flex-direction: column; gap: 1px; }
  .kp-axis { margin-left: 258px; font-size: 13px; }
  .kp-trk { height: 22px; }
  .kp-val { line-height: 22px; }
}

/* Fence cross-section: how kangaroos cross a fence */
.kf { display: grid; gap: 26px; margin-top: 30px; }
.kf-fig { margin: 0; border-top: 3px solid var(--ink); padding-top: 10px; }
.kf-svg { display: block; width: 100%; height: auto; max-width: 620px; overflow: visible; }
.kf-svg text { font-family: inherit; font-stretch: 75%; font-weight: 650; font-size: 11px; fill: var(--ink2); font-variant-numeric: tabular-nums; }
.kf-svg .kf-scale { stroke: var(--ink); stroke-width: 1; }
.kf-svg .kf-ground { stroke: var(--ink); stroke-width: 2; }
.kf-svg .kf-post { stroke: var(--ink); stroke-width: 4; }
.kf-svg .kf-wire { stroke: var(--ink); stroke-width: 1.25; }
.kf-svg .kf-ref { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 3 3; }
.kf-svg .kf-route { fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; transition: stroke .25s var(--ease), stroke-width .25s var(--ease), opacity .25s var(--ease), stroke-dashoffset 1s var(--ease); }
.kf-svg .kf-route.over { stroke-dasharray: 2 6; }
.kf-svg .kf-badge circle { fill: var(--c); transition: fill .25s var(--ease); }
.kf-svg .kf-badge text { fill: #fff; font-weight: 800; font-size: 12px; }
.kf-svg .kf-g { transition: opacity .25s var(--ease); }
.kf-svg marker path { fill: var(--c); }
.kf.has-focus .kf-g { opacity: .25; }
.kf.has-focus .kf-g.is-on { opacity: 1; }
.kf .kf-g.is-on .kf-route { stroke: var(--blue); stroke-width: 4; }
.kf .kf-g.is-on .kf-badge circle { fill: var(--blue); }
/* Draw the routes once, when scrolled into view (site-wide reduced-motion rule turns this off) */
.kf-svg .kf-route.draw { stroke-dasharray: 400; stroke-dashoffset: 0; }
.kf.is-hidden .kf-route.draw { stroke-dashoffset: 400; }
.kf.is-hidden .kf-g { opacity: 0; }
.kf-cap { font-stretch: 75%; font-size: 13.5px; color: var(--ink2); margin: 8px 0 0; max-width: 40em; }
.kf-legend { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.kf-legend li { padding: 4px 0 12px; border-bottom: 1px solid var(--hair2); }
.kf-legend p { margin: 0; font-size: 16px; line-height: 1.45; padding-left: 38px; }
.kf-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font: inherit; font-stretch: 112%; font-weight: 800; font-size: 18px; line-height: 1.2; letter-spacing: -.01em;
  color: inherit; background: none; border: 0; padding: 10px 0 4px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.kf-btn span { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font-stretch: 75%; font-size: 14px; font-variant-numeric: tabular-nums; transition: background-color .2s var(--ease), transform .15s var(--ease); }
.kf-btn[aria-pressed="true"] span { background: var(--blue); }
.kf-btn[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.kf-btn:active span { transform: scale(.9); }
@media (hover: hover) { .kf-btn:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; } }
.kf-legend .kf-tip { padding: 12px 0 0; border-bottom: 0; font-stretch: 75%; font-size: 13.5px; color: var(--ink2); }
@media (min-width: 1024px) {
  .kf { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; align-items: start; }
  .kf-btn { font-size: 20px; }
}

/* Injured: the joey steps sit under the main steps */
.kg-joey { margin-top: 26px; }
.kg-joey h3 { font-stretch: 112%; font-weight: 800; font-size: 21px; line-height: 1.15; margin: 0 0 10px; }
.kg-joey > p { font-size: 15.5px; line-height: 1.42; color: #E9EAFB; margin: 0 0 12px; max-width: 36em; }
.kg-joey > p b { color: #fff; }
.blue .law-note { color: #E9EAFB; border-left-color: #fff; }
.inj-src a:not(.src) { white-space: nowrap; font-weight: 750; }
