:root {
  --matters-navy: #0b3f73;
  --matters-blue: #1769b0;
  --matters-ink: #172942;
  --matters-muted: #6f8095;
  --matters-line: #d9e3ee;
  --matters-soft: #f4f8fc;
}

.commission-matters {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
  color: var(--matters-ink);
}

.commission-matters__hero,
.commission-matters__content {
  border: 1px solid var(--matters-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(30, 61, 96, .06);
}

.commission-matters__hero {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  overflow: hidden;
}

.commission-matters__hero::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #0d4f8c, #2c85ce);
  content: "";
}

.commission-matters__mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid #c9dff2;
  border-radius: 18px;
  color: #0d4f8c;
  background: linear-gradient(145deg, #f6fbff, #e9f3fc);
  font-size: .88rem;
  font-weight: 850;
  letter-spacing: .055em;
}

.commission-matters__identity { min-width: 0; }

.commission-matters__eyebrow {
  display: block;
  margin-bottom: .28rem;
  color: #647892;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.commission-matters__identity h1 {
  margin: 0;
  color: var(--matters-navy);
  font-size: clamp(1.45rem, 2.3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.commission-matters__hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin-top: .55rem;
  color: var(--matters-muted);
  font-size: .78rem;
}

.commission-matters__hero-meta > span {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}

.commission-matters__status { font-weight: 750; }
.commission-matters__status i { color: #9aa8b7; font-size: .42rem; }
.commission-matters__status.is-active { color: #14744e; }
.commission-matters__status.is-active i { color: #20a46d; }

.commission-matters__hero-actions a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .55rem .75rem;
  border: 1px solid #cddbea;
  border-radius: 10px;
  color: #1a568e;
  background: #fff;
  font-size: .78rem;
  font-weight: 750;
  text-decoration: none;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.commission-matters__hero-actions a:hover {
  border-color: #8db6db;
  color: #0c477d;
  background: #f3f8fd;
  text-decoration: none;
}

.commission-matters__content { overflow: hidden; }

.commission-matters__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e4ebf3;
}

.commission-matters__section-header span {
  display: block;
  margin-bottom: .12rem;
  color: #78889c;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.commission-matters__section-header h2 {
  margin: 0;
  color: var(--matters-navy);
  font-size: 1.18rem;
  font-weight: 820;
}

.commission-matters__section-header h2 small {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  margin-left: .3rem;
  place-items: center;
  border-radius: 999px;
  color: #35658f;
  background: #eaf3fb;
  font-size: .68rem;
  vertical-align: 2px;
}

.commission-matters__list {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  background: #f7f9fc;
}

.matter-card {
  overflow: hidden;
  border: 1px solid #dbe5ef;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(35, 63, 94, .045);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.matter-card:hover {
  transform: translateY(-1px);
  border-color: #b7cee3;
  box-shadow: 0 12px 25px rgba(28, 65, 103, .075);
}

.matter-card.is-focused {
  border-color: #4b98d6;
  box-shadow: 0 0 0 4px rgba(32, 128, 202, .12), 0 16px 38px rgba(20, 70, 112, .12);
  scroll-margin-block-start: 12px;
}

.matter-card__header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid #e8eef5;
}

.matter-card__document {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: #1767a9;
  background: #eaf3fb;
  font-size: 1rem;
}

.matter-card__title { min-width: 0; }

.matter-card__title > span {
  display: block;
  margin-bottom: .12rem;
  color: #73849a;
  font-size: .61rem;
  font-weight: 850;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.matter-card__title h3 {
  margin: 0;
  overflow: hidden;
  font-size: .98rem;
  font-weight: 820;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matter-card__title a { color: #163f68; text-decoration: none; }
.matter-card__title a:hover { color: #0968b2; text-decoration: none; }

.matter-card__stage {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .34rem .58rem;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.matter-card__stage.is-finished { color: #14734e; background: #e6f5ee; }
.matter-card__stage.is-progress { color: #8a5d0c; background: #fff3d2; }
.matter-card__stage.is-waiting { color: #1a5a91; background: #e9f3fc; }
.matter-card__stage.is-unassigned { color: #6c7786; background: #eef1f4; }
.matter-card__stage.is-signature { color: #75520e; background: #fff3d5; }
.matter-card__stage.is-approved { color: #11704a; background: #e4f6ed; }
.matter-card__stage.is-rejected { color: #a33a42; background: #fcebed; }
.matter-card__stage.is-tied { color: #815b10; background: #fff2d4; }
.matter-card__stage small { display: block; margin-left: .25rem; color: inherit; font-size: .58rem; font-weight: 700; opacity: .78; }

.matter-stage-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0;
  border: 1px solid #cfdeec;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 67, 108, .07);
}

.matter-stage-kpis a {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 38px auto;
  grid-template-rows: auto auto;
  column-gap: .72rem;
  min-height: 82px;
  padding: .82rem 1rem;
  color: #244c76;
  background: #fff;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.matter-stage-kpis a:first-child { border-radius: 14px 0 0 14px; }
.matter-stage-kpis a:last-child { border-radius: 0 14px 14px 0; }
.matter-stage-kpis a + a { border-left: 1px solid #dce6ef; }

.matter-stage-kpis a:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -5px;
  width: 9px;
  height: 9px;
  border-top: 1px solid #c9d9e7;
  border-right: 1px solid #c9d9e7;
  background: inherit;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.matter-stage-kpis a:hover { background: #f5f9fd; }

.matter-stage-kpis a.is-active {
  z-index: 1;
  color: #fff;
  background: linear-gradient(135deg, #0e4e88, #1975bd);
  box-shadow: 0 10px 22px rgba(14, 78, 136, .22);
}

.matter-stage-kpis i {
  display: grid;
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  place-items: center;
  align-self: center;
  border-radius: 11px;
  color: #146db6;
  background: #e9f3fb;
}

.matter-stage-kpis a.is-active i {
  color: #fff;
  background: rgba(255, 255, 255, .16);
}

.matter-stage-kpis strong {
  align-self: end;
  color: #0d3d6c;
  font-size: 1.32rem;
  line-height: 1;
}

.matter-stage-kpis a.is-active strong,
.matter-stage-kpis a.is-active span { color: #fff; }

.matter-stage-kpis span {
  align-self: start;
  margin-top: .24rem;
  color: #647a91;
  font-size: .67rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}
.matter-stage-clear { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .65rem; border: 1px solid #d4e1ed; border-radius: 8px; color: #416786; background: #fff; font-size: .72rem; font-weight: 800; text-decoration: none; }

.matter-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 29%);
}

.matter-card__main { min-width: 0; padding: 1rem; }

.matter-card__author {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  margin-bottom: .55rem;
  color: #65768c;
  font-size: .71rem;
  font-weight: 700;
}

.matter-card__author i { color: #7da1c2; }

.matter-card__summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #354b65;
  font-size: .86rem;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.matter-card__summary .dont-break-out { overflow-wrap: anywhere !important; }

.matter-card__routing {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.4rem;
  margin: .9rem 0 0;
  padding-top: .8rem;
  border-top: 1px solid #edf1f5;
}

.matter-card__routing div { min-width: 0; }

.matter-card__routing dt {
  margin-bottom: .12rem;
  color: #8190a2;
  font-size: .57rem;
  font-weight: 850;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.matter-card__routing dd {
  margin: 0;
  color: #315477;
  font-size: .72rem;
  font-weight: 750;
  line-height: 1.35;
}

.matter-card__reporting {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: .8rem;
  padding: 1rem;
  border-left: 1px solid #e7edf4;
  background: #fbfdff;
}

.matter-card__reporter {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
}

.matter-card__reporter-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: #1765a7;
  background: #eaf3fb;
  font-size: .9rem;
}

.matter-card__reporter small {
  display: block;
  margin-bottom: .1rem;
  color: #7c8a9b;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.matter-card__reporter strong {
  display: block;
  overflow: hidden;
  color: #263f5c;
  font-size: .78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matter-card__reporter.is-empty .matter-card__reporter-icon { color: #7c8c9d; background: #eef2f5; }
.matter-card__reporter.is-empty strong { color: #718092; font-weight: 700; }

.matter-card.has-deliberation-tracker .matter-card__body {
  grid-template-columns: minmax(0, .82fr) minmax(510px, 1.18fr);
}

.matter-vote-control {
  overflow: hidden;
  border: 1px solid #d9e4ee;
  border-radius: 12px;
  background: #fff;
}

.matter-vote-control__head {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem .55rem .75rem;
  border-bottom: 1px solid #e5edf4;
  background: #f7fafc;
}

.matter-vote-control__head strong {
  display: block;
  color: #234766;
  font-size: .72rem;
  font-weight: 850;
}

.matter-vote-control__head small {
  display: block;
  margin-top: .08rem;
  color: #718399;
  font-size: .59rem;
  font-weight: 700;
}

.matter-vote-control__resend-all {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: .35rem;
  padding: .35rem .55rem;
  border: 1px solid #b9d1e6;
  border-radius: 8px;
  color: #155b94;
  background: #fff;
  cursor: pointer;
  font-size: .61rem;
  font-weight: 820;
  white-space: nowrap;
}

.matter-vote-control__resend-all:hover,
.matter-vote-member__resend:hover {
  border-color: #6fa8d5;
  color: #0b4b80;
  background: #eef6fc;
}

.matter-vote-control button:disabled { cursor: wait; opacity: .55; }
.matter-vote-members { display: grid; }

.matter-vote-member {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(105px, 1fr) auto 30px;
  align-items: center;
  gap: .55rem;
  padding: .58rem .65rem;
}

.matter-vote-member + .matter-vote-member { border-top: 1px solid #edf2f6; }
.matter-vote-member.is-complete { background: #f7fcf9; }
.matter-vote-member.is-signed { background: #fffdf7; }

.matter-vote-member__avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8e3ed;
  border-radius: 50%;
  color: #6b8298;
  background: #eef4f8;
  font-size: .72rem;
}

.matter-vote-member__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matter-vote-member__identity { min-width: 0; }

.matter-vote-member__identity strong,
.matter-vote-member__identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matter-vote-member__identity strong {
  color: #274663;
  font-size: .68rem;
  font-weight: 820;
}

.matter-vote-member__identity small {
  margin-top: .08rem;
  color: #7b8a9a;
  font-size: .55rem;
}

.matter-vote-member__steps { display: flex; gap: .32rem; }

.member-step {
  display: inline-flex;
  min-width: 62px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: .27rem;
  padding: .25rem .38rem;
  border-radius: 7px;
  color: #8a98a7;
  background: #eef2f5;
}

.member-step i { font-size: .62rem; }
.member-step small { font-size: .52rem; font-weight: 800; }
.member-step.is-done { color: #11704a; background: #e4f6ed; }

.matter-vote-member__resend {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #cbdce9;
  border-radius: 8px;
  color: #1765a3;
  background: #fff;
  cursor: pointer;
  font-size: .66rem;
}

.matter-vote-control__feedback {
  min-height: 0;
  margin: 0;
  padding: 0 .7rem;
  color: #356889;
  font-size: .58rem;
  font-weight: 700;
}

.matter-vote-control__feedback:not(:empty) {
  padding-top: .4rem;
  padding-bottom: .45rem;
  border-top: 1px solid #edf2f6;
}

.matter-vote-members__empty {
  margin: 0;
  padding: .8rem;
  color: #7a8999;
  font-size: .65rem;
  text-align: center;
}

.matter-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .4rem;
}

.matter-card__open,
.matter-card__assign summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .48rem .68rem;
  border: 1px solid #cbd9e7;
  border-radius: 9px;
  color: #175c98;
  background: #fff;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 800;
  list-style: none;
  text-decoration: none;
}

.matter-card__open {
  flex: 1 1 auto;
  border-color: #1765aa;
  color: #fff;
  background: #1765aa;
}

.matter-card__open:hover { border-color: #0f538f; color: #fff; background: #0f5898; text-decoration: none; }
.matter-card__assign { position: relative; flex: 1 1 auto; }
.matter-card__assign[open] { flex-basis: 100%; }
.matter-card__assign summary::-webkit-details-marker { display: none; }
.matter-card__assign summary:hover { border-color: #94b7d7; background: #f3f8fd; }

.matter-card__assign form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: .4rem;
  margin-top: .45rem;
}

.matter-card__assign select,
.matter-card__assign button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #cbd9e7;
  border-radius: 8px;
  background: #fff;
}

.matter-card__assign select {
  width: 100%;
  padding: .4rem .55rem;
  color: #304a65;
  font-size: .69rem;
}

.matter-card__assign button {
  color: #fff;
  background: #1765aa;
  cursor: pointer;
}

.commission-matters__pagination { padding: .2rem 1rem .8rem; background: #f7f9fc; }
.commission-matters__pagination:empty { display: none; }

.commission-matters__empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: .55rem;
  color: #7c8da0;
  background: #f8fafc;
}

.commission-matters__empty i { font-size: 1.7rem; }

@media (max-width: 900px) {
  .matter-card__body { grid-template-columns: minmax(0, 1fr) minmax(240px, 34%); }
  .matter-card.has-deliberation-tracker .matter-card__body { grid-template-columns: minmax(0, .72fr) minmax(460px, 1.28fr); }
}

@media (max-width: 767px) {
  .commission-matters { gap: .7rem; margin-bottom: 1.5rem; }
  .commission-matters__hero,
  .commission-matters__content { border-radius: 12px; }
  .commission-matters__hero { grid-template-columns: 48px minmax(0, 1fr) auto; gap: .7rem; padding: .8rem .7rem .8rem .9rem; }
  .commission-matters__hero::before { width: 3px; }
  .commission-matters__mark { width: 48px; height: 48px; border-radius: 13px; font-size: .68rem; }
  .commission-matters__eyebrow { margin-bottom: .16rem; font-size: .56rem; }
  .commission-matters__identity h1 { overflow: hidden; font-size: 1.12rem; text-overflow: ellipsis; white-space: nowrap; }
  .commission-matters__hero-meta { gap: .5rem; margin-top: .3rem; font-size: .62rem; }
  .commission-matters__hero-actions a { width: 36px; min-height: 36px; padding: 0; border-radius: 9px; }
  .commission-matters__hero-actions span { display: none; }
  .commission-matters__section-header { padding: .8rem; }
  .commission-matters__section-header h2 { font-size: 1rem; }
  .commission-matters__list { gap: .6rem; padding: .65rem; }
  .matter-card { border-radius: 11px; }
  .matter-card:hover { transform: none; }
  .matter-card__header { padding: .7rem; }
  .matter-card__body { display: block; }
  .matter-card.has-deliberation-tracker .matter-card__body { display: block; }
  .matter-card__main { padding: .8rem; }
  .matter-card__reporting { padding: .75rem .8rem; border-top: 1px solid #e7edf4; border-left: 0; }
  .matter-card__summary { font-size: .79rem; line-height: 1.52; -webkit-line-clamp: 4; }
  .matter-card__routing { margin-top: .7rem; padding-top: .65rem; }
  .matter-card__reporter { grid-template-columns: 34px minmax(0, 1fr); }
  .matter-card__reporter-icon { width: 34px; height: 34px; border-radius: 9px; }
  .matter-card__actions { justify-content: flex-end; }
  .matter-card__open,
  .matter-card__assign { flex: 0 1 auto; }
  .matter-card__assign[open] { flex: 1 1 100%; }
  .matter-vote-member { grid-template-columns: 32px minmax(90px, 1fr) auto 30px; gap: .45rem; }
  .member-step { min-width: 28px; width: 28px; }
  .member-step small { display: none; }
}

@media (max-width: 480px) {
  .matter-stage-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: .65rem 0; border-radius: 12px; }
  .matter-stage-kpis a { grid-template-columns: 27px minmax(0, 1fr); column-gap: .42rem; min-height: 72px; padding: .55rem .48rem; }
  .matter-stage-kpis a:first-child { border-radius: 11px 0 0 11px; }
  .matter-stage-kpis a:last-child { border-radius: 0 11px 11px 0; }
  .matter-stage-kpis i { width: 27px; height: 27px; border-radius: 8px; font-size: .7rem; }
  .matter-stage-kpis strong { font-size: 1.02rem; }
  .matter-stage-kpis span { margin-top: .18rem; font-size: .5rem; line-height: 1.18; }
  .commission-matters__hero-meta > span:not(.commission-matters__status) { display: none; }
  .matter-card__header { grid-template-columns: 38px minmax(0, 1fr); gap: .6rem; }
  .matter-card__document { width: 38px; height: 38px; border-radius: 10px; }
  .matter-card__title h3 { font-size: .86rem; }
  .matter-card__stage { grid-column: 2; justify-self: start; font-size: .54rem; }
  .matter-card__author { font-size: .65rem; }
  .matter-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matter-card__actions > :only-child { grid-column: 1 / -1; }
  .matter-card__assign[open] { grid-column: 1 / -1; }
  .matter-card__open,
  .matter-card__assign,
  .matter-card__assign summary { width: 100%; }
  .matter-vote-control__head { align-items: flex-start; }
  .matter-vote-control__resend-all span { display: none; }
  .matter-vote-control__resend-all { width: 32px; padding: 0; justify-content: center; }
  .matter-vote-member { grid-template-columns: 30px minmax(0, 1fr) auto 29px; padding: .55rem; }
  .matter-vote-member__avatar { width: 30px; height: 30px; }
}
