/* Family activities — bespoke interactive pieces rendered inside a week page.
   Written by hand, one per week. Inherits the marker/whiteboard system from
   application.css (--ink, --paper, --soft, --marker, --line) and only adds what
   those classes cannot cover. Tablet first: nothing here has a touch target
   under 2.75rem, because the boys drive this with their thumbs. */

.activity {
  margin: 2.5rem 0 3rem;
  padding: 1.4rem 1.25rem 1.6rem;
  border: var(--line);
  border-radius: 0.55rem 0.9rem 0.65rem 0.4rem;
  box-shadow: 4px 5px 0 var(--ink);
  background: #fff;
}
.activity__eyebrow {
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.activity__title { margin-bottom: 0.5rem; font-size: clamp(1.6rem, 6vw, 2.3rem); }
.activity__lede { max-width: 40rem; margin-bottom: 0; }

.activity__section { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 3px solid var(--ink); }
.activity__section:first-of-type { border-top: 0; padding-top: 0; }
.activity__section h3 { margin-bottom: 0.6rem; font-size: 1.15rem; }
.activity__hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.85rem; }

/* --- the scale drawing --------------------------------------------------- */

.ark-stage {
  position: relative;
  margin: 1.1rem 0 0;
  padding: 1rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 0.45rem;
  background: var(--soft);
  overflow-x: auto;
}
.ark-stage svg { display: block; width: 100%; height: auto; min-width: 20rem; }

/* Strokes are non-scaling so a 150-unit viewBox does not blow them up to
   16px slabs; widths below are therefore real screen pixels. Font sizes stay
   on the SVG elements as user units, so nothing here may set font-size. */
.ark-hull, .ark-deck, .ark-door, .ark-compare, .ark-dim { vector-effect: non-scaling-stroke; }

.ark-hull { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.ark-deck { stroke: var(--ink); stroke-width: 1.25; stroke-dasharray: 5 4; }
.ark-door { fill: var(--marker); stroke: var(--ink); stroke-width: 2; }
.ark-compare { fill: var(--marker); stroke: var(--ink); stroke-width: 1.5; }
.ark-compare--ghost { fill: rgb(244 202 63 / 45%); }
.ark-label { font-weight: 800; fill: var(--ink); }
.ark-label--muted { fill: var(--muted); font-weight: 700; }
.ark-dim { stroke: var(--ink); stroke-width: 1.25; }

/* --- the comparison picker ------------------------------------------------ */

.ark-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  border: 0;
}
.ark-picker legend { padding: 0; margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 850; }
.ark-picker__option { position: relative; }
.ark-picker__option input { position: absolute; opacity: 0; pointer-events: none; }
.ark-picker__option span {
  display: block;
  min-height: 2.75rem;
  padding: 0.6rem 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
}
.ark-picker__option input:checked + span { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--marker); }
.ark-picker__option input:focus-visible + span { outline: 4px solid var(--marker); outline-offset: 3px; }

.ark-verdict {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1rem;
  border: 2px dashed var(--ink);
  border-radius: 0.45rem;
  background: #fffdf3;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.5;
}
.ark-verdict strong { font-weight: 900; }

/* --- the number tiles ----------------------------------------------------- */

.ark-figures {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.1rem;
}
.ark-figure {
  padding: 0.9rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 0.4rem;
  background: #fff;
}
.ark-figure dt {
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ark-figure dd { margin: 0; font-size: 1.45rem; font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ark-figure dd small { display: block; margin-top: 0.15rem; font-size: 0.8rem; font-weight: 750; color: var(--muted); }

/* --- pace it out ---------------------------------------------------------- */

.ark-pace { display: grid; gap: 0.85rem; margin-top: 1.1rem; }
@media (min-width: 34rem) { .ark-pace { grid-template-columns: 11rem 1fr; align-items: end; } }
.ark-pace label { display: block; margin-bottom: 0.3rem; font-size: 0.82rem; font-weight: 850; }
.ark-pace input { min-height: 2.8rem; }
.ark-pace__result {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 0.4rem;
  background: var(--marker);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 32rem) {
  .ark-figures { grid-template-columns: 1fr; }
  .activity { padding: 1.1rem 0.95rem 1.3rem; }
}

/* --- print ---------------------------------------------------------------- */

@media print {
  .activity { border: 2px solid #000; box-shadow: none; break-inside: avoid; }
  .ark-stage { background: #fff; border-color: #000; overflow: visible; }
  .ark-picker, .ark-pace input { display: none; }
  .ark-compare, .ark-door { fill: #fff; }
  .ark-verdict, .ark-pace__result { background: #fff; border: 1px solid #000; }
  .activity__section { break-inside: avoid; }
}

/* --- "Put the week in order" ---------------------------------------------- */

.order-slot { margin-top: 1.2rem; padding: 1rem; border: 2px solid var(--ink); border-radius: 0.45rem; background: #fff; }
.order-slot__name { margin-bottom: 0.65rem; font-size: 1.02rem; font-weight: 900; }
.order-slot__name span { display: block; font-size: 0.78rem; font-weight: 750; color: var(--muted); }

.order-days { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.order-day { position: relative; }
.order-day input { position: absolute; opacity: 0; pointer-events: none; }
.order-day span {
  display: grid;
  place-items: center;
  min-width: 3rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 850;
  cursor: pointer;
}
.order-day input:checked + span { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--marker); }
.order-day input:focus-visible + span { outline: 4px solid var(--marker); outline-offset: 3px; }

.order-time { display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 0.8rem; font-size: 0.88rem; font-weight: 850; }
.order-time input { width: auto; min-height: 2.8rem; }
.order-time--row { display: flex; justify-content: space-between; gap: 1rem; margin-top: 0; }

.order-clock { display: grid; gap: 0.7rem; margin-top: 1.1rem; padding: 1rem; border: 2px solid var(--ink); border-radius: 0.45rem; background: #fff; }
.order-vote { margin: 0.9rem 0 0; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.order-fieldset { margin: 0.6rem 0 0; padding: 0; border: 0; }
.order-fieldset legend { padding: 0; margin-bottom: 0.55rem; font-size: 0.88rem; font-weight: 850; }

.order-free { display: block; margin-top: 1.2rem; font-size: 0.88rem; font-weight: 850; }
.order-free span { display: block; margin-bottom: 0.35rem; }

/* the week assembling itself */
.order-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 1.1rem 0 0;
  padding: 0.8rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 0.45rem;
  background: var(--soft);
  overflow-x: auto;
}
.order-col { min-width: 0; }
.order-col__day { margin-bottom: 0.4rem; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; color: var(--muted); }
.order-col ul { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }

.order-chip {
  padding: 0.4rem 0.35rem;
  border: 2px solid var(--ink);
  border-radius: 0.3rem;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.order-chip time { display: block; margin-top: 0.15rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.order-chip--worship { background: var(--marker); }
.order-chip--study { background: #fff3bf; }
.order-chip--movie { background: #fff; border-style: dashed; }
.order-chip--empty { border: 0; background: transparent; color: var(--muted); font-weight: 700; }

.order-summary { margin: 0.9rem 0 0; font-size: 0.95rem; font-weight: 800; }
.order-actions { margin-top: 1.4rem; }
.order-actions .activity__hint { margin-top: 0.6rem; }

@media (max-width: 40rem) {
  .order-week { grid-template-columns: repeat(7, 6.2rem); }
  .order-time--row { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}

@media print {
  .order-days, .order-clock input, .order-actions, .order-free input { display: none; }
  .order-week { background: #fff; border-color: #000; }
  .order-chip--worship, .order-chip--study { background: #fff; }
}
.order-chip--prep { background: #fff7d6; }
@media print { .order-chip--prep { background: #fff; } }

/* --- "Why did Egypt wrap its dead?" --------------------------------------- */

.mummy-stage {
  display: block;
  width: min(100%, 15rem);
  margin: 1.1rem auto 0;
  padding: 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 0.45rem;
  background: var(--soft);
  cursor: pointer;
  touch-action: manipulation;
}
.mummy-stage:focus-visible { outline: 4px solid var(--marker); outline-offset: 3px; }
.mummy-stage svg { display: block; width: 100%; height: auto; }

.mummy-body > * { fill: #d9b98c; stroke: var(--ink); stroke-width: 1.2; }
.mummy-face path, .mummy-face circle { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; }
.mummy-face circle { fill: var(--ink); }
.mummy-face--awake { display: none; }
.is-freed .mummy-face--awake { display: inline; }
.is-freed .mummy-face--asleep { display: none; }

.mummy-strip {
  fill: #f7f0df;
  stroke: #b5a888;
  stroke-width: 0.6;
  opacity: 0;
  transform-box: fill-box;
  transition: opacity 180ms ease, translate 700ms ease-in;
}
.mummy-strip.is-on { opacity: 1; }
.mummy-strip.is-falling { opacity: 0; translate: 0 60px; }

.mummy-count { margin: 0.8rem 0 0; text-align: center; font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }

.mummy-facts { display: grid; gap: 0.55rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.mummy-facts li, .mummy-unwrap, .mummy-freed {
  padding: 0.75rem 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 0.4rem;
  background: #fff;
  line-height: 1.5;
}
.mummy-unwrap { margin-top: 1rem; border-style: dashed; background: #fffdf3; }
.mummy-unwrap p { margin: 0; }
.mummy-freed { margin: 1rem 0 0; background: var(--marker); font-weight: 800; }
.mummy-reset, .coloring-clear { padding: 0; border: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; }

.mummy-cards { display: grid; gap: 0.85rem; margin-top: 1rem; }
@media (min-width: 34rem) { .mummy-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mummy-card { padding: 0.9rem 1rem; border: 2px solid var(--ink); border-radius: 0.4rem; background: #fff; }
.mummy-card p { margin: 0; line-height: 1.5; }
.mummy-card .mummy-card__ref { margin-bottom: 0.35rem; font-weight: 900; }

.mummy-teaser { padding: 0.9rem 1rem; border: 2px dashed var(--ink); border-radius: 0.45rem; background: #fffdf3; font-weight: 800; }

/* --- tap-to-color page ----------------------------------------------------- */

.coloring-palette { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; border: 0; }
.coloring-palette legend { padding: 0; margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 850; }
.coloring-swatch { position: relative; }
.coloring-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.coloring-swatch > span {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--swatch);
  cursor: pointer;
}
.coloring-swatch input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.coloring-swatch input:focus-visible + span { outline: 4px solid var(--marker); outline-offset: 5px; }

.coloring-stage { margin-top: 1rem; padding: 0.5rem; border: 2px solid var(--ink); border-radius: 0.45rem; background: #fff; }
.coloring-stage svg { display: block; width: 100%; height: auto; }
.coloring-region { fill: #fff; stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; cursor: pointer; }
.coloring-lines { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.coloring-lines path { vector-effect: non-scaling-stroke; }

@media print {
  .mummy-stage, .mummy-count, .mummy-unwrap, .mummy-freed, .mummy-reset, .coloring-palette, .coloring-clear { display: none; }
  .mummy-facts li[hidden] { display: block; }
  .mummy-facts li, .mummy-card, .mummy-teaser { background: #fff; border: 1px solid #000; }
  .coloring-stage { border: 0; padding: 0; }
}
