/* ==================================================================
   Wallyford Community Council
   Heritage palette: coal and slate, brass, cream paper.
   ================================================================== */

/* Fonts, served from this site (assets/fonts) rather than from Google.
   Fraunces and Source Sans 3 are both free to use and share under the
   SIL Open Font License. Each file holds every weight we use. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/source-sans-3-italic-latin.woff2") format("woff2");
}

:root {
  --coal: #1b1e21;
  --slate: #2b3036;
  --slate-2: #3a4148;
  --brass: #c4923f;
  --brass-light: #e0b768;
  --brass-dark: #7d5517;
  --cream: #f6f1e6;
  --paper: #fffdf8;
  --ink: #1d2124;
  --muted: #555c62;
  --rule: #e3dac8;
  --emergency: #a3261b;
  --emergency-bg: #fbeae6;

  --status-new: #4b5563;
  --status-progress: #1f5f8b;
  --status-waiting: #8a5a00;
  --status-done: #2f6b3a;
  --status-closed: #6b7075;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --radius: 6px;
  --shadow: 0 1px 2px rgba(27, 30, 33, .06), 0 4px 16px rgba(27, 30, 33, .06);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brass-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--coal); outline-offset: 2px; }
.site-header :focus-visible,
.hero :focus-visible,
.page-head :focus-visible,
.section-dark :focus-visible,
.site-footer :focus-visible,
.csw-panel :focus-visible { outline-color: var(--brass-light); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--coal);
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p, ul, ol { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.small { font-size: .92rem; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-dark);
  margin: 0 0 .6rem;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--brass-light); color: var(--coal); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* ---------- Strata band (coal-seam layers) ---------- */
.strata {
  height: 10px;
  background: linear-gradient(to bottom,
    #6b5a43 0 2px, #2b2723 2px 4px, #8e7a5c 4px 5px, #1b1e21 5px 8px, #c4923f 8px 10px);
}

/* ---------- Header ---------- */
.site-header { background: var(--coal); color: var(--cream); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: .8rem; padding-bottom: .8rem;
}
.brand { display: flex; align-items: center; gap: .75rem; color: var(--cream); text-decoration: none; }
.brand .logo { color: var(--brass-light); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .01em; }
.brand-sub { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-light); margin-top: .2rem; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .4rem; }
.site-nav a {
  display: block; padding: .5rem .7rem; border-radius: var(--radius);
  color: var(--cream); text-decoration: none; font-weight: 600; font-size: 1rem;
}
.site-nav a:hover { background: var(--slate); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--brass); }
.site-nav a.nav-report { background: var(--brass); color: var(--coal); }
.site-nav a.nav-report:hover { background: var(--brass-light); }
.site-nav a.nav-report[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--coal); }

.nav-toggle {
  display: none; align-items: center; gap: .55rem;
  background: transparent; color: var(--cream); border: 1px solid var(--slate-2);
  border-radius: var(--radius); padding: .5rem .8rem; font: inherit; font-weight: 600; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 900px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding-bottom: .5rem; }
  .site-nav a { padding: .75rem .6rem; border-top: 1px solid var(--slate); border-radius: 0; }
  .site-nav a.nav-report { border-radius: var(--radius); margin-top: .5rem; text-align: center; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--brass); }
  .brand-name { font-size: 1.3rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.2rem; border-radius: var(--radius); border: 2px solid transparent;
  font-weight: 700; font-size: 1.02rem; text-decoration: none; line-height: 1.2; cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--brass); color: var(--coal); }
.btn-primary:hover { background: var(--brass-light); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-dark { background: var(--coal); color: var(--cream); }
.btn-dark:hover { background: var(--slate); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Home hero ---------- */
.hero {
  color: var(--cream);
  background:
    radial-gradient(ellipse at 85% 30%, rgba(196, 146, 63, .16), transparent 60%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0 2px, transparent 2px 18px),
    var(--coal);
}
.hero-grid { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; align-items: center; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1fr minmax(0, 560px); gap: 3rem; padding-top: 4rem; padding-bottom: 4rem; }
}
.hero h1 { color: var(--paper); margin-bottom: .4em; }
.hero .lede { font-size: clamp(1.15rem, 2.2vw, 1.35rem); color: #efe7d6; max-width: 40ch; }
.hero .eyebrow { color: var(--brass-light); }
.hero-figure img {
  width: 100%; max-width: 720px; border-radius: var(--radius);
  border: 1px solid rgba(224, 183, 104, .35); box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.hero-figure figcaption { font-size: .85rem; color: #bfb6a3; margin-top: .55rem; }

/* ---------- Interior page header ---------- */
.page-head { background: var(--slate); color: var(--cream); }
.page-head .wrap { padding-top: 2.6rem; padding-bottom: 2.4rem; }
.page-head h1 { color: var(--paper); margin-bottom: .3em; }
.page-head .lede { font-size: 1.2rem; color: #e7dfcd; max-width: 60ch; margin: 0; }
.page-head .eyebrow { color: var(--brass-light); }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
/* Two plain sections in a row share one gap */
.section:not(.section-paper):not(.section-dark) + .section:not(.section-paper):not(.section-dark) { padding-top: 0; }
.section-paper { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-dark { background: var(--coal); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--paper); }
.section-dark a { color: var(--brass-light); }
.section-dark a.btn-primary { color: var(--coal); }
.section-dark a.btn-ghost { color: var(--cream); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }
.section-dark .section-head p { color: #d8cfbd; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose > :first-child, .prose .eyebrow + h2, .prose .eyebrow + h3 { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }

/* On-page contents */
.jump {
  display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0;
}
.jump a {
  display: inline-block; padding: .4rem .8rem; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper); text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 600;
}
.jump a:hover { border-color: var(--brass); }
.jump-bar {
  background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--rule); padding: .7rem 0;
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px);
}
.jump-bar .jump {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent);
  padding-right: 2rem;
}
.jump-bar .jump::-webkit-scrollbar { display: none; }
.jump-bar .jump li { flex: none; }
@media (min-width: 1000px) {
  .jump-bar .jump { -webkit-mask-image: none; mask-image: none; padding-right: 0; }
}

/* ---------- Grids and cards ---------- */
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--brass);
  border-radius: var(--radius); padding: 1.35rem 1.35rem 1.2rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .35em; }
.card, .contact-card, .group { overflow-wrap: anywhere; }
/* A long email address in a narrow card: shrink it a little so it breaks
   at the <wbr> points between words, not mid-word. */
.email-long { font-size: .95rem; }
.card p:last-child { margin-bottom: 0; }
.card .card-foot { margin-top: auto; padding-top: .6rem; }
.card-link { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(27,30,33,.08), 0 10px 24px rgba(27,30,33,.1); }
.more { color: var(--brass-dark); font-weight: 700; }
a.more { text-decoration: none; }
a.more:hover { text-decoration: underline; }
.card-kicker { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.card-big { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1.2; margin-bottom: .3rem; color: var(--coal); }

/* Split layout: text + image */
.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1.1fr .9fr; gap: 3rem; }
  .split-flip > :first-child { order: 2; }
}

figure { margin: 0; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.figure figcaption { font-size: .92rem; color: var(--muted); margin-top: .5rem; }
.figure-carving { max-width: 340px; margin-top: 1.5rem; }

.photo-needed {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, rgba(27,30,33,.05) 0 12px, transparent 12px 24px),
    var(--paper);
  border: 2px dashed var(--rule); display: grid; place-items: center; text-align: center;
  color: var(--muted); padding: 1rem; font-size: .95rem;
}

/* Callouts */
.callout {
  border-left: 5px solid var(--brass); background: var(--paper); padding: 1.1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout-emergency { border-left-color: var(--emergency); background: var(--emergency-bg); }
.callout-emergency strong { color: var(--emergency); }

/* Facts list (dates) */
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 3px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 1rem 1.4rem; margin: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: .45em; width: 13px; height: 13px;
  background: var(--brass); border: 3px solid var(--cream); border-radius: 50%;
}
.timeline .when { font-family: var(--serif); font-weight: 600; color: var(--coal); display: block; }

/* ---------- Report it ---------- */
.report-block { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.report-block:first-of-type { border-top: 0; }
.report-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.report-icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--coal); color: var(--brass-light);
}
.report-icon svg { width: 26px; height: 26px; }
.contact-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem;
}
.contact-card .label { font-weight: 700; }
.contact-card .when-to { color: var(--muted); font-size: .98rem; }
.phone {
  font-family: var(--serif); font-weight: 700; font-size: 1.7rem; line-height: 1.2;
  color: var(--coal); text-decoration: none; letter-spacing: .01em;
}
.phone:hover { text-decoration: underline; }
.contact-card.is-emergency { border-color: #e4b3aa; background: var(--emergency-bg); }
.contact-card.is-emergency .phone { color: var(--emergency); }
.contact-card .btn { align-self: flex-start; margin-top: .5rem; }

/* ---------- People ---------- */
.people { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.person { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.avatar {
  width: 104px; height: 104px; border-radius: 50%; margin: 0 auto .9rem; overflow: hidden;
  background: var(--slate); color: var(--brass-light); display: grid; place-items: center;
  font-family: var(--serif); font-size: 2rem; font-weight: 600; border: 3px solid var(--brass);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.2rem; margin-bottom: .1rem; }
.person .role { color: var(--brass-dark); font-weight: 700; font-size: .95rem; margin-bottom: .6rem; }
.person p { font-size: 1rem; margin-bottom: 0; }
/* A councillor's own words: left-aligned, so longer blurbs are easy to read */
.person .blurb { text-align: left; }
.person .blurb p + p { margin-top: .6rem; }
.person.is-vacant { border-style: dashed; background: transparent; }
.person.is-vacant .avatar { background: transparent; color: var(--brass-dark); border-style: dashed; }

/* ---------- Groups ---------- */
.group-list { display: grid; gap: 1rem; }
.group { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.group h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.group.is-placeholder { border-style: dashed; background: transparent; }

/* ---------- You said, we did ---------- */
.ysd-how { counter-reset: step; }
.ysd-how .card { border-top-color: var(--slate); }
.ysd-how .step-num {
  font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--brass-dark); line-height: 1; margin-bottom: .4rem;
}

.ysd-toolbar {
  display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; margin-bottom: 1.5rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem;
}
.ysd-toolbar label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .25rem; }
.ysd-toolbar input, .ysd-toolbar select {
  font: inherit; font-size: 1rem; padding: .55rem .7rem; border: 1px solid #cfc5b1; border-radius: var(--radius);
  background: #fff; color: var(--ink); min-width: 0;
}
.ysd-toolbar .field-search { flex: 1 1 240px; }
.ysd-toolbar .field-search input { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font: inherit; font-size: .95rem; font-weight: 600; padding: .5rem .85rem; border-radius: 999px;
  border: 1px solid #cfc5b1; background: #fff; color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--coal); color: var(--cream); border-color: var(--coal); }

.ysd-summary { color: var(--muted); margin-bottom: 1rem; }
.ysd-list { display: grid; gap: 2.75rem; }
/* Completed / Ongoing / Closed sections on the You said, we did page */
.ysd-group-title { display: flex; align-items: center; gap: .6rem; font-size: 1.5rem; margin-bottom: .25rem; }
.ysd-group-title::before { content: ""; flex: none; width: .8rem; height: .8rem; border-radius: 50%; background: var(--status-progress); }
.ysd-group-completed .ysd-group-title::before { background: var(--status-done); }
.ysd-group-closed .ysd-group-title::before { background: var(--status-closed); }
.ysd-group-count {
  font-family: var(--sans); font-size: .85rem; font-weight: 700; line-height: 1.5;
  padding: .05rem .6rem; border-radius: 999px; background: var(--rule); color: var(--ink);
}
.ysd-group-intro { color: var(--muted); margin-bottom: 1rem; }
.ysd-group-items { display: grid; gap: 1rem; }
.ysd-item {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.ysd-meta {
  display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center;
  padding: .7rem 1.2rem; border-bottom: 1px solid var(--rule); font-size: .92rem; color: var(--muted);
}
.ysd-meta .topic { font-weight: 700; color: var(--ink); }
.ysd-body { display: grid; }
@media (min-width: 760px) { .ysd-body { grid-template-columns: 1fr 1fr; } }
.ysd-col { padding: .9rem 1.2rem 1rem; }
.ysd-col + .ysd-col { border-top: 1px dashed var(--rule); }
@media (min-width: 760px) { .ysd-col + .ysd-col { border-top: 0; border-left: 1px dashed var(--rule); } }
.ysd-col h3, .ysd-col h4 {
  font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-dark); margin-bottom: .4rem;
}
.ysd-said { font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; color: var(--coal); margin: 0; }
.ysd-did { margin: 0; white-space: pre-line; }
.ysd-updated { margin-left: auto; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.ysd-help {
  margin: .7rem 0 0; padding: .55rem .75rem; font-size: .97rem; line-height: 1.5;
  background: var(--cream); border-left: 3px solid var(--brass); border-radius: 0 4px 4px 0;
}

.status {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .85rem;
  padding: .2rem .65rem; border-radius: 999px; color: #fff; background: var(--status-closed); white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.status-new { background: var(--status-new); }
.status-in-progress { background: var(--status-progress); }
.status-waiting-on-others { background: #fbe9bd; color: var(--status-waiting); box-shadow: inset 0 0 0 1px #e3c674; }
.status-done, .status-completed { background: var(--status-done); }
.status-closed { background: var(--status-closed); }

.notice {
  border: 1px solid var(--rule); border-left: 5px solid var(--status-new); background: #eef3f8;
  padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1.5rem;
}
.notice p:last-child { margin-bottom: 0; }
.notice-warn { border-left-color: var(--status-waiting); background: #fbf1e6; }

.ysd-empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }

/* Compact list on home page */
.ysd-mini { display: grid; gap: 1rem; }
@media (min-width: 900px) { .ysd-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ysd-mini .ysd-item { display: flex; flex-direction: column; }
.ysd-mini .ysd-body { grid-template-columns: 1fr; flex: 1; }
.ysd-mini .ysd-col + .ysd-col { border-left: 0; border-top: 1px dashed var(--rule); }
.ysd-mini .ysd-said { font-size: 1.05rem; }

/* ---------- Home: cards and Coming up ---------- */
@media (min-width: 640px) { .home-cards .card-wide { grid-column: 1 / -1; } }
@media (min-width: 960px) { .home-cards .card-wide { grid-column: span 2; } }
.card h2.card-kicker { font-family: var(--sans); }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.event-inner {
  display: flex; gap: .9rem; align-items: center; text-decoration: none; color: inherit;
  padding: .45rem .5rem; margin: 0 -.5rem; border-radius: var(--radius);
}
a.event-inner:hover { background: var(--cream); }
a.event-inner:hover .event-title { text-decoration: underline; }
.event-date {
  flex: none; width: 3.6rem; text-align: center; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--rule); background: #fff; line-height: 1.1;
}
.event-day { display: block; background: var(--coal); color: var(--brass-light); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .2rem 0; }
.event-num { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--coal); padding-top: .15rem; }
.event-mon { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding-bottom: .25rem; }
.event-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.event-title { font-weight: 700; color: var(--ink); line-height: 1.3; }
.event-detail { font-size: .95rem; color: var(--muted); line-height: 1.4; }
.event-note { font-size: .92rem; color: var(--ink); line-height: 1.45; margin-top: .25rem; padding-left: .55rem; border-left: 2px solid var(--brass); }
.event-cal {
  font-size: .82rem; font-weight: 600; color: var(--brass-dark); text-decoration: none;
  margin-left: 4.5rem; margin-top: -.15rem; margin-bottom: .25rem; display: inline-block;
}
.event-cal:hover { text-decoration: underline; }
.next-note { font-weight: 600; border-left: 4px solid var(--brass); padding-left: .75rem; }
.events-fallback { padding-left: 1.1em; margin: 0; }
.js .events-fallback { display: none; }
.events-message { color: var(--muted); margin: 0; }

/* ---------- What's on page ---------- */
@media (min-width: 860px) { .whats-on-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.whats-on { display: grid; gap: 2rem; }
.whats-on .events-fallback { padding-left: 1.1em; }
.whats-on-heading {
  font-size: 1.35rem; margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 2px solid var(--brass);
}
.whats-on .event-inner { padding: .6rem .5rem; }
.whats-on .events { gap: .25rem; }
.whats-on-layout > .card { position: sticky; top: 1.5rem; }

/* ---------- Show more (details) ---------- */
details.more { margin: 1rem 0 0; border-top: 1px solid var(--rule); }
details.more > summary {
  cursor: pointer; list-style: none; padding: .8rem 0; font-weight: 700; color: var(--brass-dark);
  display: flex; align-items: center; gap: .5rem;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before {
  content: ""; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; margin-right: .2rem;
}
details.more[open] > summary::before { transform: rotate(45deg); }
details.more > summary:hover { text-decoration: underline; }

/* ---------- History page: compact pictures and embedded videos ---------- */
.video-list { margin-bottom: 1rem; }
.video-item:first-child { margin-top: 0; }
.site-video {
  width: 100%; max-width: 100%; border-radius: var(--radius); background: var(--coal);
  box-shadow: var(--shadow); margin: .25rem 0 .85rem; display: block;
}
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; margin-bottom: 1rem; }
.card-img-4x3 { aspect-ratio: 4 / 3; object-position: top; }
.card-photo { aspect-ratio: 16 / 9; margin-bottom: 1rem; }
.card-title { font-size: 1.45rem; }
.figure-short { max-height: 340px; object-fit: cover; }
@media (max-width: 640px) {
  .section { padding: 2.5rem 0; }
  .section-paper + .section, .section-dark + .section { padding-top: 2.5rem; }
  .figure img { max-height: 300px; object-fit: cover; }
}

/* ---------- Report it: steps ---------- */
.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin-bottom: .5rem; }
.steps li:last-child { margin-bottom: 0; }

/* ---------- Community Speedwatch ---------- */
.csw-filter { margin-bottom: 1rem; }

/* Instrument panel with odometer counters */
.csw-panel {
  color: var(--cream); border-radius: 10px; padding: 1.4rem 1.1rem 1.2rem;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(196, 146, 63, .16), transparent 62%),
    linear-gradient(180deg, #262b30, var(--coal));
  border: 1px solid var(--slate-2);
  box-shadow: 0 12px 32px rgba(27, 30, 33, .22), inset 0 1px 0 rgba(255, 255, 255, .06);
}
@media (min-width: 720px) { .csw-panel { padding: 2rem 2.25rem 1.6rem; } }
.csw-scope {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-light); margin-bottom: 1.25rem;
}
.csw-counters { display: grid; gap: 1.6rem; }
@media (min-width: 760px) { .csw-counters { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.csw-counter-label { font-weight: 700; font-size: 1.05rem; color: var(--paper); margin-bottom: .55rem; }
.csw-counter-sub { font-size: .95rem; color: #cfc6b4; margin: .55rem 0 0; }

.odometer {
  display: inline-flex; gap: .08em; padding: .1em; border-radius: 8px; max-width: 100%;
  background: #0d0f11; border: 2px solid var(--slate-2); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
  font-family: var(--sans); font-weight: 700; font-size: clamp(2.5rem, 11vw, 4.25rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.csw-counter-over .odometer { border-color: var(--brass); }
.odo-cell {
  position: relative; display: block; width: .68em; height: 1.2em; overflow: hidden; border-radius: 4px;
  color: var(--paper);
  background: linear-gradient(180deg, #121417 0%, #2e343a 24%, #363d44 50%, #2e343a 76%, #121417 100%);
}
/* Shading so each digit looks like a turning drum */
.odo-cell::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .4), transparent 28%, transparent 72%, rgba(0, 0, 0, .4));
}
.odo-strip { display: block; will-change: transform; }
.odo-strip > span { display: block; height: 1.2em; line-height: 1.2em; text-align: center; }
.odo-cell.is-lead { color: rgba(255, 253, 248, .26); }
.csw-counter-over .odo-cell { color: var(--brass-light); }
.csw-counter-over .odo-cell.is-lead { color: rgba(224, 183, 104, .3); }

.csw-meter { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.csw-meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .55rem; }
.csw-meter-label { font-weight: 700; color: var(--paper); }
.csw-meter-value { font-weight: 700; font-size: 2rem; line-height: 1; color: var(--paper); }
.csw-meter-track { display: block; height: 12px; border-radius: 999px; background: rgba(224, 183, 104, .18); overflow: hidden; }
.csw-meter-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brass-light); }
.csw-thanks { margin: .6rem 0 0; color: #cfc6b4; font-size: .98rem; }
.csw-latest { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .95rem; color: #bfb6a3; }

/* Waiting for results: the digits keep turning */
.odometer.is-spinning .odo-strip { animation: odo-spin 2s linear infinite; }
/* 10 of the strip's 11 cells: it ends on the second 0, which looks the same as the first, so the loop is seamless */
@keyframes odo-spin { from { transform: translateY(0); } to { transform: translateY(-90.9091%); } }
@media (prefers-reduced-motion: reduce) { .odometer.is-spinning .odo-strip { animation: none; } }
.csw-waiting-text {
  margin: 1.5rem 0 0; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .1); color: #cfc6b4;
}

/* Recent sessions table */
.csw-recent { margin-top: 2.5rem; }
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
}
.csw-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.csw-table th, .csw-table td { padding: .7rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.csw-table thead th {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: var(--cream); white-space: nowrap;
}
.csw-table tbody tr:last-child td { border-bottom: 0; }
.csw-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.csw-date { white-space: nowrap; }
.csw-where { display: block; font-weight: 600; }
.csw-detail, .csw-note { display: block; font-size: .9rem; color: var(--muted); }
.csw-note { font-style: italic; }
.csw-more { margin-top: 1rem; }
.csw-when { display: none; }
@media (max-width: 560px) {
  .csw-table th, .csw-table td { padding: .6rem .6rem; font-size: .95rem; }
  .csw-table thead th { font-size: .7rem; letter-spacing: .06em; white-space: normal; }
  .csw-table .csw-col-date { display: none; }
  .csw-when { display: inline; }
}

.csw-how-title { margin-top: 2.5rem; }

/* The four areas */
.csw-areas {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.csw-area {
  background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--slate);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
}
.csw-area h3 { margin: 0; }
.status-up-and-running { background: var(--status-done); }
.status-getting-set-up { background: var(--status-progress); }

/* ---------- Names on the coal hutches (History page) ---------- */
.miners-names { margin-top: 3rem; }
.miners-names > p { max-width: 68ch; }
.hutch-photos { margin: 1.5rem 0 2rem; }
.miners-tables { align-items: start; }
.miners-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.miners-table caption {
  caption-side: top; text-align: left; padding: .8rem 1rem; font-family: var(--serif); font-size: 1.15rem;
  font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--rule);
}
.miners-table th, .miners-table td { padding: .45rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.miners-table thead th {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: var(--cream); white-space: nowrap;
}
.miners-table tbody tr:last-child td { border-bottom: 0; }
.miners-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.miners-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.miners-note { margin-top: 1rem; font-size: .92rem; color: var(--muted); }
@media (max-width: 560px) {
  .miners-table th, .miners-table td { padding: .45rem .6rem; font-size: .95rem; }
}

.timeline li ul { margin: .4rem 0 0; padding-left: 1.2em; list-style: disc; }
.timeline li li { padding: 0; margin-bottom: .2rem; }
.timeline li li::before { content: none; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  background: var(--coal); color: var(--cream); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: .6rem .9rem; border-radius: 999px; border: 1px solid var(--brass);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.to-top::before { content: "\2191  "; color: var(--brass-light); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--slate); }

/* ---------- Review notes (draft only) ---------- */
.review {
  display: inline-block; font-family: var(--sans); font-size: .85rem; line-height: 1.4; font-weight: 600;
  color: #5a2a6e; background: #f6ecfa; border: 1px dashed #a26bbb; border-radius: 4px;
  padding: .15rem .45rem; margin: .1rem 0; vertical-align: middle; text-transform: none; letter-spacing: 0;
}
.review-label { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; margin-right: .3rem; color: #7d3f99; }
.review-todo { display: block; padding: .5rem .7rem; margin: .5rem 0; }
.section-dark .review, .site-footer .review, .page-head .review, .hero .review { background: #3a2d42; color: #f2e3fa; border-color: #a26bbb; }
.section-dark .review-label, .site-footer .review-label, .page-head .review-label, .hero .review-label { color: #dcb6ee; }

/* ---------- Footer ---------- */
.site-footer { background: var(--coal); color: #d9d1bf; margin-top: 0; font-size: 1rem; }
.site-footer a { color: var(--brass-light); }
.footer-grid { display: grid; gap: 1.75rem; padding-top: 2.75rem; padding-bottom: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--paper); margin-bottom: .5rem; }
.footer-base { border-top: 1px solid var(--slate-2); padding-top: 1rem; padding-bottom: 1.5rem; font-size: .85rem; color: #a9a291; }
.footer-base p { margin: 0; }
.footer-base p + p { margin-top: .4rem; }
.footer-base .site-credit { color: #d9d1bf; }
.footer-base .site-credit strong { font-weight: 600; color: var(--cream); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .jump-bar, .ysd-toolbar, .to-top { display: none !important; }
  body { background: #fff; }
}
