/* ── Community Board ───────────────────────────────────────────────
   Builds on landing.css (header, footer, tokens). Same v5 ethos: white page,
   green for information and actions, square corners, no shadows, one font.
   ────────────────────────────────────────────────────────────────────────── */

/* The card dialog sits outside .cil, so it needs the same tokens */
.cil, .cil-dialog {
  --cil-green: var(--lp-info, #1E5B45);
  --cil-green-tint: var(--lp-navy-tint, #E7F0EB);
  --cil-ink: var(--lp-ink, #20272C);
  --cil-muted: var(--lp-muted, #62676A);
  --cil-rule: var(--lp-rule, #D8D2C7);
  --cil-column: #F7F4EE;
}
.cil { padding: 2rem 0 3rem; }

.cil-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.cil :focus-visible,
.cil-dialog :focus-visible {
  outline: 3px solid var(--cil-green, #1E5B45);
  outline-offset: 2px;
}

/* ── Introduction: white callout with a green top line ── */
.cil-intro {
  position: relative;
  border-top: 3px solid var(--cil-green);
  padding: 1.25rem 0 0.5rem;
  margin-bottom: 1.75rem;
  max-width: 56rem;
}
.cil-intro h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  padding-right: 2rem;
}
.cil-intro p { margin: 0 0 0.75rem; }
.cil-intro-links {
  list-style: none; margin: 0 0 0.5rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem;
}
.cil-intro-links a { color: var(--cil-green); font-weight: 700; }
.cil-intro-dismiss {
  font: inherit; font-size: 0.9rem;
  background: none; border: none; padding: 0.5rem 0; min-height: 44px;
  color: var(--cil-muted); text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.cil-intro-restore { margin: 0 0 1rem; }

.cil-linkbutton {
  font: inherit; font-size: 0.95rem;
  background: none; border: none; padding: 0.5rem 0; min-height: 44px;
  color: var(--cil-green); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}

/* ── Filters ── */
.cil-filters { margin-bottom: 1.25rem; }
.cil-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.cil-chip {
  font: inherit; font-size: 0.92rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.4rem 0.9rem;
  background: #fff; color: var(--cil-ink);
  border: 1.5px solid var(--cil-rule); border-radius: 2px;
  cursor: pointer;
}
.cil-chip:hover { border-color: var(--cil-ink); }
.cil-chip[aria-pressed="true"] {
  border-color: var(--cil-green);
  background: var(--cil-green-tint);
  font-weight: 700;
}
.cil-filter-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem;
}
.cil-field { display: grid; gap: 0.25rem; font-size: 0.88rem; font-weight: 700; }
.cil-field select,
.cil-field input {
  font: inherit; font-size: 0.95rem; font-weight: 400;
  min-height: 44px; padding: 0.4rem 0.7rem;
  border: 1.5px solid #9aa3a8; border-radius: 2px;
  background: #fff; color: var(--cil-ink);
}
.cil-field--search { flex: 1 1 16rem; }
.cil-field--search input { width: 100%; }
.cil-result-count { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--cil-muted); }

/* ── Association marker: colour dot, always with the name ── */
.cil-dot {
  display: inline-block; flex-shrink: 0;
  width: 0.7rem; height: 0.7rem; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.cil-assoc { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; }

/* ── Board ── */
.cil-board-wrap { margin-bottom: 2.5rem; }
.cil-tabs { display: none; }
.cil-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 1fr);
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  overscroll-behavior-x: contain;
}
.cil-column {
  background: var(--cil-column);
  border-top: 3px solid var(--cil-rule);
  padding: 0.75rem;
  min-width: 0;
}
.cil-column:nth-child(even) { background: #F3EFE7; }
.cil-column-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.cil-column-title { font-size: 1rem; line-height: 1.3; margin: 0; }
.cil-count {
  font-size: 0.85rem; font-weight: 700; color: var(--cil-muted);
  font-variant-numeric: tabular-nums;
}
.cil-column-body { display: grid; gap: 0.6rem; }

/* "Not progressed": collapsed by default, after Delivered */
.cil-column--collapsed { background: transparent; border-top-style: dashed; }
.cil-column--collapsed > summary {
  list-style: none; cursor: pointer; min-height: 44px; align-items: center; margin-bottom: 0;
}
.cil-column--collapsed > summary::-webkit-details-marker { display: none; }
.cil-column--collapsed > summary .cil-column-title::after { content: " ▸"; color: var(--cil-muted); }
.cil-column--collapsed[open] > summary { margin-bottom: 0.75rem; }
.cil-column--collapsed[open] > summary .cil-column-title::after { content: " ▾"; }

/* ── Card: white, lead colour as a thin left line ── */
.cil-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--cil-rule);
  border-left: 4px solid var(--cil-lead, var(--cil-rule));
  padding: 0.7rem 0.8rem 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
}
.cil-card:hover { border-color: var(--cil-ink); border-left-color: var(--cil-lead, var(--cil-ink)); }
.cil-card-lead { font-size: 0.85rem; }
.cil-card-title { font-size: 1rem; line-height: 1.3; margin: 0.35rem 0 0.3rem; }
.cil-card-open {
  font: inherit; font-weight: 700; text-align: left;
  background: none; border: none; padding: 0; color: var(--cil-ink);
  cursor: pointer; overflow-wrap: anywhere;
}
/* The whole card is the click target; the button keeps it keyboard-reachable */
.cil-card-open::after { content: ""; position: absolute; inset: 0; }
.cil-card-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.cil-card-meta, .cil-card-updated { margin: 0; color: var(--cil-muted); font-size: 0.85rem; }
.cil-card-partners { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.45rem 0 0.35rem; }
.cil-partner {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 400;
  border: 1px solid var(--cil-rule); padding: 0.1rem 0.45rem; border-radius: 2px;
  background: #fff;
}
.cil-partner .cil-dot { width: 0.55rem; height: 0.55rem; }

.cil-empty { margin: 0; color: var(--cil-muted); font-size: 0.88rem; font-style: italic; }
.cil-state { color: var(--cil-muted); }
.cil-state--block { border-top: 3px solid var(--cil-green); padding: 1rem 0; max-width: 40rem; }

/* ── Phones: status tabs, one column at a time ── */
@media (max-width: 720px) {
  .cil { padding-top: 1.25rem; }
  .cil-tabs {
    display: flex; gap: 0.4rem;
    overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: 0.75rem;
    scrollbar-width: thin;
  }
  .cil-tab {
    font: inherit; font-size: 0.9rem; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 0.45rem;
    min-height: 44px; padding: 0.4rem 0.8rem;
    background: #fff; color: var(--cil-ink);
    border: 1.5px solid var(--cil-rule); border-radius: 2px;
    cursor: pointer;
  }
  .cil-tab[aria-selected="true"] { border-color: var(--cil-green); background: var(--cil-green-tint); font-weight: 700; }
  .cil-board { display: block; overflow: visible; }
  .cil-column[hidden] { display: none; }
  .cil-column--collapsed > summary { pointer-events: none; }
  .cil-column--collapsed > summary .cil-column-title::after { content: none; }
  .cil-filter-row { display: grid; grid-template-columns: 1fr 1fr; }
  .cil-field--search { grid-column: 1 / -1; }
}

/* ── Contacts ── */
.cil-section-title {
  font-size: 1.15rem; font-weight: 700;
  border-bottom: 1px solid var(--cil-ink);
  padding-bottom: 0.45rem; margin: 0 0 1rem;
}
.cil-contacts { margin-bottom: 2rem; }
.cil-contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; }
@media (max-width: 720px) { .cil-contacts-grid { grid-template-columns: 1fr; } }
.cil-subtitle { font-size: 1rem; margin: 0 0 0.6rem; }
.cil-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.cil-contact-group .cil-contact-list { margin-top: 0.35rem; padding-left: 1.15rem; gap: 0.35rem; }
.cil-contact { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.95rem; }
.cil-contact a { color: var(--cil-green); overflow-wrap: anywhere; }
.cil-contact-who { font-weight: 700; }
.cil-contact-group .cil-contact-who { font-weight: 400; }

.cil-neutral {
  margin: 0; padding-top: 1rem; border-top: 1px solid var(--cil-rule);
  font-size: 0.9rem; color: var(--cil-muted);
}

/* ── Card detail dialog ── */
.cil-dialog {
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0; border: none; border-top: 3px solid var(--lp-info, #1E5B45);
  border-radius: 0; background: #fff; color: var(--lp-ink, #20272C);
  font-family: var(--lp-text, sans-serif);
}
.cil-dialog::backdrop { background: rgba(32, 39, 44, 0.55); }
.cil-dialog-inner { position: relative; padding: 1.5rem 1.5rem 1.75rem; }
.cil-dialog-close {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 44px; height: 44px;
  font: inherit; font-size: 1.6rem; line-height: 1;
  background: none; border: none; color: var(--lp-ink, #20272C); cursor: pointer;
}
.cil-dialog-title { font-size: 1.35rem; line-height: 1.25; margin: 0.5rem 2.5rem 0.75rem 0; overflow-wrap: anywhere; }
.cil-dialog-summary { margin: 0 0 1rem; white-space: pre-line; overflow-wrap: anywhere; }
.cil-detail { margin: 0 0 1.25rem; border-top: 1px solid var(--lp-rule, #D8D2C7); }
.cil-detail-row {
  display: grid; grid-template-columns: 9rem 1fr; gap: 0.75rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--lp-rule, #D8D2C7);
  font-size: 0.95rem;
}
.cil-detail-row dt { font-weight: 700; }
.cil-detail-row dd { margin: 0; overflow-wrap: anywhere; }
.cil-detail-row a, .cil-detail-contacts a { color: var(--lp-info, #1E5B45); }
.cil-detail-contacts { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
@media (max-width: 520px) { .cil-detail-row { grid-template-columns: 1fr; gap: 0.1rem; } }

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

/* ── Association sign-in and editor (/community-board/edit/) ── */
.cil-editor h1 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); line-height: 1.2; margin: 0 0 0.75rem; }
.cil-login { max-width: 30rem; border-top: 3px solid var(--cil-green); padding-top: 1.25rem; }
.cil-login-help { font-size: 0.95rem; }
.cil-login-help a { color: var(--cil-green); font-weight: 700; }

.cil-form-field { display: grid; gap: 0.3rem; margin: 0 0 1rem; min-width: 0; }
.cil-form-field > label, .cil-form-field > legend { font-weight: 700; font-size: 0.95rem; }
.cil-form-field input,
.cil-form-field select,
.cil-form-field textarea,
.cil-ed-status select {
  font: inherit; font-size: 1rem;
  min-height: 44px; padding: 0.45rem 0.7rem;
  border: 1.5px solid #9aa3a8; border-radius: 2px;
  background: #fff; color: var(--cil-ink);
  width: 100%;
}
.cil-form-field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.cil-form-field [aria-invalid="true"] { border-color: var(--lp-urgent, #A6403B); }
.cil-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .cil-form-row { grid-template-columns: 1fr; } }
.cil-hint { margin: 0; font-size: 0.85rem; color: var(--cil-muted); }
.cil-field-error { margin: 0; font-size: 0.88rem; font-weight: 700; color: var(--lp-urgent, #A6403B); }
.cil-form-error {
  margin: 0 0 1rem; padding: 0.6rem 0.8rem;
  border-left: 4px solid var(--lp-urgent, #A6403B); background: var(--lp-urgent-bg, #f0e4e3);
  font-weight: 700;
}
.cil .cil-submit { min-height: 44px; font-size: 0.95rem; padding: 0.55rem 1.4rem; border: 1.5px solid; cursor: pointer; }
.cil .lp-btn-secondary { min-height: 44px; font-size: 0.92rem; padding: 0.5rem 1rem; background: #fff; cursor: pointer; font-family: inherit; }

.cil-editor-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem;
  border-top: 3px solid var(--cil-green); padding-top: 1.25rem;
}
.cil-editor-actions { display: flex; align-items: center; gap: 1rem; }
.cil-editor-note { margin: 0 0 0.25rem; color: var(--cil-muted); }
.cil-message { min-height: 1.6em; margin: 0 0 1rem; font-weight: 700; color: var(--cil-green); }

.cil-editor-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .cil-editor-grid { grid-template-columns: 1fr; } }
.cil-editor-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.cil-editor-list-head .cil-section-title { flex: 1; }

.cil-ed-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.cil-ed-card { border: 1px solid var(--cil-rule); border-left: 4px solid var(--cil-rule); padding: 0.75rem 0.85rem; background: #fff; }
.cil-ed-card.is-editing { border-left-color: var(--cil-green); background: var(--cil-green-tint); }
.cil-ed-card-title { font-size: 1rem; margin: 0 0 0.4rem; overflow-wrap: anywhere; }
.cil-ed-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0 0 0.5rem; font-size: 0.85rem; }
.cil-badge { display: inline-block; padding: 0.1rem 0.5rem; border: 1px solid var(--cil-ink); font-size: 0.8rem; font-weight: 700; }
.cil-badge--pending { border-color: #9A6A12; color: #6E4B0C; }
.cil-ed-lead, .cil-ed-meta { color: var(--cil-muted); font-size: 0.88rem; margin: 0; }
.cil-ed-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.cil-ed-status { display: grid; gap: 0.2rem; flex: 1 1 10rem; font-size: 0.85rem; font-weight: 700; }

.cil-partners { border: none; padding: 0; }
.cil-partner-options { display: grid; gap: 0.25rem; }
.cil-check { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; }
.cil-check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; accent-color: var(--cil-green); }
.cil-check label { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }

.cil-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.cil-danger {
  font: inherit; font-size: 0.92rem; font-weight: 700;
  margin-left: auto; min-height: 44px; padding: 0.5rem 0.25rem;
  background: none; border: none; color: var(--lp-urgent, #A6403B);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ── Full width: the board needs the room ──
   The rest of v5 floats as a centred 1360px column. The CIL pages are a
   working tool, so the page, header and footer span the window instead,
   with one consistent side margin. The editor and intro text keep a
   readable measure, aligned to the same left edge. */
.cil-page .lp-page { max-width: none; margin-bottom: 0; box-shadow: none; }
.cil-page .lp-margin { display: none !important; }
.cil-page .lp-container { max-width: none; padding-left: clamp(1rem, 3vw, 3rem); padding-right: clamp(1rem, 3vw, 3rem); }
.cil-page .cil-board { grid-auto-columns: minmax(15rem, 1fr); }
.cil-page .cil-editor-app,
.cil-page .cil-editor > .lp-container > .cil-state { max-width: 1260px; }

/* ── Fit the board on a laptop screen ──
   Six main columns share the width (11rem minimum each); "Not progressed"
   takes only the room it needs while closed. board.js sets the column count
   so a status filter doesn't leave empty tracks. */
.cil-page .cil-board { grid-auto-columns: auto; }
.cil-column--collapsed { min-width: 9.5rem; }
.cil-column--collapsed[open] { min-width: 15rem; }

/* Dropdowns: Safari ignores height on native selects, so draw our own */
.cil-field select,
.cil-ed-status select,
.cil-form-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2320272C' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 12px 8px;
}
.cil-field select { min-width: 10rem; }

/* Search: wide enough to read, not the whole window */
.cil-field--search { max-width: 30rem; }

/* Card detail: the site-wide `.landing-page * { margin: 0 }` reset removed
   the auto margins browsers use to centre a dialog. */
.landing-page .cil-dialog { margin: auto; }

/* Tags: small plain labels, same green tint as the rest of the site */
.cil-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 0.35rem; }
.cil-tag {
  display: inline-block;
  font-size: 0.76rem; font-weight: 700; line-height: 1.3;
  padding: 0.1rem 0.45rem;
  background: var(--lp-navy-tint, #E7F0EB);
  color: var(--lp-info, #1E5B45);
  border-radius: 2px;
}

/* ── Minimal look ──────────────────────────────────────────────────────────
   Fewer outlines: space, type and soft panels do the separating, like a
   modern board (Trello-style lists and cards) in the site's own colours.
   Overrides the earlier, boxier rules above. */

/* Introduction: no rule on top, just the heading */
.cil-intro { border-top: none; padding-top: 0.5rem; }

/* Associations: a line of text options; the chosen one is underlined */
.cil-chips { gap: 0.25rem 1.5rem; margin-bottom: 1.1rem; }
.cil-chip {
  border: none; background: none; padding: 0.4rem 0;
  color: var(--cil-muted); font-weight: 400;
  border-bottom: 2px solid transparent; border-radius: 0;
}
.cil-chip:hover { color: var(--cil-ink); border-color: transparent; border-bottom-color: var(--cil-rule); }
.cil-chip[aria-pressed="true"] {
  background: none; color: var(--cil-ink); font-weight: 700;
  border-color: transparent; border-bottom-color: var(--cil-green);
}

/* Dropdowns and search: soft filled fields, no boxes */
.cil-field { font-weight: 400; color: var(--cil-muted); font-size: 0.85rem; }
.cil-field select,
.cil-field input {
  border: none; border-radius: 8px;
  background-color: #F3F0EA;
  min-height: 42px;
}
.cil-field select:hover, .cil-field input:hover { background-color: #EDE9E1; }
.cil-field input::placeholder { color: #8A8F92; }

/* Lists: soft rounded panels; cards sit inside without outlines */
.cil-page .cil-board { gap: 1rem; }
.cil-column,
.cil-column:nth-child(even) {
  background: #F3F0EA;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 0.6rem 0.6rem;
}
.cil-column-head { padding: 0 0.4rem; margin-bottom: 0.6rem; }
.cil-column-title { font-size: 0.98rem; }
.cil-count { font-weight: 400; }
.cil-column-body { gap: 0.5rem; }
.cil-column--collapsed { background: transparent; border: none; }
.cil-column--collapsed[open] { background: #F3F0EA; }

/* Cards: white, a hairline shadow instead of an outline, no coloured bar */
.cil-card,
.cil-card:hover {
  border: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(32, 39, 44, 0.12), 0 0 0 1px rgba(32, 39, 44, 0.04);
  padding: 0.75rem 0.85rem 0.7rem;
}
.cil-card:hover { box-shadow: 0 2px 6px rgba(32, 39, 44, 0.14), 0 0 0 1px rgba(32, 39, 44, 0.05); }
.cil-card-lead { font-size: 0.8rem; font-weight: 400; color: var(--cil-muted); gap: 0.4rem; }
.cil-card-lead .cil-dot { width: 0.55rem; height: 0.55rem; box-shadow: none; }
.cil-card-title { font-size: 0.98rem; margin: 0.3rem 0 0.45rem; }
.cil-card-open:hover { text-decoration: none; }
.cil-card-with { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--cil-muted); }
.cil-card-meta, .cil-card-updated { font-size: 0.82rem; }
.cil-card-updated { margin-top: 0.35rem; }

/* Tags: small green text, not boxed */
.cil-tags { gap: 0.15rem 0.7rem; margin: 0 0 0.3rem; }
.cil-tag { background: none; padding: 0; font-size: 0.76rem; }

/* Phone status tabs: underlined text, not buttons */
@media (max-width: 720px) {
  .cil-tabs { gap: 1.1rem; border-bottom: 1px solid var(--cil-rule); margin-bottom: 1rem; }
  .cil-tab, .cil-tab[aria-selected="true"] {
    border: none; background: none; padding: 0.5rem 0;
    border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px;
    color: var(--cil-muted);
  }
  .cil-tab[aria-selected="true"] { color: var(--cil-ink); font-weight: 700; border-bottom-color: var(--cil-green); }
  .cil-column, .cil-column:nth-child(even) { background: transparent; padding: 0; }
}

/* Contacts: lighter heading rule */
.cil-section-title { border-bottom-color: var(--cil-rule); }

/* Card detail: rounded like the cards, a soft shadow, no green rule */
.cil-dialog { border-top: none; border-radius: 12px; box-shadow: 0 12px 40px rgba(32, 39, 44, 0.25); }
.cil-detail-row { border-bottom-color: #EEEAE3; }
/* Cards: tighter lines than body text */
.cil-card { line-height: 1.4; }
.cil-card p { margin: 0; }
.cil-card .cil-card-title { margin: 0.3rem 0 0.4rem; line-height: 1.3; }
.cil-card .cil-tags { margin-bottom: 0.3rem; }
.cil-card .cil-card-with { margin-top: 0.2rem; }
.cil-card .cil-card-updated { margin-top: 0.4rem; }
/* Stages that only apply to one tag (Neighbourhood CIL): a quiet note */
.cil-column-note { margin: -0.45rem 0 0.6rem; padding: 0 0.4rem; font-size: 0.78rem; color: var(--cil-muted); }

/* Callouts in the introduction (Markdown alerts): white, green line on top */
.cil-intro .book-hint {
  margin: 0 0 1rem; padding: 0.8rem 0 0.2rem;
  border: none; border-top: 3px solid var(--cil-green);
  background: none; font-size: 1rem;
}
.cil-intro .book-hint p { margin: 0 0 0.5rem; }

/* ── Checklists ─────────────────────────────────────────────────────────── */
/* Card face: tasks done, with a thin progress bar */
.cil-card-tasks {
  display: flex; align-items: center; gap: 0.35rem;
  margin: 0.4rem 0 0.3rem; font-size: 0.82rem; font-weight: 700; color: var(--cil-muted);
}
.cil-tasks-icon { width: 0.95rem; height: 0.95rem; flex: none; }
.cil-tasks-bar {
  flex: 1; max-width: 5rem; height: 4px; border-radius: 2px;
  background: var(--cil-rule); overflow: hidden;
}
.cil-tasks-bar > span { display: block; height: 100%; background: var(--cil-muted); }
.cil-card-tasks.is-complete {
  color: #fff; background: var(--cil-green);
  width: fit-content; padding: 0.1rem 0.45rem; border-radius: 2px;
}
.cil-card-tasks.is-complete .cil-tasks-bar { display: none; }

/* Card detail: each checklist with its own progress */
.cil-checklists { margin: 0 0 1.25rem; }
.cil-checklist-note {
  margin: 0 0 0.9rem; padding: 0.5rem 0.75rem;
  background: var(--cil-green-tint); font-size: 0.85rem; color: var(--cil-ink);
}
.cil-checklist + .cil-checklist { margin-top: 1rem; }
.cil-checklist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.cil-checklist-title { margin: 0; font-size: 0.95rem; }
.cil-checklist-progress { font-size: 0.82rem; color: var(--cil-muted); white-space: nowrap; }
.cil-checklist-bar {
  display: block; height: 6px; margin: 0.35rem 0 0.5rem; border-radius: 3px;
  background: var(--cil-rule); overflow: hidden;
}
.cil-checklist-bar > span { display: block; height: 100%; background: var(--cil-muted); transition: width 0.2s ease; }
.cil-checklist-bar.is-complete > span { background: var(--cil-green); }
.cil-checklist-items { list-style: none; margin: 0; padding: 0; }
.cil-checklist-item { display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.2rem 0; line-height: 1.4; }
.cil-checklist-item input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0;
  border: 1.5px solid var(--cil-muted); border-radius: 3px; background: #fff;
  cursor: pointer;
}
.cil-checklist-item input:checked {
  border-color: var(--cil-green);
  background: var(--cil-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.3l2.8 2.8 6-6.2' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 85% no-repeat;
}
.cil-checklist-item input:disabled { cursor: default; }
.cil-checklist-item label { cursor: pointer; overflow-wrap: anywhere; }
.cil-checklist-item input:checked + label { color: var(--cil-muted); text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .cil-checklist-bar > span { transition: none; } }

/* ── Example switch (mockup only) ───────────────────────────────────────── */
.cil-examples { margin: 0 0 1.5rem; }
.cil-examples-switch {
  display: inline-flex; flex-wrap: wrap;
  border: 1.5px solid var(--cil-green); border-radius: 3px; overflow: hidden;
}
.cil-examples-switch button {
  font: inherit; font-size: 0.95rem; font-weight: 700;
  padding: 0.5rem 1rem; min-height: 2.75rem;
  border: none; background: #fff; color: var(--cil-green); cursor: pointer;
}
.cil-examples-switch button + button { border-left: 1.5px solid var(--cil-green); }
.cil-examples-switch button:hover { background: var(--cil-green-tint); }
.cil-examples-switch button[aria-pressed="true"] { background: var(--cil-green); color: #fff; }
.cil-examples-notice { margin: 0.6rem 0 0; max-width: 46rem; font-size: 0.9rem; color: var(--cil-muted); }
.cil-examples-notice:empty { display: none; }
