/* Aussie Bird Count with kids (/aussie-bird-count/). Loaded after guide.css.
   Pieces the magpie template doesn't have: the count-week strip, the jobs for kids, WA's top 20
   chart, and the tally sheet (timer and steppers on screen; a one-page A4 sheet in print). */

/* Honeyeater yellow is a fill colour only: numbers and labels use its darker edge */
.sp-honeyeater .yard li::before { color: var(--edge); }

/* Quick facts: five items (the week strip is the wide one) */
@media (min-width: 760px) {
  .bc-qf { grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr)); }
}

/* The count week: Monday 19 to Sunday 25 October */
.bc-wk { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.bc-wk li {
  display: grid; justify-items: center; gap: 1px; padding: 6px 0 7px;
  background: var(--c); box-shadow: inset 0 0 0 1px var(--edge); border-radius: 2px;
  font-variant-numeric: tabular-nums; transition: background-color .3s var(--ease), color .3s var(--ease);
}
.bc-wk span { font-stretch: 75%; font-weight: 650; font-size: 12px; line-height: 1.1; }
.bc-wk b { font-stretch: 112%; font-weight: 820; font-size: 19px; line-height: 1; }
.bc-wk li.is-past { background: transparent; color: var(--ink3); box-shadow: inset 0 0 0 1px var(--hair2); }
.bc-wk li.is-now { background: var(--ink); color: #fff; box-shadow: none; }
.bc-wk-note { display: block; margin-top: 8px; font-stretch: 75%; font-weight: 700; font-size: 14px; color: var(--ink); min-height: 1.3em; }

/* How it works: sign-up button and the independence line */
.bc-cta { margin: 22px 0 10px; }
.bc-cta .btn svg { transition: transform .2s var(--ease); }
.bc-cta .btn:hover svg, .bc-cta .btn:focus-visible svg { transform: translateX(3px); }
.bc-indep { font-stretch: 75%; font-size: 14.5px; font-weight: 600; color: var(--ink2); max-width: 30em; margin: 0; }

/* Jobs for kids: three columns ruled like the quick facts, not cards */
.bc-roles { display: grid; gap: 22px; margin: 30px 0 0; }
.bc-role { border-top: 3px solid var(--ink); padding-top: 10px; }
.bc-role dt { font-stretch: 125%; font-weight: 860; font-size: 30px; line-height: 1; letter-spacing: -.025em; margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; }
.bc-role-n { font-stretch: 75%; font-weight: 800; font-size: 18px; letter-spacing: 0; color: var(--edge); font-variant-numeric: tabular-nums; }
.bc-role dd { margin: 0; font-size: 16.5px; line-height: 1.45; max-width: 26em; }
.bc-roles-note { margin: 22px 0 0; font-size: 16.5px; max-width: 40em; color: var(--ink2); }
.bc-tips { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--hair2); max-width: 60em; }
.bc-tips li { position: relative; padding: 13px 0 14px 26px; border-bottom: 1px solid var(--hair2); font-size: 16.5px; line-height: 1.45; }
.bc-tips li::before { content: ""; position: absolute; left: 2px; top: 21px; width: 10px; height: 10px; background: var(--c); box-shadow: inset 0 0 0 1px var(--edge); border-radius: 50%; }
.bc-tips b { font-weight: 750; }
@media (min-width: 760px) {
  .bc-roles { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
  .bc-role dt { font-size: 36px; }
}

/* WA's top 20: one bar per bird, 0 to 50% of counts */
.bc-top-grid { display: grid; gap: 34px; margin-top: 30px; }
.bc-top { margin: 0; }
.bc-top-h { display: flex; justify-content: space-between; margin: 0; padding-bottom: 7px; border-bottom: 3px solid var(--ink); font-stretch: 75%; font-weight: 750; font-size: 15px; }
.bc-top-list { list-style: none; margin: 0; padding: 0; }
.bc-top-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr); padding: 8px 0 10px; border-bottom: 1px solid var(--hair2); }
.bc-r { grid-row: span 2; font-stretch: 75%; font-weight: 800; font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bc-lab { margin: 0 0 5px; font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.bc-lab b { font-stretch: 112%; font-weight: 800; }
.bc-mv { font-stretch: 75%; font-weight: 650; font-size: 13px; color: var(--ink2); }
.bc-mv.up::before { content: "\2191\00a0"; }
.bc-mv.down::before { content: "\2193\00a0"; }
.bc-intro .bc-mv { color: var(--red); }
.bc-trk { position: relative; height: 22px; background: #fff linear-gradient(90deg, var(--hair) 1px, transparent 1px) 0 0 / 20% 100%; }
.bc-bar { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 2%); background: var(--c); box-shadow: inset 0 0 0 1px var(--edge); border-radius: 0 2px 2px 0; transform-origin: 0 50%; transition: transform .9s var(--ease); }
.bc-intro .bc-bar { background: repeating-linear-gradient(135deg, var(--c) 0 3px, #fff 3px 6px); }
.bc-val { position: absolute; top: 0; left: calc(var(--v) * 2%); margin-left: 7px; font-stretch: 75%; font-weight: 800; font-size: 14px; line-height: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity .3s .6s var(--ease); }
.bc-val.in { left: auto; right: calc(100% - var(--v) * 2%); margin: 0 7px 0 0; }
.bc-intro .bc-val.in { background: #fff; padding: 0 4px; line-height: 18px; top: 2px; border-radius: 2px; }
.bc-top-list li:nth-child(n+2) .bc-bar { transition-delay: .04s; }
.bc-top-list li:nth-child(n+6) .bc-bar { transition-delay: .1s; }
.bc-top-list li:nth-child(n+11) .bc-bar { transition-delay: .16s; }
.bc-top-list li:nth-child(n+16) .bc-bar { transition-delay: .22s; }
.bc-top.is-hidden .bc-bar { transform: scaleX(0); }
.bc-top.is-hidden .bc-val { opacity: 0; }
.bc-axis { position: relative; height: 24px; margin: 8px 0 0 36px; border-top: 1px solid var(--ink); font-stretch: 75%; font-size: 12.5px; font-weight: 650; color: var(--ink2); font-variant-numeric: tabular-nums; }
.bc-axis span { position: absolute; top: 5px; transform: translateX(-50%); }
.bc-axis span:first-child { transform: none; }
.bc-axis span:last-child { transform: translateX(-100%); }
.bc-cap { font-stretch: 75%; font-size: 13.5px; color: var(--ink2); margin-top: 8px; max-width: 44em; }
.bc-ph-fig { margin: 0; }
.bc-ph-fig figcaption { font-stretch: 75%; font-size: 13.5px; color: var(--ink2); padding-top: 8px; }
.bc-note { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--hair2); font-size: 16px; line-height: 1.45; }
.bc-note b { font-weight: 750; }
@media (min-width: 760px) {
  .bc-trk { height: 26px; }
  .bc-val { line-height: 26px; font-size: 15px; }
  .bc-lab { font-size: 15px; }
}
@media (min-width: 1024px) {
  .bc-top-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: 56px; align-items: start; }
  .bc-side { position: sticky; top: 100px; }
}

/* Tally sheet (screen) */
.bc-sheet { max-width: 760px; margin-top: 28px; }
.bc-print-head { display: none; }
.bc-timer { border-top: 3px solid var(--ink); padding: 14px 0 20px; }
.bc-t-time { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bc-t-time > span:first-child { font-stretch: 75%; font-weight: 820; font-size: 64px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bc-t-of { font-stretch: 75%; font-weight: 650; font-size: 15px; color: var(--ink2); }
.bc-t-bar { height: 10px; margin: 12px 0 10px; background: var(--lime); box-shadow: inset 0 0 0 1px var(--hair); }
.bc-t-bar b { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--c); box-shadow: inset 0 0 0 1px var(--edge); transition: width 1s linear; }
.bc-t-msg { margin: 0 0 14px; font-size: 16.5px; min-height: 1.5em; }
.bc-timer.is-done .bc-t-time > span:first-child { color: var(--blue); }
.bc-timer.is-done .bc-t-msg { font-weight: 700; }
.bc-t-btns, .bc-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.bc-b2 {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-stretch: 75%; font-weight: 700; font-size: 17px; line-height: 1;
  color: var(--ink); background: transparent; border: 1.5px solid var(--ink); border-radius: 2px;
  padding: 14px 18px; cursor: pointer; transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.bc-b2:hover { background: var(--lime); }
.bc-b2:active { transform: scale(.97); }
.bc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 16px 0 20px; border-top: 3px solid var(--ink); }
.bc-fields label { display: grid; gap: 2px; min-width: 0; }
.bc-fields span { font-stretch: 75%; font-weight: 700; font-size: 14px; color: var(--ink2); }
.bc-sheet input { font: inherit; font-size: 17px; color: var(--ink); background: transparent; border-radius: 0; }
.bc-fields input { width: 100%; border: 0; border-bottom: 1.5px solid var(--ink); padding: 6px 0; }
.bc-sheet input:focus { outline: none; box-shadow: 0 2px 0 0 var(--blue); }
.bc-tab { width: 100%; border-collapse: collapse; border-top: 3px solid var(--ink); }
.bc-tab thead th { text-align: left; font-stretch: 75%; font-weight: 700; font-size: 14px; color: var(--ink2); padding: 9px 0 8px; border-bottom: 1px solid var(--ink); }
.bc-tab thead .bc-c-most { text-align: right; }
.bc-tab tbody th { text-align: left; font-weight: 700; font-size: 16.5px; line-height: 1.2; padding: 7px 10px 7px 0; }
.bc-tab tbody tr { border-bottom: 1px solid var(--hair2); }
.bc-tab tbody tr.has-n th { color: var(--ink); }
.bc-tab tbody tr.has-n { background: linear-gradient(90deg, rgba(242, 194, 48, .22), rgba(242, 194, 48, 0) 70%); }
.bc-c-grp { display: none; }
.bc-c-most { text-align: right; white-space: nowrap; width: 1%; padding: 6px 0; }
.bc-c-grp span { font-weight: 600; }
.bc-tab input[type="number"] {
  width: 58px; height: 42px; text-align: center; font-stretch: 75%; font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--ink); -moz-appearance: textfield; appearance: textfield;
}
.bc-tab input[type="number"]::-webkit-inner-spin-button, .bc-tab input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bc-tab input[type="number"]:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.bc-other input[type="text"] { width: 100%; border: 0; border-bottom: 1.5px dashed var(--hair2); padding: 5px 0; font-weight: 700; font-size: 16.5px; }
.bc-step { display: inline-flex; align-items: stretch; }
.bc-step button {
  width: 42px; height: 42px; padding: 0; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 0;
  font: inherit; font-weight: 700; font-size: 22px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .12s var(--ease), transform .12s var(--ease);
}
.bc-step button:first-child { border-right: 0; border-radius: 2px 0 0 2px; }
.bc-step button:last-child { border-left: 0; border-radius: 0 2px 2px 0; }
.bc-step button:hover { background: var(--lime); }
.bc-step button:active { background: var(--c); transform: scale(.94); }
.bc-step input.is-bump { animation: bc-bump .25s var(--ease); }
@keyframes bc-bump { 40% { transform: scale(1.12); } }
.bc-rule { margin: 18px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--ink2); max-width: 44em; }
.bc-rule b { color: var(--ink); font-weight: 750; }
.bc-acts { margin-top: 20px; }
.bc-keep { margin: 14px 0 0; font-stretch: 75%; font-size: 14px; font-weight: 600; color: var(--ink2); max-width: 40em; }
@media (min-width: 760px) {
  .bc-fields { grid-template-columns: 1fr 1.5fr 1fr 1fr; }
  .bc-t-time > span:first-child { font-size: 84px; }
}

/* Watch, don't feed: the help line under the do and don't lists */
.bc-help { margin: 30px 0 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); font-size: 16.5px; line-height: 1.5; max-width: 46em; }
.bc-help b { color: #fff; font-weight: 750; }
.bc-help a.tel { font-weight: 700; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .bc-wk li, .bc-bar, .bc-val, .bc-t-bar b, .bc-step button, .bc-b2, .bc-cta .btn svg { transition: none !important; }
  .bc-step input.is-bump { animation: none; }
}

/* Print: only the tally sheet, on one A4 page */
@media print {
  @page { size: A4 portrait; margin: 10mm 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > :not(main) { display: none !important; }
  main > article > :not(#tally) { display: none !important; }
  #tally { padding: 0 !important; background: #fff !important; }
  #tally .wrap { padding: 0 !important; max-width: none !important; }
  #tally .sec, #tally .lede, .bc-timer, .bc-acts, .bc-keep, .bc-step button { display: none !important; }
  .bc-sheet { max-width: none; margin: 0; }
  .bc-print-head { display: block; border-bottom: 2pt solid #000; padding-bottom: 2mm; margin-bottom: 3mm; }
  .bc-print-t { margin: 0; font-stretch: 125%; font-weight: 860; font-size: 21pt; line-height: 1.05; letter-spacing: -.02em; }
  .bc-print-s { margin: 1.2mm 0 0; font-stretch: 75%; font-weight: 650; font-size: 9.5pt; }
  .bc-fields { grid-template-columns: 1fr 1.7fr 1fr 1fr; gap: 3mm 5mm; padding: 0 0 3.5mm; border-top: 0; }
  .bc-fields span { font-size: 8.5pt; color: #000; }
  .bc-fields input { height: 7.5mm; padding: 0; font-size: 11pt; border-bottom: 1pt solid #000; }
  .bc-tab { border-top: 0; table-layout: fixed; }
  .bc-tab th, .bc-tab td { height: 7.6mm; padding: 0 2mm !important; border: .75pt solid #000; vertical-align: middle; }
  .bc-tab thead th { height: 7mm; font-size: 8.5pt; color: #000; background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bc-tab thead .bc-c-most { text-align: center; }
  .bc-tab tbody th { font-size: 10.5pt; width: 58mm; }
  .bc-tab tbody tr.has-n { background: none !important; }
  .bc-c-grp { display: table-cell !important; }
  .bc-c-grp span { font-weight: 500; }
  .bc-c-most { width: 25mm; text-align: center; }
  .bc-tab input[type="number"] { width: 100%; height: 7.5mm; border: 0; font-size: 13pt; }
  .bc-other input[type="text"] { border: 0; font-size: 10.5pt; }
  .bc-other input[type="text"]::placeholder { color: #bbb; }
  .bc-rule { margin-top: 3mm; font-size: 9pt; line-height: 1.35; color: #000; max-width: none; }
  .bc-rule b { color: #000; }
  a[href]::after { content: none !important; }
}
