/* The activities pages and the home page's Activities section, on sites whose public input opts in.
   Everything here styles new elements; nothing shipped is restyled. Built into /activities-20261117.css
   with one rule per leading picture (lib/activities.js photoRules) for its proportions.

   THE GRID (swiss-raster). It covers our parts only, and is measured from the top of each part
   (the Activities section on the home page; <main> on the activities pages), because the
   shipped sections above have fluid heights.
     unit      2 px in type line heights (24, 30); spacing uses whole or half baselines only
     baseline  the body line: 24 px below 1024 (body 16.81 to 19.4 px), 30 px from 1024
               (body 19.42 to 21.41 px, shipped line 27.5 to 30.3 px)
     module    1 baseline. The pages carry no script, so a block that follows wrapping text can be
               held to the line, never to every second line.
     columns   the shipped 1080 frame. Cards: 3 fields with 32 px gutters (the shipped plans row).
               One activity: rail 340, gutter 64, text 504 at 1440 (constituition reader.css 2-28).
     ladder    inside a group 1 line; between items 2 lines; between sections 3 lines.
   Every line height below is a whole number of baselines at every width: the fixed ones are
   var(--b); a title's is its fluid size rounded up to the next baseline with round(). */
.activities-section,
.activities-index,
.activity-page {
  --b: 24px;
  --section: calc(var(--b) * 2);
  --card-shape: 0.6667;
}
@media (min-width: 1024px) {
  .activities-section,
  .activities-index,
  .activity-page {
    --b: 30px;
    --section: calc(var(--b) * 3);
    --card-shape: 0.62;
  }
}

/* Home section and the /activities/ list. Source: .giving-section and .tiers. */
.activities-section,
.activities-index {
  padding-block: var(--section);
}
.activities-section {
  padding-top: calc(var(--section) - 1px);
  border-top: 1px solid var(--cn-component-header-border);
}
.activities-section h2,
.activities-index h1,
.activities-index .activity-month {
  margin: 0 0 var(--b);
}
.activities-section h2,
.activities-index .activity-month {
  line-height: calc(var(--b) * 2);
  line-height: round(up, calc(var(--cn-type-section-title-size) * 0.95), var(--b));
}
.activities-index h1 {
  line-height: calc(var(--b) * 3);
  line-height: round(up, var(--cn-type-page-title-size), var(--b));
}
.activity-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--b) * 2) 32px;
}
.activities-section .links {
  margin-top: calc(var(--b) * 2);
}
.activities-section .links a {
  min-height: 0;
  height: calc(var(--b) * 2);
  line-height: var(--b);
}

/* Card. Source: the shipped plan .card (top rule, a line above the text; the rule's pixel comes
   out of that line). The title is the only link; its ::after covers the card. */
.activity-card {
  position: relative;
  display: block;
  padding-top: calc(var(--b) - 1px);
  container-type: inline-size;
}
/* The card's picture: one box for every card, a whole number of lines tall. A card with no
   picture keeps the same space in a row of cards, so every card's text starts on one line. */
.activity-card-photo,
.activity-card:not(:has(.activity-card-photo))::before {
  display: block;
  width: 100%;
  height: calc(var(--b) * 7);
  height: round(nearest, calc(100cqi * var(--card-shape)), var(--b));
  margin-bottom: var(--b);
}
.activity-card-photo {
  object-fit: cover;
}
/* Where a centred crop would cut into someone, the card keeps the top of the photo. */
.activity-card-photo.keep-top {
  object-position: 50% 0;
}
.activity-card:not(:has(.activity-card-photo))::before {
  content: "";
}
.activity-card .activity-date,
.activity-card .activity-excerpt,
.activity-head .activity-date {
  margin: 0;
  line-height: var(--b);
  color: var(--cn-text-muted);
}
:is(.activity-card, .activity-head) .activity-date {
  font-size: var(--cn-type-metadata-size);
}
/* A card title wraps to 2 or 3 lines. At the card-title size (28 to 35 px from 768) its lines
   would need 2 baselines each, which reads as gaps, so from 768 it takes the lede size on 1. */
.activity-card :is(h2, h3) {
  --card-title: var(--cn-type-card-title-size);
  margin: 0 0 var(--b);
  font-size: var(--card-title);
  line-height: calc(var(--b) * 2);
  line-height: round(up, calc(var(--card-title) * 0.95), var(--b));
  font-weight: var(--cn-type-card-title-weight);
  text-wrap: balance;
}
.activity-card .activity-excerpt {
  font-size: var(--cn-type-body-small-size);
}
.activity-card a {
  text-decoration: none;
}
.activity-card a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.activity-card a:hover {
  text-decoration: underline;
}
.activity-card a:focus-visible {
  outline: none;
}
.activity-card:has(a:focus-visible) {
  outline: 3px solid var(--cn-focus-ring);
  outline-offset: 3px;
}

/* Month filters: one row 2 lines tall, its rule inside the row. */
.activity-filters {
  display: flex;
  gap: 32px;
  margin-bottom: var(--b);
  border-bottom: 1px solid var(--cn-component-header-border);
  overflow-x: auto;
}
.activity-filters a {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: calc(var(--b) * 2 - 1px);
  font-size: var(--cn-type-body-small-size);
  line-height: var(--b);
  text-decoration: none;
  white-space: nowrap;
}
.activity-filters a[aria-current] {
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--cn-text-default);
}
.activity-filters a:focus-visible {
  outline-offset: -3px;
}

/* One activity. Geometry and parts from constituition (origin/HEAD 8f45704), set on the baseline:
   frame and head  src/styles/components.css 24-107 (1080 frame, hairline 24 px left of it, 4 px rule
                   beside the head, here from 1 line above its first line to 1 line below its last)
   two columns     src/styles/reader.css 2-28 (contents 235 to 340, gap 32 then 64, text 420 to 504)
   contents list   src/styles/components.css 340-417 (eyebrow, dotted rules, words 32 px in)
   sticky          src/styles/components.css 343 ("Sticky 80 px from the top at 1440, 96 below")
   section heading src/styles/global.css 1420-1432 (section-title role, a section gap before, a line after)
   Picture from kantha (c521e1d): site/src/components/Photo.astro 107-108 and 131 (no margin, block
   image, cover), kit/DESIGN.md section 3 rule 14 (whole-line height, cropped a few pixels to fill). */
.activity-page {
  --activity-contents: 100%;
  --activity-text: 620px;
  --activity-gap: var(--cn-space-32);
  --activity-rail: 24px;
  --activity-indent: calc(var(--cn-component-contents-arrow-slot) + var(--cn-component-contents-item-gap));
  --row: var(--b);
}
.activity-frame {
  position: relative;
  padding-bottom: var(--section);
}
.activity-head {
  position: relative;
  margin-top: var(--b);
  padding-block: var(--b) 0;
}
.activity-head h1 {
  max-width: 806.66px;
  margin: 0;
  line-height: calc(var(--b) * 3);
  line-height: round(up, var(--cn-type-page-title-size), var(--b));
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.activity-head .back {
  display: flex;
  align-items: center;
  width: fit-content;
  height: calc(var(--b) * 2);
  margin: 0;
  font-size: var(--cn-type-back-link-size);
  font-weight: var(--cn-type-back-link-weight);
  line-height: var(--b);
}
.activity-head .back::before {
  content: "";
  width: var(--cn-component-back-link-icon, 32px);
  height: var(--cn-component-back-link-icon, 32px);
  margin-left: -6px;
  background-color: currentColor;
  mask: url("/images/icons/chevron.svg") center / 24px no-repeat;
  transform: rotate(90deg);
}
.activity-layout {
  margin-top: var(--b);
}

/* "In this activity". From 1024 a sticky list; below that a closed disclosure. */
.activity-contents {
  display: none;
}
.activity-contents .eyebrow {
  margin: 0;
  font-size: var(--cn-type-eyebrow-size);
  line-height: var(--b);
  letter-spacing: var(--cn-type-eyebrow-tracking);
  color: var(--cn-component-contents-heading);
}
.activity-layout > :not(.activity-text) ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.activity-layout > :not(.activity-text) ol li {
  border-top: 1px dotted var(--cn-component-contents-rule);
}
/* A row is one line; the rule's pixel is taken back with the link's margin. */
.activity-layout > :not(.activity-text) ol a {
  display: block;
  margin-top: -1px;
  padding-inline-start: var(--activity-indent);
  font-size: var(--cn-type-contents-link-size);
  line-height: var(--b);
  color: var(--cn-component-contents-link);
  text-decoration: none;
}
.activity-layout > :not(.activity-text) ol a:hover span {
  text-decoration: underline;
}
/* The disclosure, 3 lines tall closed; its rows 2 lines each. */
.activity-contents-small {
  max-width: var(--activity-text);
  margin-bottom: calc(var(--b) * 2);
}
.activity-page .faq-list summary {
  min-height: 0;
  padding-block: calc(var(--row) - 1px) var(--row);
  line-height: var(--b);
}
.activity-page .faq-list summary::after {
  top: calc(var(--row) - 1px + (var(--b) - 24px) / 2);
}
/* A skill has nothing to open: the closed row's rule, height and type, no chevron. The last one's
   second rule is drawn outside the box, as for the last disclosure. */
.activity-page .faq-list .faq-row {
  padding: calc(var(--row) - 1px) 40px var(--row) 0;
  border-top: 1px solid var(--cn-component-header-border);
  font-size: var(--cn-type-body-small-size);
  line-height: var(--b);
}
.activity-page .faq-list .faq-row:last-child {
  box-shadow: 0 1px 0 var(--cn-component-header-border);
}
.activity-contents-small summary {
  font-size: var(--cn-type-eyebrow-size);
  font-weight: var(--cn-type-eyebrow-weight);
  letter-spacing: var(--cn-type-eyebrow-tracking);
  text-transform: uppercase;
}
.activity-contents-small ol a {
  padding: calc(var(--b) / 2) 0;
}

/* The rail holds the contents list only; below 1024 the disclosure stands in for it. */
.activity-rail {
  display: none;
}

/* The text column: every line one baseline, every gap whole lines. */
.activity-text {
  overflow-wrap: anywhere;
}
.activity-text > * {
  max-width: var(--activity-text);
}
.activity-text :is(p, li) {
  line-height: var(--b);
}
.activity-text :is(p, ul, ol) {
  margin: 0 0 var(--b);
}
.activity-text :is(ul, ol) {
  padding-inline-start: var(--activity-indent);
}
.activity-text li > :last-child {
  margin-bottom: 0;
}
.activity-text li + li {
  margin-top: 0;
}
.activity-text h2 {
  margin: calc(var(--b) * 3) 0 var(--b);
  line-height: calc(var(--b) * 2);
  line-height: round(up, calc(var(--cn-type-section-title-size) * 0.95), var(--b));
  text-wrap: balance;
}
.activity-text > :first-child {
  margin-top: 0;
}
.activity-text .note {
  margin: 0 0 var(--b);
  font-size: var(--cn-type-metadata-size);
  color: var(--cn-text-muted);
}

/* A sub-heading inside a part. Constituition's h3 without a role of its own is its card title
   (src/styles/global.css 67-77, Newsreader 24 to 28); the nearest shipped role is the lede size
   (19.76 to 25.05), which the activity cards' titles already use. 2 lines above, none below. */
.activity-text h3 {
  margin: calc(var(--b) * 2) 0 0;
  font-size: var(--cn-type-lede-size);
  line-height: var(--b);
  line-height: round(up, calc(var(--cn-type-lede-size) * 0.95), var(--b));
  text-wrap: balance;
}
.activity-text h2 + h3,
.activity-text h2 + .suggested > h3 {
  margin-top: 0;
}
.activity-text .part:first-child > h2 {
  margin-top: 0;
}
/* A part's one-value facts: label left, value right, a dotted rule above each row and below the
   last. A row is 2 lines; each rule's pixel comes out of the padding. */
.activity-text .facts {
  margin: 0 0 var(--b);
}
.activity-text .facts div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--cn-space-16);
  padding-block: calc(var(--b) / 2 - 1px) calc(var(--b) / 2);
  border-top: 1px dotted var(--cn-component-contents-rule);
}
.activity-text .facts div:last-child {
  padding-bottom: calc(var(--b) / 2 - 1px);
  border-bottom: 1px dotted var(--cn-component-contents-rule);
}
.activity-text .facts :is(dt, dd) {
  margin: 0;
  font-size: var(--cn-type-body-small-size);
  line-height: var(--b);
}
.activity-text .facts dt {
  color: var(--cn-text-muted);
}
/* Disclosure rows: 3 lines tall below 1024, 2 from 1024, the rule's pixel inside. The last
   row's second rule is drawn outside the box, so the row keeps its height. */
.activity-page .faq-list details:last-child {
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--cn-component-header-border);
}
.activity-text .faq-answer {
  padding-bottom: 0;
}
.activity-text .faq-answer .note {
  margin-bottom: 0;
}

/* The leading picture: the featured photo only, a whole number of lines tall. */
.activity-figure {
  container-type: inline-size;
  margin: 0;
}
.activity-figure img {
  display: block;
  width: 100%;
  height: auto;
  height: round(nearest, calc(100cqi * var(--h) / var(--w)), var(--b));
  object-fit: cover;
}

/* "Download PDF" after the activity record (owner, 15 November 2026): constituition's outlined button, .cn-btn in
   src/styles/components.css 235-272 (40 px, a 1 px inset border, transparent ground, control-medium type), in the
   tokens this site already loads. Its row is 2 lines tall so the frame below stays on the baseline; the button
   sits in it. Focus: the site's ring (site.css :focus-visible), with the border dropped as constituition does. */
.activity-text .activity-actions {
  display: flex;
  align-items: center;
  min-height: calc(var(--b) * 2);
  margin: var(--b) 0 0;
}
.activity-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--cn-component-button-medium-gap);
  min-height: var(--cn-component-button-medium-height);
  padding: var(--cn-component-button-medium-padding-y) var(--cn-component-button-medium-padding-x);
  border-radius: var(--cn-component-button-radius);
  box-shadow: inset 0 0 0 var(--cn-component-button-outline-border-width) var(--cn-component-button-outline-border);
  background: transparent;
  color: var(--cn-component-button-outline-foreground);
  font-family: var(--cn-type-control-medium-family);
  font-size: var(--cn-type-control-medium-size);
  font-weight: var(--cn-type-control-medium-weight);
  line-height: var(--cn-type-control-medium-lh);
  text-decoration: none;
  white-space: nowrap;
}
.activity-download:hover {
  box-shadow: inset 0 0 0 var(--cn-component-button-outline-border-width) var(--cn-component-button-outline-hover);
  color: var(--cn-component-button-outline-hover);
}
.activity-download:focus-visible {
  box-shadow: none;
}

/* Earlier: every month, one row of 2 lines each, a dotted rule above each row and below the last. */
.activity-months {
  margin: 0;
  padding: 0;
  list-style: none;
}
.activity-months li {
  border-top: 1px dotted var(--cn-component-contents-rule);
}
.activity-months li:last-child {
  border-bottom: 1px dotted var(--cn-component-contents-rule);
}
.activity-months a {
  display: flex;
  align-items: center;
  height: calc(var(--b) * 2 - 1px);
  font-size: var(--cn-type-body-small-size);
  line-height: var(--b);
}
.activity-months li:last-child a {
  height: calc(var(--b) * 2 - 2px);
}

@media (min-width: 1024px) {
  .activity-page {
    --activity-contents: calc(235px + 105 * (100vw - 1024px) / 416);
    --activity-text: calc(420px + 84 * (100vw - 1024px) / 416);
    --row: calc(var(--b) / 2);
  }
  .activity-frame::before {
    content: "";
    position: absolute;
    inset-block: 0;
    left: calc(-1 * var(--activity-rail));
    border-left: 1px solid var(--cn-component-header-border);
  }
  .activity-head {
    margin-top: calc(var(--b) * 2);
    padding-block: var(--b);
  }
  .activity-head::before {
    content: "";
    position: absolute;
    inset-block: 0;
    left: calc(-1 * var(--activity-rail));
    border-left: var(--cn-border-rule) solid var(--cn-text-default);
  }
  .activity-layout {
    display: grid;
    grid-template-columns: var(--activity-contents) minmax(0, 1fr);
    column-gap: var(--activity-gap);
    align-items: start;
    margin-top: calc(var(--b) * 3);
  }
  /* The rail runs the height of the text, so the list stays 96 px (80 at 1440) from the top. */
  .activity-rail {
    display: block;
    align-self: stretch;
  }
  .activity-contents {
    display: block;
    position: sticky;
    top: 96px;
  }
  .activity-contents-small {
    display: none;
  }
  .activity-text > .activity-figure {
    max-width: 100%;
  }
}
@media (min-width: 1440px) {
  .activity-page {
    --activity-contents: 340px;
    --activity-text: 504px;
    --activity-gap: var(--cn-space-64);
  }
  .activity-contents {
    top: 80px;
  }
}

@media (max-width: 767.98px) {
  .activity-cards {
    grid-template-columns: 1fr;
  }
  .activity-card:not(:has(.activity-card-photo))::before {
    content: none;
  }
  .activity-filters {
    gap: 24px;
  }
}
@media (min-width: 768px) {
  .activity-card :is(h2, h3) {
    --card-title: var(--cn-type-lede-size);
  }
}
/* Titles at a fixed size per band, as on the organisation pages (site.css: --title-1, --title-2, --title-3), from
   activities-20261125.css (25 November 2026). A fluid size on a line rounded up to the baseline jumped: a card
   title was 25.13 px on 24 at 390 and 25.30 px on 48 at 412, so a wrapped title showed a blank line. Card
   titles take the sub-title's size and line (--title-3). A part's sub-heading is on one line: 19.76 px (lede at
   390) on 24 below 1024, 22.77 px (lede at 1024) on 30 from 1024, below the part's 45.7 px title. site.css leaves these parts'
   titles to this stylesheet; the blog and the fellows' stories, which share activities.css, keep theirs. */
.activities-index h1,
.activity-head h1 {
  font-size: var(--title-1);
  line-height: var(--title-1-line);
}
.activities-section h2,
.activities-index .activity-month,
.activity-text h2 {
  font-size: var(--title-2);
  line-height: var(--title-2-line);
}
.activity-card :is(h2, h3) {
  font-size: var(--title-3);
  line-height: var(--title-3-line);
}
.activity-text h3 {
  font-size: 19.76px;
  line-height: var(--b);
}
@media (min-width: 1024px) {
  .activity-text h3 {
    font-size: 22.77px;
  }
}
/* Activity cards on the grid from 768 (owner, 25 November 2026: "put them on the grid"; record
   .operator/product/swiss-grid-and-way-labels-20261125.md), appended to the activities stylesheet only (eleventy.config.js
   activitiesCss), so the blog's cards (/blog-20261122.css) do not change. Below 768 one column, as before.
   COLUMNS  Before, three equal columns with 32 px gutters, so the second and third cards started 11 to 21 px off the
            line grid (10.67 and 21.33 px at 1440). Now the pitch is a third of the frame and one gutter, rounded down to whole lines, and the gutter
            is one line: cards start at 0, 360 and 720 at 1440 (330 wide), 0, 240 and 480 at 1024 (210 wide), 0, 216
            and 432 at 768 (192 wide). The row ends up to 3 lines short of the frame's right edge.
   PICTURES The box is the card's width, whole lines, and keeps the whole-line height it had (a third of the frame less
            the old gutters, times the card shape, rounded to the nearest line); the photo fills it with object-fit:
            cover, and scripts/card-top/ still keeps the top where a face would be cut. For that the cards' container
            is the row (.activity-cards), not the card. Card tops were on the grid already: every part of a card is
            whole lines and rows are 2 lines apart. */
@media (min-width: 768px) {
  .activity-cards {
    container-type: inline-size;
    grid-template-columns: repeat(3, calc(round(down, calc((100% + var(--b)) / 3), var(--b)) - var(--b)));
    column-gap: var(--b);
  }
  .activity-cards .activity-card {
    container-type: normal;
  }
  .activity-cards .activity-card-photo,
  .activity-cards .activity-card:not(:has(.activity-card-photo))::before {
    height: round(nearest, calc((100cqi - 64px) / 3 * var(--card-shape)), var(--b));
  }
}
.photo-the-habitats-trust-launches-banasura-chilappan-conservation-project{--w:1600;--h:1066}
.photo-banasura-chilappan-occupancy-survey-at-chembra-peak-camel-hump-mountains{--w:1280;--h:960}
.photo-expert-session-at-hortus-sahithya-prakrthi-padhana-camp-on-western-ghats-ecology-and-introduction-to-birds-and-birding{--w:1600;--h:1200}
.photo-banasura-chilappan-survey-at-kurichyarmala-mountains{--w:1200;--h:1600}
.photo-banasura-chilappan-occupancy-survey-at-banasura-mountains{--w:1280;--h:960}
.photo-idukki-weather-monitoring-system{--w:1600;--h:1205}
.photo-collecting-complaint-automated-raingauge-from-lakkidi-and-distribution-of-soil-thermometer{--w:1600;--h:1106}
.activity-card:not(:has(.activity-card-photo))::before{background:var(--cn-surface-summary)}

