.public-nav { display: flex; align-items: center; gap: 8px; }
.public-nav a { padding: 8px 11px; border-radius: 999px; color: rgba(255,255,255,.72); font-size: .76rem; font-weight: 750; text-decoration: none; }
.public-nav a:hover, .public-nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.public-nav .public-nav-update { background: var(--electric); color: var(--night); }
.public-nav .public-nav-update:hover { background: #d7ff77; color: var(--night); }

.profiles-main, .profile-main { min-height: 70vh; }
.profiles-intro, .profile-hero { background: var(--night); color: #fff; }
.profiles-intro { padding: clamp(54px, 8vw, 92px) 0; }
.profiles-intro-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 64px; align-items: end; }
.profiles-intro h1 { max-width: 700px; margin: 0; font-size: clamp(3.3rem, 7vw, 6.2rem); line-height: .94; letter-spacing: -.065em; }
.profiles-intro-grid > div > p:last-child { max-width: 650px; margin: 24px 0 0; color: rgba(255,255,255,.68); font-size: 1.05rem; }
.profile-method-card { padding: 25px; border: 1px solid rgba(255,255,255,.15); border-radius: 20px; background: rgba(255,255,255,.07); }
.profile-method-card strong { color: var(--electric); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.profile-method-card p { margin: 12px 0; color: rgba(255,255,255,.76); line-height: 1.55; }
.profile-method-card span { color: rgba(255,255,255,.45); font-size: .76rem; }

.profiles-directory { padding-top: 66px; padding-bottom: 86px; }
.profiles-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.profiles-section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -.05em; }
.profiles-section-heading > p { max-width: 320px; margin: 0; color: var(--muted); font-size: .84rem; text-align: right; }
.councillor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.councillor-card { display: block; padding: 22px; border: 1px solid #d9d5cc; border-radius: 20px; background: #fff; color: var(--ink); text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.councillor-card:hover { transform: translateY(-3px); border-color: #9f8df1; box-shadow: 0 20px 38px rgba(22,18,50,.09); }
.councillor-card-head { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 15px; }
.councillor-card-head img { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; object-position: top center; background: #eceaf3; }
.councillor-card-head h3 { margin: 0; font-size: 1.16rem; }
.councillor-card-head p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.councillor-card-head > span { color: #755ce4; font-size: 1.25rem; font-weight: 900; }
.councillor-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 19px 0 12px; }
.councillor-card-stats div { min-height: 79px; display: flex; flex-direction: column; padding: 11px; border-radius: 12px; background: #f5f3fb; }
.councillor-card-stats strong { font-size: 1.25rem; letter-spacing: -.03em; }
.councillor-card-stats span { margin-top: auto; color: #6e687c; font-size: .66rem; line-height: 1.2; }
.councillor-card-note { margin: 0; color: var(--muted); font-size: .73rem; }
.open-profile { display: block; margin-top: 17px; color: #674ee0; font-size: .75rem; }
.profile-status { margin: 18px 0 0; color: var(--muted); font-size: .73rem; }
.profile-status.error, .profile-loading.error { color: #a52828; }

.profile-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 24px 0 42px;
  background: #06172c;
}
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("/images/kingsville/profile-shoreline-dusk.webp");
  background-position: center right;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
}
.profile-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4,17,34,.9) 0%, rgba(4,17,34,.64) 35%, rgba(4,17,34,.18) 72%, rgba(4,17,34,.04) 100%),
    linear-gradient(0deg, rgba(4,17,34,.78) 0%, rgba(4,17,34,.2) 48%, rgba(4,17,34,.06) 100%);
}
.profile-hero > .wrap { position: relative; z-index: 1; }
.back-to-profiles { display: inline-block; margin-bottom: 28px; color: rgba(255,255,255,.56); font-size: .76rem; text-decoration: none; }
.profile-identity { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 28px; }
.profile-identity > img { width: 150px; height: 150px; border: 4px solid rgba(255,255,255,.2); border-radius: 32px; object-fit: cover; object-position: top center; background: #fff; box-shadow: 0 22px 55px rgba(0,0,0,.26); }
.profile-identity h1 { margin: 0; font-size: clamp(3.2rem, 7vw, 5.7rem); line-height: .95; letter-spacing: -.065em; }
.profile-role { margin: 12px 0 0; color: rgba(255,255,255,.62); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.profile-actions a, .profile-actions button { min-height: 39px; display: inline-flex; align-items: center; padding: 8px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: .73rem; font-weight: 760; text-decoration: none; }
.profile-actions button:hover, .profile-actions a:hover { background: rgba(255,255,255,.15); }
.profile-career-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 30px; }
.career-fact { min-height: 104px; display: flex; flex-direction: column; padding: 15px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(4,17,34,.56); backdrop-filter: blur(8px); }
.career-fact > span { color: rgba(255,255,255,.5); font-size: .62rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.career-fact > strong { margin-top: 7px; color: #fff; font-size: 1.08rem; letter-spacing: -.02em; }
.career-fact small { margin-top: auto; color: rgba(255,255,255,.5); font-size: .64rem; line-height: 1.35; }
.career-fact small a { color: var(--electric); font-weight: 800; text-decoration: none; white-space: nowrap; }
.profile-stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 9px; margin-top: 32px; }
.profile-stat { min-height: 128px; display: flex; flex-direction: column; padding: 17px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(4,17,34,.61); backdrop-filter: blur(8px); }
.profile-stat strong { color: var(--electric); font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1; letter-spacing: -.04em; }
.profile-stat span { margin-top: 8px; color: #fff; font-size: .75rem; font-weight: 760; }
.profile-stat small { margin-top: auto; color: rgba(255,255,255,.45); font-size: .62rem; line-height: 1.25; }
.profile-loading { padding-top: 100px; padding-bottom: 100px; }

.profile-content { padding-top: 54px; padding-bottom: 78px; }
.career-ledger, .pay-ledger { padding: clamp(22px,4vw,34px); border: 1px solid #d9d5cc; border-radius: 24px; background: #fff; box-shadow: 0 20px 50px rgba(18,21,32,.055); }
.pay-ledger { margin: 18px 0 52px; background: #f5f1ff; border-color: #d8cffa; }
.profile-section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 23px; }
.profile-section-head h2 { margin: 0; font-size: clamp(1.75rem,3vw,2.55rem); letter-spacing: -.05em; }
.profile-section-head > p { max-width: 410px; margin: 0; color: var(--muted); font-size: .79rem; line-height: 1.5; text-align: right; }
.career-table-wrap { overflow-x: auto; }
.career-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.career-table th { padding: 10px 11px; border-bottom: 2px solid var(--night); color: #6a6473; font-size: .59rem; letter-spacing: .07em; text-align: right; text-transform: uppercase; }
.career-table th:first-child, .career-table th:nth-child(2) { text-align: left; }
.career-table td { padding: 13px 11px; border-bottom: 1px solid #e4e0d9; font-size: .76rem; text-align: right; }
.career-table td:first-child, .career-table td:nth-child(2) { text-align: left; }
.career-table td:first-child small { display: block; margin-top: 2px; color: var(--muted); font-size: .59rem; }
.career-table tfoot td { border-top: 2px solid var(--night); border-bottom: 0; background: #f5f3f8; font-weight: 760; }
.career-table a { color: #5f47c7; font-weight: 800; text-decoration: none; }
.career-table-note { margin: 13px 0 0; color: var(--muted); font-size: .67rem; line-height: 1.45; }
.pay-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.pay-summary > div { display: flex; flex-direction: column; min-height: 112px; padding: 16px; border: 1px solid #d9d0fa; border-radius: 15px; background: rgba(255,255,255,.7); }
.pay-summary span { color: #655e73; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.pay-summary strong { margin-top: 7px; color: #4d35b0; font-size: 1.75rem; letter-spacing: -.04em; }
.pay-summary small { margin-top: auto; color: var(--muted); font-size: .65rem; }
.pay-table { min-width: 830px; }
.pay-table th, .pay-table td { text-align: right; }
.pay-table th:first-child, .pay-table td:first-child, .pay-table th:last-child, .pay-table td:last-child { text-align: left; }
.profile-summary { display: grid; grid-template-columns: .75fr 1.25fr; gap: 50px; padding: 30px; border-radius: 22px; background: var(--electric); }
.profile-summary h2, .profile-questions h2, .record-panel h2 { margin: 0; letter-spacing: -.04em; }
.profile-summary > p { margin: 0; font-size: 1.04rem; line-height: 1.65; }
.profile-questions { display: grid; grid-template-columns: .7fr 1.3fr; gap: 40px; margin: 56px 0; }
.profile-questions > div:last-child { display: grid; gap: 8px; }
.profile-questions a { display: flex; justify-content: space-between; gap: 16px; padding: 15px 16px; border: 1px solid #d9d5cc; border-radius: 13px; background: #fff; color: var(--ink); font-size: .86rem; font-weight: 760; text-decoration: none; }
.profile-questions a:hover { border-color: #9f8df1; background: #f8f6ff; }
.profile-questions a span { color: #6f54df; }
.profile-subscribe { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 0 0 24px; padding: 26px 30px; border-radius: 20px; background: var(--night); color: #fff; }
.profile-subscribe h2 { margin: 0; font-size: clamp(1.7rem,3vw,2.45rem); letter-spacing: -.045em; }
.profile-subscribe p:not(.eyebrow) { margin: 8px 0 0; color: rgba(255,255,255,.62); font-size: .8rem; }
.profile-subscribe > a { min-height: 46px; display: inline-flex; align-items: center; gap: 16px; padding: 11px 16px; border-radius: 11px; background: var(--electric); color: var(--night); font-size: .76rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.profile-subscribe > a:hover { background: #d7ff77; }

.record-panel { margin-bottom: 18px; padding: clamp(22px,4vw,34px); border: 1px solid #d9d5cc; border-radius: 24px; background: #fff; box-shadow: 0 20px 50px rgba(18,21,32,.06); }
.record-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.record-panel-head > div:first-child > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.record-tabs { display: inline-flex; padding: 4px; border-radius: 12px; background: #efedf4; }
.record-tabs button { min-height: 38px; padding: 8px 12px; border-radius: 9px; background: transparent; color: #5f586e; font-size: .72rem; font-weight: 800; }
.record-tabs button[aria-pressed="true"] { background: var(--night); color: #fff; }
.record-filters { display: grid; grid-template-columns: minmax(180px,1.5fr) repeat(4,minmax(110px,.7fr)); gap: 9px; margin: 26px 0 12px; }
.record-filters label { display: flex; flex-direction: column; gap: 5px; color: #706a7a; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.record-filters input, .record-filters select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #dad6e0; border-radius: 10px; background: #f8f7fa; color: var(--ink); font: inherit; font-size: .75rem; text-transform: none; letter-spacing: 0; }
.record-count { margin: 0 0 10px; color: var(--muted); font-size: .72rem; }
.record-table-wrap { overflow-x: auto; }
.record-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.record-table th { padding: 11px 10px; border-bottom: 2px solid var(--night); color: #676171; font-size: .61rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.record-table th:nth-child(1) { width: 112px; }
.record-table th:nth-child(3) { width: 100px; }
.record-table th:nth-child(4) { width: 118px; }
.record-table td { padding: 15px 10px; border-bottom: 1px solid #e2ded7; vertical-align: top; font-size: .75rem; }
.record-table td:nth-child(2) > strong { display: block; font-size: .86rem; line-height: 1.35; }
.record-table td:nth-child(2) > p { margin: 4px 0 7px; color: var(--muted); line-height: 1.45; }
.record-table td a { color: #6750ce; font-weight: 760; text-decoration: none; }
.record-details { display: none; flex-wrap: wrap; gap: 5px 12px; margin: 7px 0; color: #756f80; font-size: .67rem; }
.evidence-on .record-details { display: flex; }
.position-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #eceaf0; color: #5e5866; font-size: .68rem; font-weight: 850; }
.position-pill.for { background: #dcf7e7; color: #12633a; }
.position-pill.against { background: #ffe2dd; color: #9b281a; }
.position-pill.moved { background: #e8e1ff; color: #5236bd; }
.position-pill.interest { background: #fff0c9; color: #735000; }
.result-passed { color: #14663c; }
.result-defeated { color: #9b281a; }
.result-other { color: #5f5968; }
.record-empty { padding: 34px; border-radius: 12px; background: #f6f4f8; color: var(--muted); text-align: center; }
.show-more-records { width: 100%; min-height: 46px; margin-top: 16px; border: 1px solid #d8d3e4; border-radius: 11px; background: #f7f5fc; color: #5c43ca; font-weight: 800; }
.show-more-records:hover { background: #eee9ff; }
.profile-limitations { margin-top: 24px; padding: 18px 20px; border-radius: 14px; background: #efedf2; color: var(--muted); font-size: .76rem; }
.profile-limitations summary { color: var(--ink); font-weight: 800; cursor: pointer; }
.profile-limitations li { margin: 6px 0; }

@media (max-width: 900px) {
  .profiles-intro-grid, .profile-summary, .profile-questions { grid-template-columns: 1fr; gap: 24px; }
  .profile-career-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-stat:last-child { grid-column: 1 / -1; }
  .profile-section-head { display: grid; gap: 10px; }
  .profile-section-head > p { max-width: 620px; text-align: left; }
  .record-panel-head { display: grid; }
  .record-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-filters label:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .public-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px 8px; width: 100%; overflow-x: visible; }
  .public-nav a { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; min-height: 44px; padding: 8px 6px; white-space: normal; }
}

@media (max-width: 680px) {
  .public-nav a:first-child, .public-nav a:nth-child(2) { display: inline-flex; }
  .public-nav .public-nav-update { display: inline-flex; padding: 7px 11px; }
  .profiles-intro { padding: 48px 0; }
  .profiles-intro h1 { font-size: clamp(3.1rem,16vw,4.7rem); }
  .profiles-section-heading { display: block; }
  .profiles-section-heading > p { margin-top: 10px; text-align: left; }
  .councillor-grid { grid-template-columns: 1fr; }
  .councillor-card { padding: 18px; }
  .councillor-card-head { grid-template-columns: 58px 1fr auto; }
  .councillor-card-head img { width: 58px; height: 58px; border-radius: 15px; }
  .profile-hero { padding-bottom: 30px; }
  .profile-hero::before { height: 520px; background-position: 72% top; background-size: auto 520px; opacity: 1; mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%); }
  .profile-hero::after {
    background:
      linear-gradient(90deg, rgba(4,17,34,.9) 0%, rgba(4,17,34,.58) 58%, rgba(4,17,34,.08) 100%),
      linear-gradient(0deg, rgba(4,17,34,.84) 0%, rgba(4,17,34,.18) 55%, rgba(4,17,34,.03) 100%);
  }
  .back-to-profiles { margin-bottom: 22px; }
  .profile-identity { grid-template-columns: 74px minmax(0,1fr); gap: 15px; align-items: start; }
  .profile-identity > img { width: 74px; height: 88px; margin-top: 34px; border-width: 3px; border-radius: 18px; }
  .profile-identity h1 { font-size: clamp(2.15rem,10.5vw,2.8rem); line-height: .92; }
  .profile-role { font-size: .78rem; }
  .profile-actions { grid-column: 1 / -1; }
  .profile-actions a, .profile-actions button { width: 100%; justify-content: center; }
  .profile-career-facts { grid-template-columns: 1fr 1fr; }
  .career-fact { min-height: 104px; padding: 14px; }
  .profile-stats { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; padding-bottom: 0; }
  .profile-stat, .profile-stat:last-child { min-width: 0; min-height: 116px; grid-column: auto; }
  .profile-stat:last-child { grid-column: 1 / -1; min-height: 102px; }
  .profile-content { padding-top: 34px; }
  .profile-summary, .record-panel, .career-ledger, .pay-ledger { padding: 20px; border-radius: 18px; }
  .pay-ledger { margin-bottom: 38px; }
  .pay-summary { grid-template-columns: 1fr; }
  .profile-questions { margin: 42px 0; }
  .profile-subscribe { align-items: stretch; flex-direction: column; padding: 22px 20px; }
  .profile-subscribe > a { justify-content: center; }
  .record-tabs { width: 100%; }
  .record-tabs button { flex: 1; }
  .record-filters { grid-template-columns: 1fr 1fr; }
  .record-table, .record-table tbody { display: block; }
  .record-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .record-table tr { display: grid; grid-template-columns: 1fr auto; gap: 9px 14px; padding: 17px 0; border-bottom: 1px solid #ded9d1; }
  .record-table td { display: block; padding: 0; border: 0; }
  .record-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .record-table td:nth-child(1) { grid-column: 1; grid-row: 2; color: var(--muted); }
  .record-table td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .record-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
}
