.topics-hero,
.topic-hero {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: #fff;
}

.topics-hero::after,
.topic-hero::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  right: -180px;
  top: -220px;
  border: 96px solid rgba(201,255,74,.09);
  border-radius: 50%;
  pointer-events: none;
}

.topics-hero-inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(56px, 9vw, 100px);
  padding-bottom: clamp(60px, 10vw, 112px);
}

.topics-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: .92;
  letter-spacing: -.065em;
}

.topics-hero-inner > p:last-child {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.68);
  font-size: 1.02rem;
  line-height: 1.65;
}

.topics-main {
  padding-top: clamp(52px, 8vw, 88px);
  padding-bottom: 88px;
}

.topic-library-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
  gap: 36px;
  align-items: end;
  margin-bottom: 30px;
}

.topic-library-heading h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.45rem, 5.2vw, 4.7rem);
  line-height: .96;
  letter-spacing: -.06em;
}

.topic-library-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
}

.topic-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.topic-index-card {
  overflow: hidden;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid #d9d5cb;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(18,21,32,.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.topic-index-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 72px rgba(18,21,32,.13);
}

.topic-index-card:focus-visible {
  outline: 3px solid #7059dd;
  outline-offset: 4px;
}

.topic-index-visual {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: #7059dd;
  color: #fff;
}

.topic-index-card:nth-child(2) .topic-index-visual {
  background: var(--night);
}

.topic-index-card:nth-child(3) .topic-index-visual {
  background: #dfff91;
  color: var(--night);
}

.topic-index-category {
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.topic-index-number {
  color: var(--electric);
  font-size: clamp(4rem, 6.5vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -.09em;
  line-height: .78;
}

.topic-index-card:nth-child(3) .topic-index-number { color: #5b43c7; }

.topic-index-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 25px 24px 27px;
}

.topic-status-chip {
  width: fit-content;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e8ffb3;
  color: #23310d;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.topic-index-copy h3 {
  margin: 17px 0 0;
  font-size: clamp(1.75rem, 2.8vw, 2.45rem);
  line-height: 1;
  letter-spacing: -.045em;
}

.topic-index-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.62;
}

.topic-index-link {
  margin-top: auto;
  padding-top: 24px;
  color: #5b43c7;
  font-size: .86rem;
  font-weight: 850;
}

.topic-method-note {
  max-width: 760px;
  margin: 54px auto 0;
  padding: 28px 30px;
  border-left: 4px solid #7059dd;
  background: #f0edff;
}

.topic-method-note h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.025em; }
.topic-method-note > p:last-child { margin: 12px 0 0; color: #554f65; }

.bylaw-browse-hint { margin-top: 32px; font-weight: 650; }
.bylaw-list { max-width: 900px; margin: 22px auto 0; }
.bylaw-entry { margin: 0 0 12px; border: 1px solid #d9d5e3; border-radius: 14px; background: #fff; }
.bylaw-entry > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; border-radius: 14px; cursor: pointer; list-style: none; }
.bylaw-entry > summary::-webkit-details-marker { display: none; }
.bylaw-entry > summary::after { content: ''; width: 9px; height: 9px; flex: 0 0 9px; border-right: 2px solid #5b43c7; border-bottom: 2px solid #5b43c7; transform: rotate(45deg); margin-right: 4px; }
.bylaw-entry[open] > summary::after { transform: rotate(225deg); }
.bylaw-entry > summary:hover,
.bylaw-entry[open] > summary { background: #f0edff; }
.bylaw-entry > summary:focus-visible { outline: 3px solid #7059dd; outline-offset: 3px; }
.bylaw-entry-heading { min-width: 0; }
.bylaw-entry h2 { margin: 0; font-size: clamp(1rem, 2.5vw, 1.2rem); line-height: 1.4; letter-spacing: -.015em; overflow-wrap: anywhere; }
.bylaw-entry-number { display: block; margin-top: 5px; color: #554f65; font-size: .8rem; }
.bylaw-entry-content { padding: 4px 22px 25px; border-top: 1px solid #e2deea; }
.bylaw-entry-content h3 { margin: 23px 0 12px; font-size: 1.05rem; }
.bylaw-entry-content p { line-height: 1.7; }
@media print {
  .bylaw-entry > summary::after { display: none; }
  .bylaw-entry-content { display: block !important; }
}

.topic-hero { padding: 0 0 clamp(58px, 8vw, 92px); }
.topic-hero > .wrap { position: relative; z-index: 1; }

.topic-breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 28px 0 46px;
  color: rgba(255,255,255,.5);
  font-size: .72rem;
}

.topic-breadcrumb a { color: var(--electric); }

.topic-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 370px);
  gap: clamp(38px, 7vw, 84px);
  align-items: end;
}

.topic-hero-grid-single { grid-template-columns: minmax(0, 1fr); }

.topic-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.5rem, 8.5vw, 7.8rem);
  line-height: .84;
  letter-spacing: -.075em;
}

.topic-hero h1 span { color: var(--electric); }

.topic-hero-summary {
  max-width: 750px;
  margin: 30px 0 0;
  color: rgba(255,255,255,.74);
  font-size: 1.05rem;
  line-height: 1.68;
}

.topic-status-panel {
  padding: 25px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 22px;
  background: rgba(255,255,255,.075);
  backdrop-filter: blur(10px);
}

.topic-status-label {
  display: block;
  color: var(--electric);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.topic-status-panel > strong {
  display: block;
  margin-top: 7px;
  font-size: 2.25rem;
  letter-spacing: -.045em;
}

.topic-status-panel > h2 {
  margin: 7px 0 0;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -.045em;
}

.topic-status-panel > p { margin: 1px 0 22px; color: rgba(255,255,255,.58); font-size: .8rem; }
.topic-status-panel dl { margin: 0; }
.topic-status-panel dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); }
.topic-status-panel dt { color: rgba(255,255,255,.5); font-size: .72rem; }
.topic-status-panel dd { margin: 0; color: #fff; font-size: .76rem; font-weight: 800; text-align: right; }
.topic-updated { margin: 34px 0 0; color: rgba(255,255,255,.42); font-size: .7rem; }

.topic-main { padding-top: 0; padding-bottom: 88px; }
.topic-main > section { margin-top: clamp(62px, 9vw, 108px); }

.topic-current {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: clamp(38px, 8vw, 92px);
  align-items: start;
}

.topic-current h2,
.topic-section-intro h2,
.topic-sources h2,
.topic-next h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.7vw, 4.1rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.topic-current-copy > p { margin: 0 0 17px; color: #4f5765; font-size: .96rem; line-height: 1.72; }

.topic-plain-language {
  display: grid;
  gap: 5px;
  margin-top: 28px;
  padding: 20px 22px;
  border-left: 4px solid #7059dd;
  background: #f0edff;
}
.topic-plain-language strong,
.topic-plain-language h3 { margin: 0; color: #5b43c7; font-size: .7rem; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; }
.topic-plain-language span { font-size: 1rem; font-weight: 780; }

.topic-section-intro { max-width: 800px; }
.topic-section-intro > p:last-child { max-width: 640px; margin: 18px 0 0; color: var(--muted); }

.topic-timeline { position: relative; margin: 45px 0 0; padding: 0; list-style: none; }
.topic-timeline::before { content: ""; position: absolute; left: 173px; top: 12px; bottom: 12px; width: 2px; background: #d9d4ee; }
.topic-timeline > li { position: relative; display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 55px; align-items: start; margin-top: 22px; }
.topic-timeline > li::before { content: ""; position: absolute; left: 166px; top: 27px; width: 16px; height: 16px; border: 4px solid var(--canvas); border-radius: 50%; background: #7059dd; box-shadow: 0 0 0 2px #7059dd; }
.topic-timeline time { padding-top: 22px; color: #645b76; font-size: .75rem; font-weight: 850; text-align: right; }

.topic-timeline-card {
  padding: clamp(23px, 4vw, 34px);
  border: 1px solid #d9d5cb;
  border-radius: 20px;
  background: #fff;
}
.topic-timeline-card.current { border-color: #a6d83f; box-shadow: inset 5px 0 0 #bde954; }
.topic-event-type { display: inline-flex; margin-bottom: 11px; color: #6654c9; font-size: .67rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.topic-event-type.current { color: #45620b; }
.topic-timeline-card h3 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.1; letter-spacing: -.035em; }
.topic-timeline-card p { margin: 14px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.topic-timeline-card h4 { margin: 22px 0 0; font-size: .84rem; line-height: 1.3; letter-spacing: -.01em; }
.topic-timeline-card ul { margin: 11px 0 0; padding-left: 20px; color: var(--muted); font-size: .84rem; line-height: 1.65; }
.topic-timeline-card li { margin-top: 6px; }
.topic-timeline-card p.topic-record-note {
  margin-top: 17px;
  padding: 12px 14px;
  border-left: 3px solid #7059dd;
  border-radius: 0 10px 10px 0;
  background: #f2efff;
  color: #473f59;
  font-size: .78rem;
}
.topic-record-note strong { color: #2f2652; }
.topic-timeline-card a { display: inline-flex; gap: 8px; margin-top: 19px; color: #5b43c7; font-size: .77rem; font-weight: 850; }

.topic-unknowns {
  overflow: hidden;
  padding: clamp(30px, 6vw, 58px);
  border-radius: 28px;
  background: var(--night);
  color: #fff;
}
.topic-unknowns .topic-section-intro > p:last-child { color: rgba(255,255,255,.6); }
.topic-unknown-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 34px; }
.topic-unknown-grid article { min-height: 245px; padding: 25px; border: 1px solid rgba(255,255,255,.13); border-radius: 18px; background: rgba(255,255,255,.065); }
.topic-unknown-grid article > span { color: var(--electric); font-size: .65rem; font-weight: 900; }
.topic-unknown-grid h3 { margin: 38px 0 0; font-size: 1.22rem; line-height: 1.16; }
.topic-unknown-grid p { margin: 13px 0 0; color: rgba(255,255,255,.6); font-size: .8rem; line-height: 1.58; }

.topic-sources { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(35px, 7vw, 78px); align-items: start; }
.topic-sources > div > p:last-child { margin-top: 17px; color: var(--muted); font-size: .84rem; }
.topic-sources ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid #d8d4ca; }
.topic-sources li { border-bottom: 1px solid #d8d4ca; }
.topic-sources a { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 13px; padding: 18px 0; color: var(--ink); font-size: .82rem; font-weight: 760; line-height: 1.45; text-decoration: none; }
.topic-sources a:hover { color: #5b43c7; }
.topic-sources a span { color: #7059dd; font-size: .65rem; font-weight: 900; }

.topic-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
  gap: 45px;
  align-items: center;
  padding: clamp(30px, 6vw, 56px);
  border-radius: 28px;
  background: #7059dd;
  color: #fff;
}
.topic-next > div:first-child > p:last-child { margin: 16px 0 0; color: rgba(255,255,255,.67); }
.topic-next-actions { display: grid; gap: 10px; }
.topic-next-actions a { display: flex; justify-content: space-between; gap: 18px; padding: 17px 18px; border-radius: 12px; background: #fff; color: #2b2443; font-size: .8rem; font-weight: 850; text-decoration: none; }
.topic-next-actions a:first-child { background: var(--electric); color: var(--night); }

.topic-origin-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 14px;
  margin-top: 34px;
}

.topic-origin-grid article {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid #d9d5cb;
  border-radius: 20px;
  background: #fff;
}

.topic-origin-grid article:first-child { border-top: 5px solid #7059dd; }
.topic-origin-grid article:last-child { border-top: 5px solid #bde954; }
.topic-origin-grid h3 { margin: 0; font-size: 1.35rem; line-height: 1.15; letter-spacing: -.03em; }
.topic-origin-grid p,
.topic-origin-grid li { color: var(--muted); font-size: .88rem; line-height: 1.65; }
.topic-origin-grid p { margin: 15px 0 0; }
.topic-origin-grid ul { margin: 15px 0 0; padding-left: 20px; }
.topic-origin-grid li + li { margin-top: 9px; }

.topic-table-scroll {
  overflow-x: auto;
  margin-top: 34px;
  border: 1px solid #d9d5cb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(18,21,32,.07);
  -webkit-overflow-scrolling: touch;
}

.topic-table-scroll:focus-visible { outline: 3px solid #7059dd; outline-offset: 4px; }
.topic-vote-table { width: 100%; min-width: 1180px; border-collapse: collapse; color: var(--ink); font-size: .78rem; line-height: 1.5; }
.topic-vote-table th,
.topic-vote-table td { padding: 17px 16px; border-bottom: 1px solid #e2ded5; text-align: left; vertical-align: top; font-weight: 400; }
.topic-vote-table th { background: var(--night); color: #fff; font-size: .68rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.topic-vote-table tbody tr:last-child td { border-bottom: 0; }
.topic-vote-table tbody tr:nth-child(even) { background: #f8f7f3; }
.topic-vote-table td:first-child { min-width: 255px; }
.topic-vote-table td:nth-child(6),
.topic-vote-table td:nth-child(7) { min-width: 240px; }
.topic-table-note { max-width: 840px; margin: 18px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }

.topic-impact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.topic-impact-grid article { min-height: 215px; padding: 25px; border-radius: 20px; background: #e8ffb3; }
.topic-impact-grid article:nth-child(2) { background: #f0edff; }
.topic-impact-grid article:nth-child(3) { background: #fff; border: 1px solid #d9d5cb; }
.topic-impact-grid span { color: #5b43c7; font-size: .65rem; font-weight: 900; }
.topic-impact-grid p { margin: 48px 0 0; color: #343946; font-size: .9rem; line-height: 1.65; }

.topic-source-companion { border-top: 1px dashed #ded9cd; }

.topic-next-placeholders > div {
  display: grid;
  gap: 5px;
  padding: 17px 18px;
  border-radius: 12px;
  background: #fff;
  color: #2b2443;
  font-size: .8rem;
  line-height: 1.35;
}
.topic-next-placeholders > div:first-child { background: var(--electric); color: var(--night); }
.topic-next-placeholders span { font-size: .64rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.topic-next-placeholders small { color: #706986; font-size: .7rem; line-height: 1.45; }
.topic-next-placeholders > div:first-child small { color: #4d5d29; }

.topic-hero-buildings h1 { max-width: 900px; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .9; }

@media (max-width: 820px) {
  .topic-hero-grid,
  .topic-current,
  .topic-sources,
  .topic-next { grid-template-columns: 1fr; }
  .topic-library-heading { grid-template-columns: 1fr; gap: 14px; }
  .topic-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-status-panel { max-width: 520px; }
  .topic-unknown-grid { grid-template-columns: 1fr; }
  .topic-origin-grid,
  .topic-impact-grid { grid-template-columns: 1fr; }
  .topic-unknown-grid article { min-height: 0; }
  .topic-unknown-grid h3 { margin-top: 22px; }
  .topic-impact-grid article { min-height: 0; }
  .topic-impact-grid p { margin-top: 24px; }
}

@media (max-width: 620px) {
  .topics-hero h1 { font-size: clamp(2.8rem, 15vw, 4.4rem); }
  .topic-breadcrumb { padding: 22px 0 35px; }
  .topic-hero h1 { font-size: clamp(3.6rem, 19vw, 5.4rem); }
  .topic-timeline::before { left: 7px; }
  .topic-timeline li { grid-template-columns: 1fr; gap: 9px; padding-left: 30px; }
  .topic-timeline li::before { left: 0; top: 13px; }
  .topic-timeline time { padding-top: 0; text-align: left; }
  .topic-index-grid { grid-template-columns: 1fr; }
  .topic-index-visual { min-height: 170px; }
  .topic-index-copy { padding: 24px 21px 27px; }
  .topic-current h2,
  .topic-section-intro h2,
  .topic-sources h2,
  .topic-next h2 { font-size: clamp(2rem, 11vw, 3rem); }
  .topic-hero-buildings h1 { font-size: clamp(2.8rem, 13vw, 4.5rem); }
  .topic-table-scroll::before {
    content: "Swipe to see every column";
    display: block;
    position: sticky;
    left: 0;
    width: fit-content;
    padding: 10px 14px;
    background: #e8ffb3;
    color: #2e3b14;
    font-size: .68rem;
    font-weight: 760;
  }
}
