/* All rules are local to the regional-council screens (/council, /council/population). */
.cn { display: grid; gap: 20px; max-width: 1100px; margin-inline: auto; padding: 24px; min-width: 0; color: var(--d-ink); }
.cn [hidden] { display: none !important; }
.cn h1, .cn h2, .cn p { margin: 0; }
.cn h1 { font-size: var(--fs-h1); }
.cn h2 { font-size: var(--fs-h3); }
.cn p { line-height: 1.65; }
.cn .cn-header { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.cn .cn-header > div { display: grid; gap: 6px; min-width: 0; }
.cn .cn-eyebrow, .cn .cn-muted { color: var(--d-muted); font-size: var(--fs-th); }
.cn .cn-notice { padding: 12px 16px; border-inline-start: 3px solid var(--d-green); background: var(--teal-50); border-radius: var(--r-sm); font-size: var(--fs-th); }
.cn .cn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.cn .cn-card { display: grid; gap: 10px; align-content: start; padding: 20px; border: 1px solid var(--d-line); border-radius: var(--r-md); background: var(--sand-50); min-width: 0; }
.cn .cn-open, .cn .cn-back { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 8px 14px; border: 1px solid var(--d-line); border-radius: var(--r-sm); background: var(--sand-50); color: var(--d-ink); font-size: var(--fs-th); font-weight: 600; text-decoration: none; justify-self: start; }
.cn .cn-open { background: var(--d-green); border-color: var(--d-green); color: var(--sand-50); }
.cn .cn-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cn .cn-summary > span { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: var(--sand-100); border: 1px solid var(--d-line); border-radius: var(--r-sm); font-size: var(--fs-th); min-width: 0; }
.cn .cn-summary strong { font-size: var(--fs-h2); }
.cn .cn-search { display: grid; gap: 6px; max-width: 420px; font-size: var(--fs-th); font-weight: 600; }
.cn .cn-search input { width: 100%; min-width: 0; min-height: var(--tap); box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--d-line); border-radius: var(--r-sm); background: var(--sand-50); color: var(--d-ink); font: inherit; }
.cn .cn-table-wrap { overflow-x: auto; border: 1px solid var(--d-line); border-radius: var(--r-md); background: var(--sand-50); }
.cn .cn-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.cn .cn-table th, .cn .cn-table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--d-line); font-weight: 400; }
.cn .cn-table thead th { color: var(--d-muted); font-size: var(--fs-th); font-weight: 600; background: var(--sand-100); }
.cn .cn-table tbody th { font-weight: 600; }
.cn .cn-table tbody tr:last-child th, .cn .cn-table tbody tr:last-child td { border-bottom: 0; }
/* A child on a phone (17.11): the name, and under it grade · status; the two narrow columns hide. On a wide screen the reverse. */
.cn .cn-row-sub { display: none; }
.cn .cn-nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  .cn { padding: 16px; }
  .cn .cn-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cn .cn-table .cn-col-wide { display: none; }
  .cn .cn-table .cn-row-sub { display: block; margin-top: 2px; color: var(--d-muted); font-size: var(--fs-th); font-weight: 400; }
}
.cn section { display: grid; gap: 12px; min-width: 0; }
.cn .cn-alert { padding: 12px 16px; border-inline-start: 3px solid var(--d-ink); background: var(--sand-100); border-radius: var(--r-sm); font-size: var(--fs-body); }
.cn .cn-table tr.cn-late td:last-child { font-weight: 600; }
.cn .cn-contacts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cn .cn-contacts li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 10px 14px; border: 1px solid var(--d-line); border-radius: var(--r-sm); background: var(--sand-50); }
/* A house folds (17.11, <details>): a flexible summary loses the browser's triangle, so list-style none and an explicit chevron that turns. */
.cn .cn-house { min-width: 0; }
.cn .cn-house > summary.cn-house-head { list-style: none; display: flex; gap: 12px; align-items: center; cursor: pointer; padding: 12px 16px;
  border: 1px solid var(--d-line); border-radius: var(--r-md); background: var(--sand-50); min-height: var(--tap); }
.cn .cn-house > summary::-webkit-details-marker { display: none; }
.cn .cn-house > summary:hover { background: var(--teal-50); }
.cn .cn-house > summary:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 2px; }
.cn .cn-house[open] > summary { border-end-start-radius: 0; border-end-end-radius: 0; border-bottom-color: transparent; }
.cn .cn-house-title { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; min-width: 0; }
/* Houses under their branch (17.11): the branch heading over its houses, a step larger than a house's name. */
.cn .cn-branch { display: grid; gap: 10px; min-width: 0; }
.cn .cn-branch-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding-top: 4px; }
.cn .cn-branch-head h2 { font-size: var(--fs-h2); }
.cn .cn-house h3 { margin: 0; font-size: var(--fs-h3); }
.cn .cn-chev { display: inline-flex; margin-inline-start: auto; flex: none; color: var(--teal-600); transition: transform var(--dur-fast) var(--ease); }
.cn .cn-chev svg { width: 1.2em; height: 1.2em; }
.cn .cn-house[open] > summary .cn-chev { transform: rotate(180deg); }
.cn .cn-house[open] > .cn-table-wrap { border-start-start-radius: 0; border-start-end-radius: 0; }
.cn .cn-house > p { padding: 12px 16px; border: 1px solid var(--d-line); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); background: var(--sand-50); }
.cn .cn-list-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.cn .cn-fold-all { min-height: var(--tap); padding: 8px 14px; border: 1px solid var(--d-line); border-radius: var(--r-sm); background: var(--sand-50);
  color: var(--d-ink); font: inherit; font-size: var(--fs-th); font-weight: 600; cursor: pointer; }
.cn .cn-fold-all:hover { background: var(--teal-50); }
.cn .cn-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; align-items: end; }
.cn .cn-form label { display: grid; gap: 6px; min-width: 0; font-size: var(--fs-th); font-weight: 600; }
.cn .cn-form input, .cn .cn-form select { width: 100%; min-width: 0; min-height: var(--tap); box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--d-line); border-radius: var(--r-sm); background: var(--sand-50); color: var(--d-ink); font: inherit; }
.cn .cn-form button, .cn .cn-confirm button, .cn .cn-table button { cursor: pointer; font-family: inherit; }
.cn .cn-confirm { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--d-line); border-radius: var(--r-md); background: var(--sand-100); }
.cn .cn-open.cn-quiet { background: var(--sand-50); color: var(--d-ink); border-color: var(--d-line); }
.cn .cn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cn .cn-table th { position: relative; }
