﻿:root {
  --lavender: #B3A4FF;
  --yellow: #F9C906;
  --white: #FFFFFF;
  --berry: #E94B7A;
  --gray: #1E1C2C;
  --purple: #7B62FF;
  --ink: #1E1C2C;
  --muted: #6F6A7D;
  --line: rgba(30, 28, 44, 0.14);
  --soft: #F8F7FC;
  --warn: #F0A000;
  --shadow: 0 18px 60px rgba(30, 28, 44, 0.14);
}

/* 提案地圖 / civic proposal map */
.proposal-map-page {
  --proposal-purple: #7b62ff;
  --proposal-purple-soft: #ede8ff;
  --proposal-yellow: #f9c906;
  --proposal-yellow-soft: #fff2bf;
  --proposal-aqua: #6addf6;
  --proposal-text: #1e1c2c;
  --proposal-muted: #6f6b7c;
  --proposal-border: rgba(30, 28, 44, 0.11);
  background:
    radial-gradient(circle at 7% 2%, rgba(249, 201, 6, 0.20), transparent 28rem),
    radial-gradient(circle at 95% 0%, rgba(123, 98, 255, 0.10), transparent 24rem),
    #ffffff;
  color: var(--proposal-text);
  min-height: 100vh;
  padding: 0 clamp(16px, 2vw, 30px) clamp(16px, 2vw, 30px);
}

.proposal-map-hero,
.proposal-toolbar,
.proposal-layout {
  max-width: 1480px;
  margin-inline: auto;
}

.proposal-map-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 14px;
}

.proposal-map-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-left: 5px solid var(--proposal-yellow);
  background: linear-gradient(90deg, var(--proposal-yellow-soft), rgba(255, 255, 255, 0));
  color: var(--proposal-purple);
  font-size: 14px;
  font-weight: 900;
}

.proposal-map-hero h1 {
  margin: 8px 0 4px;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.proposal-map-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--proposal-muted);
  font-size: 15px;
  line-height: 1.75;
}

.proposal-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  background:
    linear-gradient(180deg, #ffe989 0%, #f9c906 100%);
  color: var(--proposal-text);
  box-shadow: 0 13px 24px rgba(249, 201, 6, 0.33), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  transform: translateY(0);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.proposal-primary-cta:hover,
.proposal-primary-cta:focus-visible {
  filter: saturate(1.05);
  transform: translateY(-2px);
  box-shadow: 0 17px 30px rgba(249, 201, 6, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.proposal-primary-cta img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.proposal-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(220px, 0.55fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}

.proposal-filter-group,
.proposal-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid var(--proposal-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 35px rgba(30, 28, 44, 0.05);
  backdrop-filter: blur(12px);
}

.proposal-filter-group > span,
.proposal-search > span {
  flex: 0 0 auto;
  color: var(--proposal-muted);
  font-size: 13px;
  font-weight: 800;
}

.proposal-filter-group button {
  border: 0;
  border-radius: 999px;
  padding: 8px 11px;
  background: transparent;
  color: var(--proposal-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.proposal-filter-group button:hover,
.proposal-filter-group button:focus-visible {
  background: rgba(106, 221, 246, 0.22);
  transform: translateY(-1px);
}

.proposal-filter-group button.active {
  background: linear-gradient(135deg, #fff0a6, #fedf6a);
  box-shadow: inset 0 0 0 1px rgba(249, 201, 6, 0.55);
}

.proposal-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--proposal-text);
  font-size: 14px;
}

.proposal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.proposal-map-card,
.proposal-side-panel,
.proposal-detail-card,
.proposal-list,
.proposal-modal {
  border: 1px solid var(--proposal-border);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 55px rgba(30, 28, 44, 0.09);
  backdrop-filter: blur(14px);
}

.proposal-map-card {
  overflow: hidden;
  border-radius: 24px;
}

.proposal-map-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, auto)) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
}

.proposal-map-summary div {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(250, 229, 174, 0.42);
}

.proposal-map-summary strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.proposal-map-summary span,
.proposal-map-summary p {
  margin: 0;
  color: var(--proposal-muted);
  font-size: 13px;
  font-weight: 800;
}

.proposal-map-canvas {
  width: 100%;
  min-height: 640px;
  background: #f5f7f8;
}

.proposal-side-panel {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr);
  min-height: 720px;
  padding: 12px;
  border-radius: 24px;
  gap: 12px;
}

.proposal-detail-card {
  min-height: 320px;
  border-radius: 20px;
  padding: 16px;
}

.proposal-detail-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  text-align: center;
  color: var(--proposal-muted);
}

.proposal-detail-empty img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.proposal-detail h2 {
  margin: 12px 0 8px;
  font-size: 24px;
  line-height: 1.25;
}

.proposal-detail p {
  color: var(--proposal-muted);
  font-size: 14px;
  line-height: 1.7;
}

.proposal-detail-head,
.proposal-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.proposal-category-pill,
.proposal-status-pill,
.proposal-endorsement-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.proposal-category-pill {
  background: var(--proposal-purple-soft);
  color: var(--proposal-purple);
}

.proposal-status-pill {
  background: var(--proposal-yellow-soft);
}

.proposal-endorsement-pill {
  background: rgba(106, 221, 246, 0.22);
  color: #176a78;
}

.proposal-location-meta {
  display: grid;
  grid-template-columns: 1fr 0.35fr;
  gap: 8px;
  margin: 14px 0;
}

.proposal-location-meta div {
  border-radius: 14px;
  padding: 10px;
  background: rgba(30, 28, 44, 0.04);
}

.proposal-location-meta dt {
  color: var(--proposal-muted);
  font-size: 12px;
  font-weight: 800;
}

.proposal-location-meta dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 850;
}

.proposal-action-row {
  margin: 12px 0;
}

.proposal-action-row .civic-action-button {
  min-height: 40px;
  cursor: pointer;
}

.proposal-action-row .civic-action-button[disabled] {
  filter: grayscale(0.5);
  opacity: 0.6;
  cursor: not-allowed;
}

.proposal-comment-box {
  margin-top: 14px;
  border-top: 1px solid var(--proposal-border);
  padding-top: 12px;
}

.proposal-comment-box > strong {
  display: block;
  margin-bottom: 8px;
}

.proposal-comment-box p {
  display: grid;
  gap: 2px;
  margin: 8px 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(30, 28, 44, 0.04);
}

.proposal-comment-box p b {
  color: var(--proposal-text);
  font-size: 12px;
}

.proposal-comment-box p span,
.proposal-comment-box small {
  color: var(--proposal-muted);
  font-size: 13px;
}

.proposal-comment-box form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.proposal-comment-box input,
.proposal-create-form input,
.proposal-create-form textarea,
.proposal-create-form select {
  width: 100%;
  border: 1px solid var(--proposal-border);
  border-radius: 12px;
  background: #fff;
  color: var(--proposal-text);
  font: inherit;
  outline: 0;
}

.proposal-comment-box input {
  padding: 0 12px;
}

.proposal-list-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.proposal-list-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(30, 28, 44, 0.05);
  color: var(--proposal-text);
  cursor: pointer;
  font-weight: 900;
}

.proposal-list-tabs button.active {
  background: var(--proposal-yellow);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.proposal-list {
  overflow: auto;
  border-radius: 20px;
  padding: 8px;
}

.proposal-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--proposal-text);
  text-align: left;
  cursor: pointer;
}

.proposal-list-item + .proposal-list-item {
  margin-top: 4px;
}

.proposal-list-item:hover,
.proposal-list-item:focus-visible,
.proposal-list-item.is-active {
  background: rgba(123, 98, 255, 0.09);
}

.proposal-list-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.proposal-list-item small {
  grid-column: 2;
  color: var(--proposal-muted);
  font-size: 12px;
}

.proposal-category-dot {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--proposal-purple);
  box-shadow: 0 0 0 4px rgba(123, 98, 255, 0.14);
}

.proposal-category-dot[data-category="traffic"],
.proposal-category-pill[data-category="traffic"] {
  background: rgba(255, 49, 49, 0.14);
  color: #b21e2a;
}

.proposal-category-dot[data-category="facility"],
.proposal-category-pill[data-category="facility"] {
  background: rgba(249, 201, 6, 0.26);
  color: #8b6800;
}

.proposal-category-dot[data-category="environment"],
.proposal-category-pill[data-category="environment"] {
  background: rgba(42, 181, 124, 0.16);
  color: #0f7a4d;
}

.proposal-category-dot[data-category="other"],
.proposal-category-pill[data-category="other"] {
  background: rgba(123, 98, 255, 0.16);
  color: var(--proposal-purple);
}

.proposal-leaflet-marker {
  background: transparent;
  border: 0;
}

.proposal-leaflet-marker span {
  display: grid;
  place-items: center;
  width: var(--marker-size);
  height: var(--marker-size);
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--marker-color);
  box-shadow: 0 10px 22px rgba(30, 28, 44, 0.22), 0 0 0 7px color-mix(in srgb, var(--marker-color) 22%, transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.proposal-leaflet-marker.is-selected span {
  transform: scale(1.18);
  box-shadow: 0 14px 28px rgba(30, 28, 44, 0.30), 0 0 0 10px rgba(249, 201, 6, 0.22);
}

.proposal-empty {
  margin: 0;
  padding: 16px;
  color: var(--proposal-muted);
  font-size: 14px;
}

.proposal-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
}

.proposal-modal-layer.is-open {
  display: block;
}

.proposal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 28, 44, 0.40);
  backdrop-filter: blur(5px);
}

.proposal-modal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(720px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
  border-radius: 26px;
  padding: 22px;
  transform: translate(-50%, -46%);
  opacity: 0;
  animation: proposalModalIn 220ms ease forwards;
}

@keyframes proposalModalIn {
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.proposal-modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(30, 28, 44, 0.08);
  cursor: pointer;
  font-size: 22px;
}

.proposal-modal-heading {
  display: flex;
  gap: 14px;
  padding-right: 40px;
}

.proposal-modal-heading img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.proposal-modal-heading h2 {
  margin: 0;
  font-size: 26px;
}

.proposal-modal-heading p {
  margin: 4px 0 0;
  color: var(--proposal-muted);
  font-size: 14px;
  line-height: 1.65;
}

.proposal-create-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.proposal-create-form label {
  display: grid;
  gap: 6px;
  color: var(--proposal-text);
  font-size: 13px;
  font-weight: 900;
}

.proposal-form-grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 12px;
}

.proposal-create-form input,
.proposal-create-form select {
  min-height: 44px;
  padding: 0 12px;
}

.proposal-create-form textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
}

.proposal-location-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(123, 98, 255, 0.07);
}

.proposal-location-picker span,
.proposal-form-status {
  color: var(--proposal-muted);
  font-size: 13px;
}

.proposal-location-picker span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 850;
}

.proposal-location-picker span.is-picked {
  color: #176a78;
  background: rgba(106, 221, 246, 0.22);
  box-shadow: inset 0 0 0 1px rgba(106, 221, 246, 0.42);
}

.proposal-location-picker span.is-required {
  color: #b21e2a;
  background: rgba(255, 49, 49, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 49, 49, 0.22);
}

.proposal-captcha-row {
  display: grid;
  grid-template-columns: auto minmax(80px, 110px) auto;
  gap: 10px;
  align-items: center;
}

.proposal-captcha-row input[name="captchaAnswer"] {
  min-height: 42px;
}

.nav-visibility-editor {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(30, 28, 44, 0.10);
}

.nav-visibility-title {
  color: var(--ink);
  font-weight: 950;
}

.nav-visibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.nav-visibility-item {
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248, 247, 252, 0.92);
}

.nav-visibility-item span {
  font-weight: 900;
}

.nav-visibility-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

body.proposal-picking-location .proposal-map-canvas {
  cursor: crosshair;
  box-shadow: inset 0 0 0 4px rgba(249, 201, 6, 0.75);
}

body.proposal-picking-location .proposal-map-card::before {
  content: "請在地圖上點選提案位置";
  position: absolute;
  z-index: 700;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--proposal-yellow);
  box-shadow: 0 12px 24px rgba(30, 28, 44, 0.18);
  font-size: 14px;
  font-weight: 900;
}

body.proposal-picking-location .proposal-map-card::after {
  content: "點一下地圖後，系統會帶你回到提案表單";
  position: absolute;
  z-index: 700;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--proposal-muted);
  box-shadow: 0 10px 20px rgba(30, 28, 44, 0.14);
  font-size: 13px;
  font-weight: 850;
}

.proposal-map-card {
  position: relative;
}

@media (max-width: 1180px) {
  .proposal-toolbar,
  .proposal-layout {
    grid-template-columns: 1fr;
  }

  .proposal-filter-group {
    overflow-x: auto;
  }

  .proposal-side-panel {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .proposal-map-page {
    padding: 12px;
  }

  .proposal-map-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .proposal-map-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .proposal-map-summary p {
    grid-column: 1 / -1;
  }

  .proposal-map-canvas {
    min-height: 480px;
  }

  .proposal-form-grid,
  .proposal-captcha-row,
  .proposal-comment-box form {
    grid-template-columns: 1fr;
  }
}

.civic-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 0.5fr) minmax(160px, 0.5fr) minmax(240px, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.civic-admin-toolbar label,
.civic-admin-card-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.civic-admin-toolbar select,
.civic-admin-toolbar input,
.civic-admin-card-controls select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.civic-admin-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.civic-admin-summary div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.civic-admin-summary strong {
  display: block;
  color: var(--purple);
  font-size: 24px;
  line-height: 1;
}

.civic-admin-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.civic-admin-list {
  display: grid;
  gap: 12px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}

.civic-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.33fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 16px;
  box-shadow: 0 14px 36px rgba(30, 28, 44, 0.06);
}

.civic-admin-card-main {
  display: grid;
  gap: 6px;
}

.civic-admin-card-main span,
.civic-admin-card-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.civic-admin-card-main strong {
  color: var(--ink);
  font-size: 18px;
}

.civic-admin-card-main p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.civic-admin-card-controls {
  display: grid;
  gap: 10px;
  align-content: start;
}

.civic-admin-card-controls .primary-action {
  min-height: 40px;
  justify-content: center;
}

@media (max-width: 920px) {
  .civic-admin-toolbar,
  .civic-admin-card {
    grid-template-columns: 1fr;
  }

  .civic-admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Event registration POC */
.events-page,
.event-detail-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.events-page {
  padding-top: 12px;
}

.events-hero,
.event-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 26px;
  border: 1px solid rgba(30, 28, 44, 0.10);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(254, 223, 106, 0.42), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 250, 251, 0.88));
  box-shadow: 0 22px 50px rgba(30, 28, 44, 0.10);
}

.events-hero h1,
.event-detail-main h1 {
  margin: 0;
  color: #1e1c2c;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
}

.events-hero p,
.event-detail-main p,
.event-info-section p {
  margin: 10px 0 0;
  color: #626171;
  line-height: 1.8;
}

.events-list-section,
.event-info-section {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid rgba(30, 28, 44, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 35px rgba(30, 28, 44, 0.08);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  color: #1e1c2c;
  font-size: 22px;
}

.section-heading span {
  color: #888596;
  font-size: 14px;
}

.event-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.event-card {
  overflow: hidden;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(30, 28, 44, 0.08);
}

.event-card.is-featured {
  grid-column: 1 / -1;
  position: relative;
  transform: perspective(1200px) rotateX(var(--event-tilt-x, 0deg)) rotateY(var(--event-tilt-y, 0deg));
  transition: transform 220ms ease, box-shadow 220ms ease;
  box-shadow:
    0 24px 60px rgba(30, 28, 44, 0.14),
    0 10px 24px rgba(254, 223, 106, 0.16);
  isolation: isolate;
}

.event-card.is-featured:hover {
  box-shadow:
    0 30px 72px rgba(30, 28, 44, 0.18),
    0 16px 36px rgba(254, 223, 106, 0.22);
}

.event-card.is-featured::before {
  content: "";
  position: absolute;
  left: clamp(24px, 8vw, 120px);
  right: clamp(24px, 8vw, 120px);
  bottom: -20px;
  height: 72px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(254, 223, 106, 0.44), rgba(254, 223, 106, 0.18) 42%, transparent 72%);
  filter: blur(14px);
  opacity: 0;
  transform: translateY(18px) scaleX(0.84);
  animation: featuredEventBottomGlow 900ms ease-out 160ms forwards;
  pointer-events: none;
  z-index: -1;
}

.event-card.is-featured .event-card-cover {
  position: relative;
  aspect-ratio: 1920 / 900;
  overflow: hidden;
  isolation: isolate;
}

.event-card.is-featured .event-card-cover::before,
.event-card.is-featured .event-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.event-card.is-featured .event-card-cover::before {
  background:
    radial-gradient(circle at var(--event-glow-x, 50%) var(--event-glow-y, 28%), rgba(255, 255, 255, 0.48), transparent 23%),
    linear-gradient(115deg, transparent 0%, transparent 34%, rgba(255, 255, 255, 0.46) 45%, transparent 58%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.82;
  transform: translateX(-18%);
  animation: featuredEventLightSweep 7.5s ease-in-out infinite;
}

.event-card.is-featured .event-card-cover::after {
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(30, 28, 44, 0.16), transparent);
  opacity: 0.42;
}

.event-card.is-featured .event-card-cover > * {
  position: relative;
  z-index: 1;
}

.event-card.is-featured .event-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: end;
}

.event-card.is-featured h3,
.event-card.is-featured p,
.event-card.is-featured dl {
  grid-column: 1;
}

.event-card.is-featured .primary-action {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
  white-space: nowrap;
  animation: featuredEventCtaPulse 3.8s ease-in-out 1s infinite;
}

@keyframes featuredEventLightSweep {
  0%,
  100% {
    transform: translateX(-28%);
    opacity: 0.34;
  }

  45% {
    transform: translateX(32%);
    opacity: 0.78;
  }

  70% {
    transform: translateX(18%);
    opacity: 0.36;
  }
}

@keyframes featuredEventBottomGlow {
  to {
    opacity: 1;
    transform: translateY(0) scaleX(1);
  }
}

@keyframes featuredEventCtaPulse {
  0%,
  100% {
    box-shadow:
      0 12px 24px rgba(254, 223, 106, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
    filter: saturate(1);
  }

  45% {
    box-shadow:
      0 16px 32px rgba(254, 223, 106, 0.36),
      0 0 0 5px rgba(254, 223, 106, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.48);
    filter: saturate(1.08);
  }
}

.event-card-cover {
  aspect-ratio: 1920 / 900;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(254, 223, 106, 0.88), rgba(220, 248, 169, 0.72)),
    radial-gradient(circle at 16% 20%, rgba(179, 164, 255, 0.65), transparent 38%);
}

.event-card-cover.has-image {
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(30, 28, 44, 0.10), rgba(30, 28, 44, 0.02)),
    var(--event-cover-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: #fff8df;
}

.event-card-cover span,
.event-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #1e1c2c;
  font-size: 13px;
  font-weight: 800;
}

.event-card-body {
  padding: 18px;
}

.event-card h3 {
  margin: 0;
  color: #1e1c2c;
  font-size: 20px;
}

.event-card p {
  min-height: 3.2em;
  margin: 8px 0 14px;
  color: #626171;
  line-height: 1.6;
}

.event-card dl,
.event-key-info {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.event-card dl div,
.event-key-info div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  color: #1e1c2c;
  font-size: 14px;
}

.event-card dt,
.event-key-info span {
  color: #918d9d;
}

.event-card dd {
  margin: 0;
}

.event-empty,
.event-loading {
  padding: 28px;
  border-radius: 16px;
  background: rgba(254, 223, 106, 0.18);
  color: #1e1c2c;
}

.event-detail-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: stretch;
}

.event-banner-showcase {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  margin-bottom: 18px;
  border: 1px solid rgba(30, 28, 44, 0.10);
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(254, 223, 106, 0.16), rgba(255, 255, 255, 0.08) 36%, rgba(179, 164, 255, 0.14)),
    var(--event-cover-image);
  background-position: center;
  background-size: cover;
  box-shadow: 0 26px 70px rgba(30, 28, 44, 0.18);
  isolation: isolate;
}

.event-banner-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(254, 223, 106, 0.45), transparent 30%, transparent 70%, rgba(179, 164, 255, 0.30)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(32, 29, 45, 0.26));
}

.event-banner-showcase::after {
  content: "";
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -32%;
  width: 28%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: rotate(13deg);
  animation: eventBannerSweep 6s ease-in-out infinite;
}

.event-banner-orbit {
  position: absolute;
  right: 24px;
  bottom: 22px;
  width: min(38vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.18);
  animation: eventBannerFloat 7s ease-in-out infinite;
}

.event-banner-copy {
  position: absolute;
  left: 24px;
  bottom: 24px;
  max-width: min(620px, calc(100% - 48px));
  display: grid;
  gap: 10px;
}

.event-banner-copy span {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: #1e1c2c;
  font-size: 13px;
  font-weight: 800;
}

.event-banner-copy strong {
  width: fit-content;
  border-radius: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.90);
  color: #1e1c2c;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.18;
  box-shadow: 0 16px 45px rgba(30, 28, 44, 0.16);
}

@keyframes eventBannerSweep {
  0%, 45% {
    left: -35%;
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  100% {
    left: 120%;
    opacity: 0;
  }
}

@keyframes eventBannerFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-10px, -8px, 0) scale(1.03);
  }
}

.event-back-link {
  display: inline-flex;
  margin-bottom: 14px;
  color: #6c95a0;
  font-weight: 800;
  text-decoration: none;
}

.event-key-info {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.event-key-info div {
  grid-template-columns: 1fr;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.event-key-info strong {
  color: #1e1c2c;
}

.event-register-panel {
  padding: 22px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 35px rgba(30, 28, 44, 0.10);
}

.event-register-panel h2 {
  margin: 0 0 8px;
  color: #1e1c2c;
}

.event-gallery-section h2 {
  margin-top: 0;
  color: #1e1c2c;
}

.event-intro-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.event-intro-gallery figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(30, 28, 44, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(30, 28, 44, 0.08);
}

.event-intro-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #fff;
}

.event-login-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.event-registration-form,
.event-admin-form {
  display: grid;
  gap: 16px;
}

.participant-card {
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: rgba(250, 229, 174, 0.18);
}

.participant-card legend {
  padding: 0 8px;
  color: #1e1c2c;
  font-weight: 800;
}

.event-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-form-grid label,
.event-registration-form label,
.event-admin-form label {
  display: grid;
  gap: 6px;
  color: #5a5868;
  font-size: 14px;
  font-weight: 700;
}

.event-form-grid input,
.event-form-grid select,
.event-registration-form input,
.event-registration-form textarea,
.event-admin-form input,
.event-admin-form select,
.event-admin-form textarea {
  width: 100%;
  border: 1px solid rgba(30, 28, 44, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #1e1c2c;
  font: inherit;
}

.event-consent-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(179, 164, 255, 0.10);
}

.event-consent-box label,
.event-option-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.event-submit-status {
  min-height: 1.6em;
  margin: 0;
  color: #bd3f4e;
  font-weight: 800;
}

.event-submit-status.is-success {
  color: #2f8b57;
}

.event-submit-status.is-warning {
  color: #946200;
}

.event-admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.event-media-admin {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 16px;
  padding: 16px;
  background: rgba(250, 229, 174, 0.16);
}

.event-media-admin-head,
.event-media-uploader,
.event-media-field {
  display: grid;
  gap: 10px;
}

.event-media-admin-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.event-media-admin-head strong,
.event-media-field strong {
  display: block;
  color: #1e1c2c;
}

.event-media-admin-head span,
.event-media-field span,
#eventMediaStatus {
  color: #888596;
  font-size: 13px;
}

#eventMediaStatus.is-success {
  color: #2f8b57;
  font-weight: 800;
}

#eventMediaStatus.is-warning {
  color: #bd3f4e;
  font-weight: 800;
}

.event-media-uploader {
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
}

.event-banner-preview {
  min-height: 150px;
  display: grid;
  place-items: end start;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 14px;
  padding: 12px;
  background-position: center;
  background-size: cover;
  color: #1e1c2c;
  font-weight: 800;
}

.event-banner-preview span {
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.86);
}

.event-banner-preview.is-empty {
  place-items: center;
  background:
    linear-gradient(135deg, rgba(254, 223, 106, 0.34), rgba(179, 164, 255, 0.14));
  color: #888596;
}

.event-intro-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.event-intro-thumb {
  overflow: hidden;
  position: relative;
  min-height: 120px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 14px;
  background: #fff;
}

.event-intro-thumb img {
  width: 100%;
  height: 120px;
  display: block;
  object-fit: cover;
}

.event-intro-thumb button {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(30, 28, 44, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.event-file-button {
  width: fit-content;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 28, 44, 0.16);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: #1e1c2c !important;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(30, 28, 44, 0.08);
  cursor: pointer;
}

.event-file-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(254, 223, 106, 0.84);
  box-shadow: 0 12px 24px rgba(30, 28, 44, 0.12);
}

.event-file-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.event-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-event-list,
.admin-registration-list {
  display: grid;
  gap: 10px;
}

.admin-event-card {
  width: 100%;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  text-align: left;
  color: #1e1c2c;
  cursor: pointer;
}

.admin-event-card.is-active {
  border-color: #fedf6a;
  background: rgba(254, 223, 106, 0.18);
}

.full-row {
  display: grid;
  gap: 6px;
}

.event-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-registration-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.admin-registration-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #1e1c2c;
}

.admin-registration-card ul {
  margin: 0;
  padding-left: 18px;
  color: #626171;
}

@media (max-width: 820px) {
  .events-hero,
  .event-detail-hero,
  .event-admin-layout {
    grid-template-columns: 1fr;
  }

  .event-form-grid,
  .event-key-info,
  .event-media-uploader,
  .event-media-admin-head,
  .event-card.is-featured .event-card-body {
    grid-template-columns: 1fr;
  }

  .event-card.is-featured h3,
  .event-card.is-featured p,
  .event-card.is-featured dl,
  .event-card.is-featured .primary-action {
    grid-column: auto;
    grid-row: auto;
  }

  .event-banner-showcase {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-card.is-featured,
  .event-card.is-featured::before,
  .event-card.is-featured .event-card-cover::before,
  .event-card.is-featured .primary-action,
  .policy-video-play::before,
  .policy-video-play::after,
  .event-banner-showcase::after,
  .event-banner-orbit {
    animation: none;
    transition: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--gray);
  background: var(--white);
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="file"],
select,
summary {
  cursor: pointer;
}

button,
input,
select {
  font: inherit;
}

.ntpc-dashboard {
  --ntpc-yellow: #fedf6a;
  --ntpc-yellow-soft: #FAE5AE;
  --ntpc-cyan: #DDF7F6;
  --ntpc-cyan-strong: #71C8D4;
  --ntpc-ink: #1e1c2c;
  --ntpc-ink-deep: #272532;
  --ntpc-muted: #787482;
  --ntpc-line: rgba(30, 28, 44, 0.13);
  --ntpc-panel: rgba(255, 255, 255, 0.84);
  --ntpc-red: #EC5D69;
  --ntpc-orange: #F4A742;
  --ntpc-shadow: 0 20px 60px rgba(30, 28, 44, 0.12);
  --ntpc-soft-shadow: 0 12px 28px rgba(30, 28, 44, 0.08);
  --ntpc-radius: 18px;
  --ntpc-ease: cubic-bezier(.2,.8,.2,1);
  color: var(--ntpc-ink);
  padding: clamp(22px, 3vw, 38px) 0 clamp(42px, 6vw, 72px);
  background:
    radial-gradient(circle at 7% 4%, rgba(254, 223, 106, 0.42), transparent 24%),
    radial-gradient(circle at 92% 3%, rgba(113, 200, 212, 0.22), transparent 22%),
    linear-gradient(180deg, #FFFFFF 0%, #FBFBFD 44%, #F8FAFB 100%);
}

.section.ntpc-dashboard {
  padding: clamp(22px, 3vw, 38px) 0 clamp(42px, 6vw, 72px);
}

.ntpc-shell {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
}

.ntpc-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "title topics"
    "scope scope";
  gap: 8px 18px;
  align-items: end;
  min-height: 112px;
  padding: 10px 16px 10px 28px;
  border: 1px solid var(--ntpc-line);
  border-radius: var(--ntpc-radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--ntpc-soft-shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.ntpc-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: linear-gradient(180deg, var(--ntpc-yellow), var(--ntpc-cyan-strong));
}

.ntpc-title-block {
  grid-area: title;
  min-width: 330px;
}

.ntpc-title-row {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  white-space: nowrap;
}

.ntpc-title-row h1 {
  margin: 0;
  color: var(--ntpc-ink-deep);
  font-size: clamp(29px, 2.7vw, 36px);
  line-height: 1.12;
  font-weight: 950;
}

.ntpc-title-row span {
  color: var(--ntpc-ink-deep);
  font-size: 18px;
  font-weight: 950;
}

.ntpc-title-block p {
  margin: 5px 0 0;
  color: var(--ntpc-muted);
  font-size: 13px;
  font-weight: 800;
}

.ntpc-title-block p:not(.published) {
  color: var(--ntpc-ink);
}

.ntpc-topic-grid {
  grid-area: topics;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
}

.ntpc-topic-button {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  justify-items: start;
  align-items: center;
  width: min(164px, 100%);
  min-height: 45px;
  padding: 6px 10px;
  border: 1px solid var(--ntpc-line);
  border-radius: 12px;
  color: var(--ntpc-ink);
  background: rgba(255,255,255,.7);
  text-align: left;
  transition: transform .2s var(--ntpc-ease), border-color .2s var(--ntpc-ease), background .2s var(--ntpc-ease), box-shadow .2s var(--ntpc-ease);
}

.ntpc-topic-button:hover,
.ntpc-topic-button.active {
  transform: translateY(-2px);
  border-color: rgba(113, 200, 212, .7);
  background: linear-gradient(180deg, #FFFFFF, #F0FCFC);
  box-shadow: 0 12px 28px rgba(91, 157, 230, .12);
}

.ntpc-topic-button.active {
  box-shadow: inset 0 0 0 2px rgba(254, 223, 106, .9), 0 12px 28px rgba(254, 223, 106, .18);
}

.ntpc-topic-icon {
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  width: 27px;
  height: 27px;
  border-radius: 10px;
  background: var(--ntpc-yellow-soft);
  color: var(--ntpc-ink-deep);
}

.ntpc-topic-icon svg {
  width: 17px;
  height: 17px;
}

.ntpc-topic-button strong {
  color: var(--ntpc-ink-deep);
  font-size: 12.5px;
  font-weight: 950;
  line-height: 1.1;
}

.ntpc-topic-button span:last-child {
  color: var(--ntpc-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.ntpc-scope-row {
  grid-area: scope;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ntpc-scope-tabs,
.ntpc-metric-switch {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--ntpc-line);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--ntpc-soft-shadow);
}

.ntpc-scope-tabs button,
.ntpc-metric-switch button {
  min-height: 32px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: var(--ntpc-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 950;
  transition: background .18s var(--ntpc-ease), color .18s var(--ntpc-ease), transform .18s var(--ntpc-ease);
}

.ntpc-scope-tabs button:hover,
.ntpc-metric-switch button:hover {
  color: var(--ntpc-ink-deep);
  background: var(--ntpc-cyan);
}

.ntpc-scope-tabs button.active {
  color: var(--ntpc-ink-deep);
  background: var(--ntpc-yellow);
  box-shadow: 0 8px 18px rgba(254, 223, 106, .28);
}

.ntpc-metric-switch {
  gap: 5px;
  background: rgba(30, 28, 44, .06);
  box-shadow: none;
}

.ntpc-metric-switch button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.ntpc-metric-switch button.active {
  color: var(--ntpc-ink-deep);
  background: var(--white);
  box-shadow: 0 6px 18px rgba(30, 28, 44, .1);
}

.ntpc-period {
  margin: 0;
  color: var(--ntpc-muted);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.ntpc-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(360px, .82fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.ntpc-panel,
.ntpc-main-insight {
  border: 1px solid var(--ntpc-line);
  border-radius: var(--ntpc-radius);
  background: var(--ntpc-panel);
  box-shadow: var(--ntpc-shadow);
  backdrop-filter: blur(18px);
  animation: ntpcSoftIn .42s var(--ntpc-ease) both;
}

.ntpc-panel {
  padding: 18px;
}

@keyframes ntpcSoftIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ntpc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ntpc-panel-head.compact {
  margin-bottom: 10px;
}

.ntpc-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ntpc-panel-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: var(--ntpc-ink-deep);
  background: var(--ntpc-cyan);
  flex: 0 0 auto;
}

.ntpc-panel-icon svg {
  width: 25px;
  height: 25px;
}

.ntpc-panel h2,
.ntpc-panel h3,
.ntpc-main-insight h3 {
  margin: 0;
  color: var(--ntpc-ink-deep);
  font-weight: 950;
  line-height: 1.2;
}

.ntpc-panel h2 {
  font-size: 21px;
}

.ntpc-panel h3,
.ntpc-main-insight h3 {
  font-size: 17px;
}

.ntpc-panel p,
.ntpc-main-insight p {
  margin: 4px 0 0;
  color: var(--ntpc-muted);
  font-size: 13px;
  font-weight: 780;
}

.ntpc-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.ntpc-kpi {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--ntpc-line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}

.ntpc-kpi-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: var(--ntpc-ink-deep);
  background: var(--ntpc-yellow-soft);
  flex: 0 0 auto;
}

.ntpc-kpi-icon svg {
  width: 23px;
  height: 23px;
}

.ntpc-kpi span {
  display: block;
  color: var(--ntpc-muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.ntpc-kpi strong {
  display: block;
  margin-top: 2px;
  color: var(--ntpc-ink-deep);
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.ntpc-bars {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.ntpc-bar-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 10px;
}

.ntpc-bar-label,
.ntpc-bar-value {
  color: var(--ntpc-ink-deep);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.ntpc-bar-value {
  text-align: right;
}

.ntpc-bar-track {
  position: relative;
  height: 20px;
  border-radius: 999px;
  background: rgba(30, 28, 44,.08);
  overflow: hidden;
}

.ntpc-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ntpc-cyan-strong), #5B9DE6);
}

.ntpc-bar-row.highlight .ntpc-bar-fill {
  background: linear-gradient(90deg, var(--ntpc-yellow), var(--ntpc-orange));
}

.ntpc-district-map {
  position: relative;
  min-height: 352px;
  margin-top: 14px;
  border: 1px solid rgba(113, 200, 212, .32);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(221,247,246,.9), rgba(255,255,255,.74)),
    radial-gradient(circle at 24% 68%, rgba(254, 223, 106,.36), transparent 28%),
    radial-gradient(circle at 78% 28%, rgba(123, 98, 255,.11), transparent 25%);
}

.ntpc-district-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 28, 44,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 28, 44,.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  pointer-events: none;
}

.ntpc-map-region {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 18px;
  color: var(--ntpc-ink-deep);
  background: color-mix(in srgb, var(--c), white 20%);
  box-shadow: 0 10px 24px rgba(30, 28, 44, .12);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
  transition: transform .18s var(--ntpc-ease), box-shadow .18s var(--ntpc-ease);
}

.ntpc-map-region:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(30, 28, 44, .16);
}

.ntpc-map-region.xinzhuang {
  outline: 4px solid rgba(254, 223, 106, .88);
  z-index: 2;
}

.ntpc-map-region small {
  display: block;
  margin-top: 2px;
  color: rgba(39,37,50,.72);
  font-size: 10.5px;
  font-weight: 900;
}

.ntpc-map-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--ntpc-soft-shadow);
  color: var(--ntpc-muted);
  font-size: 11.5px;
  font-weight: 900;
}

.ntpc-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--c);
}

.ntpc-insight-stack {
  display: grid;
  gap: 12px;
}

.ntpc-main-insight {
  padding: 18px;
  background: linear-gradient(135deg, var(--ntpc-yellow-soft), #FFFFFF 78%);
  border-color: rgba(254, 223, 106, .58);
}

.ntpc-main-insight span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ntpc-muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .02em;
}

.ntpc-main-insight h3 {
  margin-top: 8px;
  font-size: 21px;
  line-height: 1.35;
}

.ntpc-main-insight p {
  margin-top: 10px;
  color: var(--ntpc-ink);
  font-size: 14px;
  font-weight: 760;
}

.ntpc-rank-list {
  display: grid;
  gap: 8px;
  max-height: 226px;
  overflow: auto;
  padding-right: 4px;
}

.ntpc-rank-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--ntpc-line);
  border-radius: 14px;
  background: rgba(255,255,255,.7);
}

.ntpc-rank-no {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--ntpc-ink-deep);
  background: var(--ntpc-yellow);
  font-size: 12px;
  font-weight: 950;
}

.ntpc-rank-row strong {
  display: block;
  color: var(--ntpc-ink-deep);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.ntpc-rank-row span:not(.ntpc-rank-no):not(.ntpc-rank-value) {
  color: var(--ntpc-muted);
  font-size: 12px;
  font-weight: 800;
}

.ntpc-rank-value {
  color: var(--ntpc-ink-deep);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.ntpc-trend {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 5px;
  height: 116px;
  padding: 12px 4px 0;
}

.ntpc-trend i {
  display: block;
  height: var(--h);
  min-height: 12px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--ntpc-yellow), var(--ntpc-orange));
}

.ntpc-source-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.ntpc-source-item {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--ntpc-line);
  border-radius: 16px;
  background: rgba(255,255,255,.68);
}

.ntpc-source-item span {
  display: block;
  color: var(--ntpc-muted);
  font-size: 11.5px;
  font-weight: 900;
}

.ntpc-source-item strong {
  display: block;
  margin-top: 4px;
  color: var(--ntpc-ink-deep);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.35;
}

.ntpc-source-item em {
  display: block;
  margin-top: 5px;
  color: var(--ntpc-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
}

.ntpc-footnote {
  margin: 22px 0 0;
  color: var(--ntpc-muted);
  font-size: 12.5px;
  font-weight: 760;
  text-align: center;
}

@media (max-width: 1120px) {
  .ntpc-hero,
  .ntpc-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .ntpc-topic-grid {
    flex-wrap: wrap;
  }

  .ntpc-source-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .ntpc-shell {
    width: min(100% - 22px, 1440px);
  }

  .ntpc-hero {
    padding: 12px 12px 12px 22px;
  }

  .ntpc-title-block {
    min-width: 0;
  }

  .ntpc-title-row {
    white-space: normal;
  }

  .ntpc-topic-grid,
  .ntpc-kpis,
  .ntpc-source-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ntpc-topic-button {
    width: 100%;
  }

  .ntpc-scope-tabs {
    width: 100%;
  }

  .ntpc-scope-tabs button {
    flex: 1;
    padding-inline: 10px;
  }

  .ntpc-bar-row {
    grid-template-columns: 74px minmax(0, 1fr) 64px;
  }

  .ntpc-district-map {
    min-height: 430px;
  }

  .ntpc-map-region {
    font-size: 11px;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding: 10px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 clamp(455px, 35vw, 540px);
  min-width: clamp(455px, 35vw, 540px);
}

.brand-logo {
  display: block;
  width: 132px;
  height: auto;
  flex: 0 0 auto;
  image-rendering: auto;
}

.brand strong,
.brand small {
  display: block;
}

.brand-text {
  display: grid;
  gap: 4px;
  min-width: 0;
  justify-items: start;
}

.brand small {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  max-width: 100%;
}

.brand strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink);
  font-size: clamp(17px, 1.16vw, 20px);
  font-weight: 950;
  line-height: 1.12;
  white-space: nowrap;
}

.brand-title-main {
  color: var(--ink);
}

.brand-title-divider {
  color: rgba(123, 98, 255, 0.46);
  font-weight: 800;
}

.brand-title-platform {
  padding: 0 2px 1px;
  color: var(--gray);
  background: linear-gradient(transparent 62%, rgba(249, 201, 6, 0.48) 0);
}

.env-poc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 3px 8px;
  border: 2px solid var(--berry);
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--berry), var(--purple));
  box-shadow: 0 8px 20px rgba(233, 75, 122, 0.22);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.04em;
  vertical-align: middle;
  white-space: nowrap;
}

.auth-brand .env-poc-badge {
  margin-left: 10px;
  font-size: 11px;
}

.brand-subtitle-lead {
  min-width: 0;
  color: var(--purple);
  font-size: 12px;
  font-weight: 950;
  justify-self: end;
  letter-spacing: 0.03em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-subtitle-tags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.brand-subtitle-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  justify-content: center;
  padding: 1px 6px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 999px;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.2);
  font-size: 11.5px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.nav {
  display: flex;
  flex: 1;
  min-width: 0;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--gray);
  font-weight: 900;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: rgba(123, 98, 255, 0.18);
  color: var(--purple);
  background: rgba(179, 164, 255, 0.16);
  box-shadow: 0 8px 18px rgba(123, 98, 255, 0.12);
  transform: translateY(-1px);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: var(--yellow);
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  gap: 12px;
  margin-left: auto;
}

.member-menu {
  position: relative;
}

.social-menu {
  position: relative;
}

.member-button,
.avatar-button,
.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--purple);
  background: var(--white);
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.avatar-button,
.social-button {
  position: relative;
  gap: 9px;
  height: 48px;
  min-height: 48px;
  width: auto;
  min-width: 0;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  border-color: rgba(123, 98, 255, 0.24);
  color: var(--gray);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 245, 0.96)),
    var(--white);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 8px 20px rgba(30, 28, 44, 0.08);
  overflow: visible;
}

.avatar-button::before,
.social-button::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(249, 201, 6, 0.75), rgba(179, 164, 255, 0.48));
  opacity: 0.72;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.avatar-button::after,
.social-button::after {
  display: inline-flex;
  align-items: center;
  color: var(--gray);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.avatar-button::after {
  content: "個人設定";
}

.social-button::after {
  content: "社群追蹤";
}

.member-button:hover,
.avatar-button:hover,
.social-button:hover,
.member-button:focus-visible,
.avatar-button:focus-visible,
.social-button:focus-visible {
  border-color: rgba(123, 98, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 250, 222, 0.96)),
    var(--white);
  box-shadow: 0 12px 28px rgba(123, 98, 255, 0.16);
  transform: translateY(-2px);
}

.avatar-button:hover::before,
.social-button:hover::before,
.avatar-button:focus-visible::before,
.social-button:focus-visible::before {
  opacity: 1;
  transform: scale(1.02);
}

.social-button {
  border-color: rgba(123, 98, 255, 0.24);
}

.social-button img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--yellow);
  box-shadow:
    0 0 0 2px rgba(249, 201, 6, 0.8),
    0 4px 10px rgba(30, 28, 44, 0.12);
}

.avatar-button {
  border-color: rgba(123, 98, 255, 0.24);
}

.avatar-button img {
  width: 36px;
  height: 36px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  object-fit: cover;
  background: var(--lavender);
  box-shadow: 0 4px 10px rgba(30, 28, 44, 0.12);
}

.avatar-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.member-dropdown,
.social-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1300;
  display: none;
  min-width: 148px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.social-dropdown {
  min-width: 132px;
}

.member-menu.is-open .member-dropdown,
.social-menu.is-open .social-dropdown {
  display: grid;
  gap: 4px;
}

.member-menu:hover .member-dropdown,
.member-menu:focus-within .member-dropdown {
  display: none;
}

.member-menu.is-open .member-dropdown {
  display: grid;
  gap: 4px;
}

.member-identity-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1290;
  display: none;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.member-menu:hover:not(.is-open) .member-identity-popover {
  display: grid;
  gap: 2px;
}

.member-identity-popover strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.member-identity-popover span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.member-dropdown a,
.social-dropdown a,
.dropdown-button {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--gray);
  border: 0;
  background: transparent;
  font-weight: 800;
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.member-dropdown a:hover,
.social-dropdown a:hover,
.dropdown-button:hover {
  color: var(--purple);
  background: rgba(179, 164, 255, 0.16);
}

.modal-open {
  overflow: hidden;
}

.logout-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.logout-modal.is-open {
  display: flex;
}

.logout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 34, 36, 0.46);
  backdrop-filter: blur(7px);
}

.logout-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 90px rgba(30, 28, 44, 0.26);
}

.logout-modal__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--gray);
  background: var(--yellow);
  font-weight: 900;
}

.logout-modal h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 22px;
}

.logout-modal p {
  margin: 0;
  color: var(--muted);
}

.logout-modal__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.support-link,
.primary-action,
.secondary-action,
.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.support-link:hover,
.primary-action:hover,
.secondary-action:hover,
.login-button:hover,
.support-link:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.login-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(123, 98, 255, 0.16);
}

.support-link,
.primary-action {
  color: var(--gray);
  background: var(--yellow);
}

.secondary-action,
.login-button {
  color: var(--purple);
  background: var(--white);
  border-color: var(--line);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 72px);
  background:
    linear-gradient(135deg, rgba(179, 164, 255, 0.26), rgba(249, 201, 6, 0.18) 58%, rgba(255, 255, 255, 0.96) 58%),
    var(--white);
}

.auth-card {
  width: min(100%, 520px);
  display: grid;
  gap: 22px;
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand img {
  width: 118px;
  height: auto;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.auth-brand small {
  color: var(--muted);
  font-weight: 800;
}

.auth-card h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(30px, 5vw, 42px);
}

.auth-card p {
  margin: 0;
  color: var(--muted);
}

.provider-login-button {
  justify-content: flex-start;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
}

.provider-logo {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.line-mark {
  width: 44px;
  border-radius: 8px;
  color: #fff;
  background: #06C755;
  font-size: 11px;
}

.google-mark {
  color: #4285F4;
  background:
    conic-gradient(from -45deg, #4285F4 0 25%, #34A853 0 50%, #FBBC05 0 75%, #EA4335 0 100%);
}

.google-mark::first-letter {
  color: #fff;
}

.home-carousel {
  display: block;
  padding: clamp(4px, 1vw, 12px) clamp(18px, 6vw, 78px) clamp(22px, 4vw, 48px);
  background: #F7F2E8;
}

.carousel-stage {
  position: relative;
  width: min(1180px, 100%);
  height: auto;
  margin: 0 auto;
  overflow: visible;
  border-radius: 8px;
  background: var(--white);
  touch-action: pan-y;
  user-select: none;
  box-shadow: 0 18px 60px rgba(30, 28, 44, 0.12);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 56px;
  padding: 0;
  color: var(--gray);
  opacity: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #F7F2E8;
  transform: translateX(24px);
  transition: opacity 0.48s ease, transform 0.48s ease;
  pointer-events: none;
}

.carousel-slide::before {
  content: "";
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 900;
  min-height: 0;
  background:
    var(--slide-image) center center / contain no-repeat,
    #F7F2E8;
  border-bottom: 1px solid rgba(123, 98, 255, 0.12);
}

.carousel-slide.active {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.carousel-slide > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  max-width: none;
  align-content: center;
  min-height: 56px;
  padding: 8px clamp(18px, 4vw, 48px) 24px;
  background: #F7F2E8;
}

.carousel-slide span {
  color: var(--purple);
  font-weight: 900;
}

.carousel-slide h2 {
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  overflow: hidden;
  font-size: 13pt;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-slide p {
  max-width: 880px;
  margin: 0;
  color: #514B4A;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.56;
  white-space: pre-line;
}

.carousel-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 8px;
  color: var(--gray);
  background: var(--yellow);
  font-weight: 900;
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(123, 98, 255, 0.24);
  border-radius: 50%;
  color: var(--purple);
  background: rgba(255, 255, 255, 0.78);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  border-color: rgba(123, 98, 255, 0.42);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(30, 28, 44, 0.18);
  transform: translateY(-50%) scale(1.04);
}

.carousel-control.prev {
  left: -58px;
}

.carousel-control.next {
  right: -58px;
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(123, 98, 255, 0.2);
  border-radius: 50%;
  background: rgba(123, 98, 255, 0.24);
  cursor: pointer;
}

.carousel-dots button.active {
  width: 24px;
  border-radius: 999px;
  border-color: var(--purple);
  background: var(--purple);
}

.home-dashboard-highlights {
  display: grid;
  gap: 12px;
  align-content: end;
}

.home-dashboard-highlights article,
.content-card,
.civic-link-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(30, 28, 44, 0.08);
}

.home-dashboard-highlights span,
.content-card span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-dashboard-highlights strong {
  display: block;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

.home-dashboard-highlights small,
.content-card p,
.civic-link-group span {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(34px, 6vw, 84px) clamp(18px, 6vw, 78px);
  background:
    linear-gradient(120deg, rgba(179, 164, 255, 0.22), rgba(249, 201, 6, 0.16) 52%, #fff 52%),
    var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--berry);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
  font-weight: 950;
}

h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

h3 {
  color: var(--ink);
}

.lead {
  max-width: 720px;
  color: var(--gray);
  font-size: 19px;
}

.hero-actions,
.login-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
  max-width: 680px;
}

.hero-stats div,
.dashboard-card,
.quick-item,
.activity,
.admin-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.hero-stats div {
  padding: 18px;
}

.hero-stats strong {
  display: block;
  color: var(--purple);
  font-size: 28px;
  line-height: 1;
}

.hero-stats span {
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  position: relative;
  justify-self: center;
  align-self: start;
  margin-top: -26px;
}

.hero-visual img {
  display: block;
  width: min(112%, 625px);
  max-height: 84vh;
  object-fit: contain;
  filter: drop-shadow(0 24px 42px rgba(30, 28, 44, 0.20));
}

.signal-card {
  position: absolute;
  right: -18px;
  bottom: 28px;
  display: grid;
  gap: 2px;
  min-width: 238px;
  padding: 16px 18px 16px 44px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.signal-dot {
  position: absolute;
  top: 22px;
  left: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(249, 201, 6, 0.25);
}

.signal-card span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 6vw, 78px);
}

.section[id],
.page-section[id] {
  scroll-margin-top: 92px;
}

.band {
  background: var(--soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading p:not(.eyebrow),
.split > div > p,
.join-copy p,
.admin > div > p {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.content-card-grid,
.civic-link-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.content-card h3,
.civic-link-group h3 {
  margin: 6px 0 8px;
  color: var(--ink);
}

.policy-page {
  padding-top: clamp(18px, 2.8vw, 38px);
  background:
    linear-gradient(180deg, rgba(179, 164, 255, 0.14), rgba(255, 255, 255, 0) 220px),
    var(--white);
}

.policy-page .section-heading {
  max-width: none;
  margin-bottom: 18px;
}

.policy-page .section-heading h2 {
  margin-bottom: 0;
}

.home-policy {
  padding-top: clamp(22px, 3vw, 44px);
}

.home-policy .section-heading {
  margin-bottom: 16px;
}

.policy-lead {
  display: grid;
  grid-template-columns: minmax(420px, 1.06fr) minmax(360px, 0.94fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
  width: min(100%, 1540px);
  margin: 0 0 26px;
}

.policy-card-heading {
  margin: 0 0 14px;
}

.policy-card-heading h2 {
  margin: 0;
  color: var(--purple);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.3;
}

.policy-story {
  margin: -8px 0 28px;
  padding: clamp(20px, 3vw, 30px);
  border-left: 6px solid var(--yellow);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(30, 28, 44, 0.08);
}

.policy-lead .policy-story {
  margin: 0;
}

.policy-story h3 {
  margin: 0 0 12px;
  color: var(--purple);
  font-size: clamp(22px, 3vw, 30px);
}

.policy-story-quote {
  display: block;
  width: clamp(54px, 7vw, 86px);
  height: auto;
  margin: 0 0 12px;
  object-fit: contain;
}

.policy-story p {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.9;
}

.policy-story p + p {
  margin-top: 12px;
}

.policy-story.typewriter-active p {
  position: relative;
}

.policy-story p.is-waiting {
  min-height: 1.9em;
}

.policy-story p.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.12em;
  margin-left: 4px;
  border-radius: 999px;
  background: #b3a4ff;
  vertical-align: -0.16em;
  animation: policyTypingCursor 0.78s steps(1, end) infinite;
}

@keyframes policyTypingCursor {
  0%,
  52% {
    opacity: 1;
  }
  53%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .policy-story p.is-typing::after {
    display: none;
  }
}

.policy-video {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(179, 164, 255, 0.18), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 42px rgba(30, 28, 44, 0.08);
}

.policy-video[hidden] {
  display: none;
}

.policy-video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background:
    radial-gradient(circle at 74% 18%, rgba(254, 223, 106, 0.34), transparent 32%),
    linear-gradient(135deg, rgba(123, 98, 255, 0.18), rgba(30, 28, 44, 0.92));
  box-shadow:
    0 20px 46px rgba(30, 28, 44, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.policy-video-frame iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

.policy-video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.10), transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 0 22%, rgba(30, 28, 44, 0.22) 68%, rgba(30, 28, 44, 0.38));
  opacity: 0.9;
  transition: opacity 260ms ease;
}

.policy-video-frame.is-playing::after {
  opacity: 0;
}

.policy-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  inline-size: clamp(56px, 6.45vw, 74px);
  block-size: clamp(56px, 6.45vw, 74px);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #ff3131, #ff0000 58%, #cc0000);
  color: var(--white);
  box-shadow:
    0 18px 34px rgba(255, 49, 49, 0.36),
    0 0 0 10px rgba(255, 49, 49, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.policy-video-play::before,
.policy-video-play::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  border: 2px solid rgba(255, 49, 49, 0.52);
  animation: policyVideoPulse 2.2s ease-out infinite;
}

.policy-video-play::after {
  inset: -22px;
  animation-delay: 0.55s;
  border-color: rgba(255, 49, 49, 0.42);
}

.policy-video-play span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 19px solid currentColor;
  filter: drop-shadow(0 2px 5px rgba(30, 28, 44, 0.25));
}

.policy-video-play:hover,
.policy-video-play:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow:
    0 22px 46px rgba(255, 49, 49, 0.46),
    0 0 0 14px rgba(255, 49, 49, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.policy-video-frame.is-playing .policy-video-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

@keyframes policyVideoPulse {
  0% {
    opacity: 0.86;
    transform: scale(0.86);
  }

  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.policy-video-meta {
  display: grid;
  gap: 8px;
}

.policy-video-meta span {
  color: var(--berry);
  font-size: 12px;
  font-weight: 900;
}

.policy-video-meta h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.policy-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.policy-video-actions a,
.policy-video-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(123, 98, 255, 0.22);
  border-radius: 999px;
  background: var(--white);
  color: var(--purple);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.policy-video-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.policy-video-actions a:hover,
.policy-video-actions button:not(:disabled):hover {
  border-color: var(--purple);
  background: rgba(249, 201, 6, 0.26);
}

.policy-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.policy-card-grid .content-card {
  display: grid;
  gap: 8px;
  align-content: start;
  border-top: 4px solid var(--purple);
}

.policy-card-grid .content-card span {
  color: var(--berry);
}

.policy-card-grid .content-card h3 {
  font-size: 20px;
  line-height: 1.35;
}

.policy-card-grid .content-card p {
  margin: 0;
  line-height: 1.75;
}

.policy-card-grid .content-card p strong {
  color: var(--gray);
}

.redirect-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.civic-link-group {
  display: grid;
  gap: 10px;
}

.civic-link-group a {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.dashboard-card {
  min-height: 190px;
  padding: 22px;
}

.dashboard-card .metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 10px;
}

.dashboard-card .metric strong {
  color: var(--purple);
  font-size: 38px;
  line-height: 1;
}

.dashboard-card .metric span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-card p {
  color: var(--muted);
  font-size: 14px;
}

.data-freshness {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  margin-top: 22px;
}

.news-panel,
.source-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.news-panel h3,
.source-panel h3 {
  margin-bottom: 6px;
}

.news-panel p,
.source-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.news-list,
.source-list {
  display: grid;
  gap: 10px;
}

.news-item,
.source-item {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(179, 164, 255, 0.08);
}

.news-item strong,
.source-item strong {
  color: var(--ink);
  line-height: 1.35;
}

.news-item span,
.news-item small,
.source-item small {
  color: var(--muted);
  font-size: 12px;
}

.news-item small {
  color: var(--purple);
  font-weight: 800;
}

.status {
  display: inline-flex;
  padding: 3px 9px;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.map-panel {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.map-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tool,
.chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gray);
  background: var(--white);
  cursor: pointer;
}

.tool.active,
.chip.active {
  color: var(--gray);
  border-color: var(--yellow);
  background: var(--yellow);
  font-weight: 800;
}

.map-canvas {
  position: relative;
  height: clamp(380px, 58vh, 560px);
  min-height: 380px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(123, 98, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(123, 98, 255, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, #fff, rgba(179, 164, 255, 0.22));
  background-size: 46px 46px, 46px 46px, auto;
}

.leaflet-traffic-map {
  isolation: isolate;
  background: #eef1ec;
}

.leaflet-traffic-map .leaflet-control-attribution {
  font-size: 10px;
}

.leaflet-summary-card {
  display: grid;
  gap: 2px;
  max-width: min(360px, calc(100vw - 52px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(30, 28, 44, 0.16);
}

.leaflet-summary-card strong {
  color: var(--gray);
  font-size: 15px;
}

.leaflet-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.traffic-popup {
  display: grid;
  gap: 7px;
  min-width: 220px;
}

.traffic-popup strong {
  color: var(--purple);
  font-size: 15px;
}

.traffic-popup span,
.traffic-popup small {
  color: var(--muted);
}

.traffic-popup dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.traffic-popup dl div {
  padding: 8px;
  border-radius: 8px;
  background: rgba(179, 164, 255, 0.18);
}

.traffic-popup dt {
  color: var(--muted);
  font-size: 11px;
}

.traffic-popup dd {
  margin: 0;
  color: var(--gray);
  font-size: 18px;
  font-weight: 900;
}

.traffic-popup-details {
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.traffic-popup-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 2px;
  color: var(--purple);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.traffic-popup-details summary::-webkit-details-marker {
  display: none;
}

.traffic-popup-details summary b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(123, 98, 255, 0.12);
  transition: transform 0.18s ease;
}

.traffic-popup-details[open] summary b {
  transform: rotate(180deg);
}

.traffic-popup-details ul {
  display: grid;
  gap: 5px;
  max-height: 170px;
  overflow: auto;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.traffic-popup-details li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(179, 164, 255, 0.12);
}

.traffic-popup-details time {
  color: var(--gray);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.traffic-popup-details li span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.traffic-incident-detail {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.traffic-incident-detail > span {
  color: var(--gray);
  font-weight: 900;
}

.traffic-incident-detail small {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.traffic-incident-detail small b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 19px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(123, 98, 255, 0.1);
  font-size: 11px;
}

.traffic-pedestrian-badge {
  display: inline-flex;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #FFFFFF;
  background: var(--berry);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.map-district-shape {
  position: absolute;
  inset: 44px 12% 54px 10%;
  border: 2px solid rgba(123, 98, 255, 0.28);
  border-radius: 42% 58% 48% 52% / 44% 40% 60% 56%;
  background:
    radial-gradient(circle at 38% 48%, rgba(249, 201, 6, 0.20), transparent 34%),
    radial-gradient(circle at 60% 54%, rgba(179, 164, 255, 0.26), transparent 42%),
    rgba(255, 255, 255, 0.46);
}

.map-hotspot {
  position: absolute;
  z-index: 2;
  width: var(--hotspot-size, 34px);
  height: var(--hotspot-size, 34px);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 3px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--hotspot-color, var(--berry));
  box-shadow:
    0 10px 24px rgba(30, 28, 44, 0.24),
    0 0 0 calc(var(--hotspot-size, 34px) / 8) color-mix(in srgb, var(--hotspot-color, var(--berry)) 20%, transparent);
  cursor: pointer;
}

.map-hotspot strong {
  font-size: 13px;
  line-height: 1;
}

.map-hotspot > span {
  position: absolute;
  right: -6px;
  top: -8px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gray);
  background: var(--yellow);
  border: 1px solid var(--white);
  font-size: 10px;
  font-weight: 900;
}

.map-hotspot small {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: min(240px, 62vw);
  display: none;
  transform: translateX(-50%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gray);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(30, 28, 44, 0.18);
  text-align: left;
  line-height: 1.45;
}

.map-hotspot:hover,
.map-hotspot:focus-visible {
  z-index: 5;
  outline: none;
}

.map-hotspot:hover small,
.map-hotspot:focus-visible small {
  display: grid;
  gap: 3px;
}

.map-hotspot small b,
.map-hotspot small em {
  display: block;
}

.map-hotspot small em {
  color: var(--muted);
  font-style: normal;
}

.civic-dashboard {
  background:
    linear-gradient(180deg, rgba(248, 247, 252, 0.96), rgba(255, 255, 255, 0.98)),
    var(--soft);
}

.civic-dashboard > * {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: end;
  margin-bottom: 22px;
}

.dashboard-hero h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
}

.dashboard-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
}

.dashboard-live-card,
.dashboard-source-bar,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(30, 28, 44, 0.08);
}

.dashboard-live-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  align-items: center;
  padding: 16px 18px;
}

.dashboard-live-card .live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2A9D72;
  box-shadow: 0 0 0 6px rgba(42, 157, 114, 0.12);
}

.dashboard-live-card strong {
  color: var(--ink);
}

.dashboard-live-card span:last-child {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-source-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 12px 14px;
}

.dashboard-source-bar strong {
  color: var(--purple);
  margin-right: 4px;
}

.dashboard-source-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 999px;
  color: var(--gray);
  background: rgba(179, 164, 255, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-source-bar .status-verified {
  border-color: rgba(42, 157, 114, 0.24);
  color: #1F7A59;
  background: rgba(42, 157, 114, 0.12);
}

.dashboard-source-bar .status-stale {
  border-color: rgba(214, 133, 0, 0.28);
  color: #A46000;
  background: rgba(249, 201, 6, 0.16);
}

.dashboard-source-bar .status-fallback {
  border-color: rgba(123, 98, 255, 0.18);
  color: var(--purple);
  background: rgba(179, 164, 255, 0.12);
}

.civic-dashboard-v2 {
  padding-top: clamp(16px, 2.4vw, 30px);
}

.dashboard-v2-hero {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(520px, 680px);
  gap: clamp(16px, 2vw, 26px);
  align-items: end;
  margin-bottom: 14px;
}

.dashboard-v2-hero > * {
  min-width: 0;
}

.dashboard-v2-hero h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(30px, 3.1vw, 38px);
  line-height: 1.12;
}

.dashboard-v2-hero p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 800;
}

.dashboard-v2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.dashboard-v2-control-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dashboard-v2-hero .dashboard-update-note {
  margin: 0;
  max-width: 100%;
  color: #77716F;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

.dashboard-info-button,
.dashboard-support-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  color: var(--purple);
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-info-button {
  cursor: pointer;
  font: inherit;
}

.dashboard-info-button:hover,
.dashboard-info-button:focus-visible {
  border-color: rgba(123, 98, 255, 0.34);
  background: rgba(179, 164, 255, 0.16);
}

.panel-title-with-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.rank-info-button {
  position: relative;
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(123, 98, 255, 0.28);
  border-radius: 50%;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.12);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.rank-info-button::after {
  content: "排序邏輯：依事故數、死亡數、受傷數由大到小排序。三項數值相同時並列同名次。";
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 500;
  width: min(270px, 70vw);
  padding: 10px 12px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 14px 34px rgba(30, 28, 44, 0.16);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.rank-info-button:hover,
.rank-info-button:focus-visible {
  border-color: rgba(123, 98, 255, 0.5);
  background: rgba(179, 164, 255, 0.22);
}

.rank-info-button:hover::after,
.rank-info-button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dashboard-support-button {
  border-color: transparent;
  color: var(--ink);
  background: var(--yellow);
}

.dashboard-v2-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 22px;
  align-items: end;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(30, 28, 44, 0.05);
}

.dashboard-v2-filter.time-only {
  grid-template-columns: 1fr;
}

.dashboard-v2-filter span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-v2-filter label select,
.dashboard-v2-filter select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 800;
}

.dashboard-range-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
}

.dashboard-range-buttons button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-range-buttons button:hover,
.dashboard-range-buttons button:focus-visible {
  border-color: rgba(123, 98, 255, 0.34);
  background: rgba(179, 164, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(30, 28, 44, 0.08);
}

.dashboard-range-buttons button.active {
  border-color: transparent;
  color: var(--white);
  background: linear-gradient(135deg, var(--purple), #8068AD);
  box-shadow: 0 12px 24px rgba(123, 98, 255, 0.2);
}

.dashboard-v2-filter input[type="date"],
.dashboard-date-apply {
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 800;
}

.dashboard-v2-filter input[type="date"] {
  width: 150px;
  padding: 7px 10px;
}

.dashboard-date-apply {
  padding: 7px 18px;
  cursor: pointer;
}

.dashboard-range-warning {
  margin: 8px 0 0;
  color: #B4234E;
  font-size: 0.86rem;
  font-weight: 800;
}

.dashboard-range-warning[hidden] {
  display: none;
}

.dashboard-coverage {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid rgba(123, 98, 255, 0.16);
  border-radius: 8px;
  color: var(--gray);
  background: linear-gradient(90deg, rgba(179, 164, 255, 0.13), rgba(255, 255, 255, 0.9));
  box-shadow: 0 10px 26px rgba(30, 28, 44, 0.06);
}

.dashboard-coverage.warning {
  border-color: rgba(240, 160, 0, 0.34);
  background: linear-gradient(90deg, rgba(249, 201, 6, 0.22), rgba(255, 255, 255, 0.9));
}

.dashboard-coverage p {
  margin: 0;
  line-height: 1.45;
}

.dashboard-coverage strong {
  color: var(--purple);
}

.dashboard-area {
  margin-top: 16px;
  padding: clamp(16px, 2.2vw, 22px);
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(30, 28, 44, 0.08);
}

.traffic-first-screen {
  display: grid;
  gap: 12px;
  padding-top: 0;
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-section-heading {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 9px 14px 9px 10px;
  border: 1px solid rgba(123, 98, 255, 0.15);
  border-left: 6px solid #7b62ff;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(254, 223, 106, 0.92), rgba(255, 255, 255, 0.92) 48%, rgba(255, 255, 255, 0.78)),
    #ffffff;
  box-shadow: 0 18px 36px rgba(30, 28, 44, 0.08);
}

.dashboard-section-heading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 52%, rgba(123, 98, 255, 0.12) 52% 52.5%, transparent 52.5% 100%),
    radial-gradient(circle at 84% 50%, rgba(179, 164, 255, 0.18), transparent 22%);
}

.dashboard-section-title,
.dashboard-section-status {
  position: relative;
  z-index: 1;
}

.dashboard-section-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-section-title img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.dashboard-section-title h2 {
  margin: 0;
  color: #1e1c2c;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.dashboard-section-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4c4b5b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-section-status i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #38ba7d;
  box-shadow: 0 0 0 5px rgba(56, 186, 125, 0.12);
}

.resources-area {
  background:
    radial-gradient(circle at 88% 10%, rgba(249, 201, 6, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 247, 252, 0.92));
}

.area-header {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 0;
}

.traffic-first-screen .area-header {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.traffic-summary-controls {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.traffic-summary-controls .dashboard-update-note {
  margin: 0;
  color: #77716F;
  font-size: 11px !important;
  font-weight: 850;
  line-height: 1.25;
}

.area-title {
  display: grid;
  gap: 0;
  align-content: center;
}

.area-icon-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.area-title-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.area-title-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.area-title-note {
  margin: 3px 0 0;
  color: #77716F;
  font-size: 13px !important;
  font-weight: 800;
  line-height: 1.45;
}

.area-header h2 {
  margin: 0;
  color: var(--purple);
  font-size: clamp(23px, 2.2vw, 28px);
  line-height: 1.18;
}

.area-header p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

.area-tag {
  width: fit-content;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid rgba(123, 98, 255, 0.16);
  border-radius: 999px;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-insight-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 150px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--purple)) 32%, transparent);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(30, 28, 44, 0.08);
}

.dashboard-insight-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--accent, var(--purple));
  font-weight: 900;
}

.dashboard-insight-card h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 18px;
}

.dashboard-insight-card p {
  margin: 0;
  color: var(--gray);
  line-height: 1.55;
}

.dashboard-insight-card span {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent, var(--purple)) 78%, #111);
  background: color-mix(in srgb, var(--accent, var(--purple)) 12%, #fff);
  font-size: 12px;
  font-weight: 900;
}

.compact-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.traffic-first-screen .compact-kpis {
  align-self: center;
}

.dashboard-v2-kpi {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(30, 28, 44, 0.07);
}

.dashboard-v2-kpi i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--purple);
  font-style: normal;
  font-weight: 900;
}

.dashboard-v2-kpi i svg {
  width: 29px;
  height: 29px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-v2-kpi:nth-child(1) i {
  background: linear-gradient(135deg, #F05B7D, #C91F55);
  box-shadow: 0 12px 22px rgba(217, 90, 120, 0.3);
}

.dashboard-v2-kpi:nth-child(2) i {
  background: linear-gradient(135deg, #1e1c2c, #15131D);
  box-shadow: 0 12px 22px rgba(21, 19, 29, 0.28);
}

.dashboard-v2-kpi:nth-child(3) i {
  color: #1e1c2c;
  background: linear-gradient(135deg, #fedf6a, #F2A900);
  box-shadow: 0 12px 22px rgba(242, 169, 0, 0.28);
}

.dashboard-v2-kpi:nth-child(4) i {
  background: linear-gradient(135deg, #b3a4ff, #2F8EA1);
  box-shadow: 0 12px 22px rgba(47, 142, 161, 0.26);
}

.dashboard-v2-kpi span,
.dashboard-v2-kpi em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-v2-kpi em {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: #8f8a96;
}

.dashboard-v2-kpi strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.06;
}

.dashboard-v2-kpi small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 14px;
}

.monitoring-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
}

.monitoring-modules {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.monitoring-modules > .dashboard-section-heading {
  grid-column: 1 / -1;
}

.monitoring-modules > #youbikePanel {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.traffic-cause-panel {
  margin-top: 16px;
}

.traffic-cause-insights {
  display: grid;
  gap: 14px;
}

.traffic-cause-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(310px, 0.82fr);
  gap: 14px;
  align-items: stretch;
}

.traffic-cause-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(30, 28, 44, 0.06);
}

.traffic-cause-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.traffic-cause-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.traffic-cause-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.traffic-cause-pie-wrap {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 4px 16px 12px;
}

.traffic-cause-pie {
  display: grid;
  place-items: center;
  width: min(240px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--pie));
  box-shadow:
    inset 0 0 0 1px rgba(30, 28, 44, 0.08),
    0 14px 28px rgba(123, 98, 255, 0.12);
}

.traffic-cause-pie > div {
  display: grid;
  place-items: center;
  align-content: center;
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(123, 98, 255, 0.1);
}

.traffic-cause-pie strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.traffic-cause-pie span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.traffic-cause-pie-summary {
  display: grid;
  gap: 6px;
}

.traffic-cause-pie-summary strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.traffic-cause-pie-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.traffic-cause-pie-legend {
  display: grid;
  gap: 8px;
  max-height: 185px;
  margin: 0;
  padding: 0 16px 16px;
  overflow: auto;
  list-style: none;
}

.traffic-cause-pie-legend li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(123, 98, 255, 0.1);
  border-radius: 10px;
  background: var(--white);
}

.traffic-cause-pie-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--legend-color);
}

.traffic-cause-pie-legend strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.traffic-cause-pie-legend span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.traffic-cause-rank-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0 16px 16px;
  list-style: none;
}

.traffic-cause-rank-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 12px;
  background: #fff;
}

.traffic-cause-rank-list li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.traffic-cause-rank-list strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.traffic-cause-rank-list i {
  display: block;
  width: 100%;
  height: 8px;
  margin-bottom: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #eeeaf4;
}

.traffic-cause-rank-list i::before {
  display: block;
  width: var(--bar, 8%);
  height: 100%;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, var(--berry), var(--warn), var(--yellow));
}

.traffic-cause-rank-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.traffic-cause-rank-list b {
  color: var(--ink);
  font-size: 18px;
}

.traffic-cause-side {
  display: grid;
  gap: 14px;
}

.traffic-cause-side > .traffic-cause-card {
  height: 100%;
}

.traffic-summary-cards {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.traffic-summary-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  background: rgba(179, 164, 255, 0.09);
}

.traffic-summary-card.tone-berry {
  border-color: rgba(233, 75, 122, 0.2);
  background: rgba(233, 75, 122, 0.08);
}

.traffic-summary-card.tone-yellow {
  border-color: rgba(249, 201, 6, 0.44);
  background: rgba(249, 201, 6, 0.16);
}

.traffic-summary-card strong {
  color: var(--ink);
  font-size: 15px;
}

.traffic-summary-card span {
  color: #605960;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.traffic-prevention-lead {
  display: grid;
  gap: 8px;
  margin: 0 16px 14px;
  padding: 14px;
  border: 1px solid rgba(233, 75, 122, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(233, 75, 122, 0.08), rgba(249, 201, 6, 0.14));
}

.traffic-prevention-lead strong {
  color: var(--berry);
  font-size: 15px;
  font-weight: 900;
}

.traffic-prevention-lead p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  font-weight: 800;
}

.traffic-prevention-block {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.traffic-prevention-block h4 {
  margin: 0;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.traffic-prevention-advice-grid {
  display: grid;
  gap: 9px;
}

.traffic-prevention-advice {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  background: rgba(179, 164, 255, 0.08);
}

.traffic-prevention-advice.tone-berry {
  border-color: rgba(233, 75, 122, 0.2);
  background: rgba(233, 75, 122, 0.08);
}

.traffic-prevention-advice.tone-yellow {
  border-color: rgba(249, 201, 6, 0.44);
  background: rgba(249, 201, 6, 0.16);
}

.traffic-prevention-advice strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.traffic-prevention-advice span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.traffic-prevention-advice p {
  margin: 0;
  color: #605960;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.traffic-time-summary {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 246, 252, 0.9)),
    var(--white);
  box-shadow: 0 12px 30px rgba(30, 28, 44, 0.05);
}

.traffic-time-head,
.traffic-time-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.traffic-time-head h3 {
  margin: 0;
  color: var(--purple);
  font-size: 18px;
  line-height: 1.3;
}

.traffic-time-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.traffic-time-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(249, 201, 6, 0.24);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.traffic-time-band-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.traffic-time-band-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 12px;
  background: var(--white);
}

.traffic-time-band-card.is-peak {
  border-color: rgba(233, 75, 122, 0.34);
  background: linear-gradient(180deg, rgba(233, 75, 122, 0.1), rgba(249, 201, 6, 0.12));
  box-shadow: inset 4px 0 0 var(--berry);
}

.traffic-time-band-card span {
  display: grid;
  gap: 2px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.traffic-time-band-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.traffic-time-band-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.traffic-time-band-card b {
  color: #605960;
  font-size: 12px;
  font-weight: 900;
}

.traffic-time-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 12px;
}

.traffic-time-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 12px;
  background: var(--white);
}

.traffic-time-card-head strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.traffic-time-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.traffic-hour-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(8px, 1fr));
  align-items: end;
  gap: 4px;
  min-height: 126px;
  padding-top: 8px;
}

.traffic-hour-bar {
  display: grid;
  align-items: end;
  grid-template-rows: 96px 16px;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.traffic-hour-bar i {
  align-self: end;
  display: block;
  width: 100%;
  height: var(--bar, 2%);
  min-height: 2px;
  border-radius: 999px 999px 3px 3px;
  background: var(--bar-color, rgba(30, 28, 44, 0.22));
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.traffic-hour-bar.level-low i {
  background: var(--bar-color, #8BD5D1);
}

.traffic-hour-bar.level-mid i {
  background: var(--bar-color, #F5A83D);
}

.traffic-hour-bar.level-high i {
  background: var(--bar-color, #F16A4B);
}

.traffic-hour-bar.level-peak i,
.traffic-hour-bar.is-peak i {
  background: var(--bar-color, #E94B7A);
  box-shadow: 0 0 0 3px rgba(233, 75, 122, 0.12);
}

.traffic-hour-bar:hover i,
.traffic-hour-bar:focus-visible i,
.traffic-hour-bar.is-selected i {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(30, 28, 44, 0.16);
}

.traffic-hour-bar b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.traffic-hour-detail {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.traffic-hour-detail-panel[hidden] {
  display: none;
}

.traffic-hour-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.traffic-hour-detail-head strong {
  color: var(--ink);
  font-size: 13px;
}

.traffic-hour-detail-head span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.traffic-hour-detail ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.traffic-hour-detail li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid rgba(30, 28, 44, 0.08);
}

.traffic-hour-detail li:first-child {
  border-top: 0;
}

.traffic-hour-detail li span {
  min-width: 0;
  overflow: hidden;
  color: #605960;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-hour-detail li strong,
.traffic-hour-detail p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.traffic-day-compare {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 126px;
}

.traffic-day-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.traffic-day-row span {
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.traffic-day-row i {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeaf4;
}

.traffic-day-row em {
  display: block;
  width: var(--bar, 2%);
  height: 100%;
  min-width: 2%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--berry));
}

.traffic-day-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.traffic-trend-card {
  overflow: hidden;
}

.traffic-trend-bars {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 108px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.traffic-trend-bar {
  display: grid;
  align-items: end;
  grid-template-rows: 74px 24px;
  gap: 7px;
  min-width: 24px;
  flex: 1 0 24px;
}

.traffic-trend-bar i {
  align-self: end;
  display: block;
  width: 100%;
  height: var(--bar, 2%);
  min-height: 2px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #f9c906, #E94B7A);
}

.traffic-trend-bar b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.traffic-condition-summary {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(30, 28, 44, 0.05);
}

.traffic-condition-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.traffic-condition-summary-head h3 {
  margin: 0;
  color: var(--purple);
  font-size: 18px;
  line-height: 1.3;
}

.traffic-condition-summary-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.traffic-condition-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.traffic-condition-mini-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--white), rgba(248, 246, 252, 0.82));
}

.traffic-condition-mini-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.traffic-condition-mini-head strong {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.traffic-condition-mini-main {
  display: grid;
  gap: 4px;
  min-height: 48px;
}

.traffic-condition-mini-main b {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.traffic-condition-mini-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.traffic-condition-mini-stack {
  display: flex;
  width: 100%;
  height: 9px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeaf4;
  box-shadow: inset 0 0 0 1px rgba(123, 98, 255, 0.08);
}

.traffic-condition-mini-stack i {
  display: block;
  width: max(var(--segment), 2%);
  min-width: 2%;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.72);
}

.traffic-condition-mini-stack i:last-child {
  border-right: 0;
}

.traffic-condition-mini-stack .tone-1,
.traffic-condition-detail-list .tone-1 {
  background: var(--berry);
}

.traffic-condition-mini-stack .tone-2,
.traffic-condition-detail-list .tone-2 {
  background: var(--purple);
}

.traffic-condition-mini-stack .tone-3,
.traffic-condition-detail-list .tone-3 {
  background: #F0A202;
}

.traffic-condition-mini-stack .tone-4,
.traffic-condition-detail-list .tone-4 {
  background: #36A66A;
}

.traffic-condition-mini-stack .tone-5,
.traffic-condition-detail-list .tone-5 {
  background: #8B84C6;
}

.traffic-condition-detail {
  border-top: 1px solid rgba(123, 98, 255, 0.1);
  padding-top: 4px;
}

.traffic-condition-detail summary {
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--purple);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.traffic-condition-detail summary:hover {
  background: rgba(123, 98, 255, 0.08);
}

.traffic-condition-detail summary::-webkit-details-marker {
  display: none;
}

.traffic-condition-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-top: 8px;
}

.traffic-condition-detail-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(179, 164, 255, 0.09);
}

.traffic-condition-detail-card > strong {
  color: var(--ink);
  font-size: 13px;
}

.traffic-condition-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.traffic-condition-detail-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 7px 8px;
  align-items: center;
  min-width: 0;
}

.traffic-condition-detail-list i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.traffic-condition-detail-list span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.traffic-condition-detail-list b {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-data-note,
.dashboard-block-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-block-badge.maintenance {
  color: #8A5B00;
  background: rgba(249, 201, 6, 0.24);
}

.dashboard-block-badge.hidden {
  color: var(--berry);
  background: rgba(233, 75, 122, 0.12);
}

.dashboard-block.is-maintenance {
  position: relative;
  opacity: 0.72;
}

.dashboard-block.is-maintenance::after {
  content: "維護中";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  color: #8A5B00;
  background: rgba(249, 201, 6, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.traffic-rank-list.compact li {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 10px 0;
}

.traffic-rank-list.compact li > span {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.dashboard-mini-map {
  height: 148px;
  margin-top: 16px;
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(32deg, transparent 46%, rgba(123, 98, 255, 0.12) 47%, rgba(123, 98, 255, 0.12) 50%, transparent 51%),
    linear-gradient(148deg, transparent 42%, rgba(233, 75, 122, 0.15) 43%, rgba(233, 75, 122, 0.15) 47%, transparent 48%),
    linear-gradient(90deg, rgba(179, 164, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(179, 164, 255, 0.12) 1px, transparent 1px),
    #FBFAFD;
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
}

.dashboard-aqi-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-aqi-box div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(249, 201, 6, 0.16);
}

.dashboard-aqi-box span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-aqi-box strong {
  color: var(--ink);
  font-size: 28px;
}

.dashboard-aqi-box small,
.dashboard-panel p {
  color: var(--muted);
}

.dashboard-light-list {
  display: grid;
  gap: 10px;
}

.dashboard-light-list div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-light-list div:last-child {
  border-bottom: 0;
}

.dashboard-light-list i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color, var(--purple));
}

.dashboard-light-list strong {
  color: var(--ink);
}

.dashboard-light-list b {
  color: var(--purple);
  white-space: nowrap;
}

.dashboard-skeleton-lines {
  display: grid;
  gap: 10px;
}

.dashboard-skeleton-lines i {
  display: block;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(30, 28, 44, 0.08), rgba(254, 223, 106, 0.24), rgba(30, 28, 44, 0.08));
  background-size: 220% 100%;
  animation: soft-skeleton 1.5s ease-in-out infinite;
}

@keyframes soft-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.panel-heading.compact.youbike-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 4px;
}

.panel-heading.compact.youbike-panel-heading > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.panel-heading.compact.youbike-panel-heading h2 {
  margin: 0;
  color: #1e1c2c;
  font-size: 20px;
  line-height: 1.15;
}

.youbike-title-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.youbike-title-lockup img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
}

.youbike-range-note {
  max-width: none;
  margin: 0;
  color: #77716F;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.youbike-top-controls {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(260px, 1fr);
  gap: 8px;
  align-items: stretch;
}

.youbike-sample-range {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 6px;
  width: 100%;
  padding: 4px;
  border: 1px solid rgba(30, 28, 44, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(30, 28, 44, 0.07);
}

.youbike-sample-range button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: #1e1c2c;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.youbike-sample-range button:hover,
.youbike-sample-range button:focus-visible {
  background: rgba(121, 216, 214, 0.18);
  transform: translateY(-1px);
}

.youbike-sample-range button.active {
  color: #1e1c2c;
  background: #fedf6a;
  box-shadow: 0 8px 18px rgba(242, 169, 0, 0.2);
}

.youbike-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  min-width: 0;
  border: 1px solid rgba(30, 28, 44, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.youbike-kpi-grid div {
  display: grid;
  gap: 3px;
  min-height: 40px;
  padding: 6px 10px;
  border-right: 1px solid rgba(30, 28, 44, 0.1);
  text-align: left;
}

.youbike-kpi-grid div:last-child {
  border-right: 0;
}

.youbike-kpi-grid span {
  color: #77716F;
  font-size: 12px;
  font-weight: 900;
}

.youbike-kpi-grid strong {
  color: #1e1c2c;
  font-size: 19px;
  line-height: 1;
}

.youbike-kpi-grid small {
  margin-left: 3px;
  color: #77716F;
  font-size: 12px;
}

.youbike-date-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #1e1c2c;
  background: rgba(254, 223, 106, 0.5);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.youbike-onepage {
  display: grid;
  gap: 7px;
}

.youbike-zone-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.youbike-zone-cards article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(30, 28, 44, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(30, 28, 44, 0.08);
}

.youbike-zone-cards article::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--zone-color);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--zone-color) 16%, transparent);
}

.youbike-zone-cards span,
.youbike-zone-cards small {
  display: block;
  color: #77716F;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.youbike-zone-cards strong {
  display: block;
  margin: 6px 0 4px;
  color: #1e1c2c;
  font-size: 15px;
  line-height: 1.25;
}

.youbike-zone-cards b {
  display: block;
  color: var(--zone-color);
  font-size: 13px;
  line-height: 1.25;
}

.youbike-map-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  justify-items: stretch;
}

.youbike-control-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border: 1px solid rgba(30, 28, 44, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.youbike-zone-switcher {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.youbike-zone-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 8px;
  align-items: center;
  min-width: 0;
  min-height: 50px;
  padding: 7px 10px;
  border: 0;
  border-left: 1px solid rgba(30, 28, 44, 0.08);
  border-radius: 0;
  color: #1e1c2c;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.youbike-zone-button:first-child {
  border-left: 0;
}

.youbike-zone-button:hover,
.youbike-zone-button.is-active {
  transform: none;
  border-color: rgba(30, 28, 44, 0.08);
  background: linear-gradient(135deg, color-mix(in srgb, var(--zone-color) 15%, white), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 -3px 0 var(--zone-color);
}

.youbike-zone-button i {
  grid-row: span 2;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--zone-color);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--zone-color) 16%, transparent);
}

.youbike-zone-button span,
.youbike-zone-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.youbike-zone-button span {
  color: #1e1c2c;
  font-size: 13px;
  font-weight: 950;
}

.youbike-zone-button small {
  color: var(--zone-color);
  font-size: 12px;
  font-weight: 950;
  grid-column: 2;
  text-align: right;
}

.youbike-zone-button small b,
.youbike-zone-button small em {
  display: block;
  font-style: normal;
  line-height: 1.05;
}

.youbike-zone-button small b {
  color: var(--zone-color);
  font-size: 17px;
  letter-spacing: 0;
}

.youbike-zone-button small em {
  margin-top: 2px;
  color: #77716F;
  font-size: 9.5px;
  font-weight: 850;
}

.youbike-map-stage {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 100%;
}

.youbike-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.youbike-legend-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.youbike-compact-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.youbike-info-button {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 999px;
  color: #7b62ff;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(30, 28, 44, 0.12);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.youbike-info-button:hover,
.youbike-info-button[aria-expanded="true"] {
  border-color: rgba(123, 98, 255, 0.34);
  background: #b3a4ff;
}

.youbike-signal-info-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(420px, calc(100vw - 32px));
  padding: 13px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 8px;
  color: #1e1c2c;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 58px rgba(30, 28, 44, 0.18);
  backdrop-filter: blur(14px);
  animation: ntpcSoftIn 180ms ease both;
}

.youbike-signal-info-panel[hidden] {
  display: none;
}

.youbike-signal-info-panel strong {
  display: block;
  margin-bottom: 9px;
  color: #1e1c2c;
  font-size: 14px;
}

.youbike-signal-info-panel dl {
  display: grid;
  gap: 7px;
  margin: 0 0 10px;
}

.youbike-signal-info-panel dl div {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(30, 28, 44, 0.045);
}

.youbike-signal-info-panel dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1e1c2c;
  font-size: 12px;
  font-weight: 950;
}

.youbike-signal-info-panel dt i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color) 16%, transparent);
}

.youbike-signal-info-panel dd,
.youbike-signal-info-panel p {
  margin: 0;
  color: #77716F;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.youbike-signal-info-panel p + p {
  margin-top: 7px;
}

.youbike-map-toolbar span,
.youbike-compact-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  color: #1e1c2c;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px rgba(30, 28, 44, 0.12);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.youbike-map-toolbar i,
.youbike-compact-legend i,
.youbike-village-list i,
.youbike-landmark-list i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color, var(--signal, #FFB84D));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color, var(--signal, #FFB84D)) 16%, transparent);
}

.youbike-supply-map {
  width: 100%;
  min-height: clamp(640px, 72vh, 980px);
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 8px;
  background: #F7FBFB;
}

.youbike-map-popup strong,
.youbike-map-popup span,
.youbike-map-popup small {
  display: block;
}

.youbike-map-popup strong {
  margin-bottom: 4px;
  color: #1e1c2c;
}

.youbike-map-popup span {
  color: #7b62ff;
  font-weight: 900;
}

.youbike-map-popup small {
  margin-top: 3px;
  color: #77716F;
  font-weight: 800;
}

.youbike-side-panels {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-self: stretch;
  overflow: hidden;
}

.youbike-side-panels section {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(30, 28, 44, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.youbike-side-panels section.is-secondary {
  max-height: 260px;
  overflow: auto;
}

.youbike-zone-detail {
  display: grid;
  gap: 8px;
  height: 100%;
  max-height: none;
  overflow: hidden;
}

.youbike-zone-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--zone-color) 13%, white), rgba(255, 255, 255, 0.86));
}

.youbike-zone-status i {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--zone-color);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--zone-color) 14%, transparent);
}

.youbike-zone-status strong,
.youbike-zone-status span {
  display: block;
}

.youbike-zone-status strong {
  color: #1e1c2c;
  font-size: 15px;
}

.youbike-zone-status span {
  margin-top: 3px;
  color: #77716F;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.youbike-zone-mini-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.youbike-zone-mini-kpis > div {
  position: relative;
  padding: 8px;
  border-radius: 8px;
  background: rgba(30, 28, 44, 0.05);
}

.youbike-metric-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #77716F;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.youbike-metric-label b {
  color: inherit;
  font: inherit;
}

.youbike-metric-info {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 999px;
  color: #7b62ff;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  line-height: 1;
}

.youbike-metric-info:hover,
.youbike-metric-info[aria-expanded="true"] {
  border-color: rgba(123, 98, 255, 0.34);
  background: #b3a4ff;
}

.youbike-metric-info-panel {
  position: fixed;
  z-index: 2200;
  max-height: calc(100vh - 20px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(30, 28, 44, 0.14);
  border-radius: 8px;
  color: #1e1c2c;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 22px 54px rgba(30, 28, 44, 0.22);
  animation: ntpcSoftIn 160ms ease both;
}

.youbike-metric-info-panel[hidden] {
  display: none;
}

.youbike-metric-info-panel strong,
.youbike-metric-info-panel p {
  display: block;
  margin: 0;
}

.youbike-metric-info-panel strong {
  color: #1e1c2c;
  font-size: 13px;
  font-weight: 950;
}

.youbike-metric-info-panel p {
  margin-top: 6px;
  color: #77716F;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}

.youbike-village-detail {
  overflow: hidden;
}

.youbike-village-peak-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.youbike-village-peak-hours span {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--zone-color) 14%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zone-color) 20%, transparent);
}

.youbike-village-peak-hours b {
  color: #1e1c2c;
  font-size: 12px;
  font-weight: 950;
}

.youbike-village-peak-hours small {
  color: var(--zone-color);
  font-size: 12px;
  font-weight: 950;
}

.youbike-zone-mini-kpis > div > span:not(.youbike-metric-label),
.youbike-zone-list small {
  display: block;
  color: #77716F;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.youbike-zone-mini-kpis strong {
  display: block;
  margin-top: 4px;
  color: #1e1c2c;
  font-size: 19px;
  line-height: 1;
}

.youbike-station-mini-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.youbike-station-mini-kpis strong {
  font-size: 17px;
}

.youbike-station-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.youbike-station-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #1e1c2c;
  background: rgba(77, 177, 194, 0.12);
  font-size: 11px;
  font-weight: 900;
}

.youbike-station-heatmap {
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(30, 28, 44, 0.04);
}

.youbike-station-heatmap-hours,
.youbike-station-heatmap-cells {
  display: grid;
  grid-template-columns: repeat(18, minmax(14px, 1fr));
  gap: 2px;
}

.youbike-station-heatmap-hours span {
  display: grid;
  place-items: center;
  min-height: 16px;
  color: #77716F;
  font-size: 9px;
  font-weight: 900;
}

.youbike-station-heatmap-cells i {
  display: block;
  min-height: 24px;
  border-radius: 5px;
  background: var(--cell-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.youbike-station-heatmap-cells i.is-empty {
  opacity: 0.7;
  background: #E6E8ED !important;
  background-image: none;
}

.youbike-zone-detail h3 {
  margin: 4px 0 0;
  color: #1e1c2c;
  font-size: 15px;
}

.youbike-zone-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.youbike-zone-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(30, 28, 44, 0.08);
}

.youbike-zone-list strong {
  display: block;
  color: #1e1c2c;
  font-size: 13px;
}

.youbike-zone-list b {
  color: var(--zone-color);
  font-size: 13px;
  white-space: nowrap;
}

.youbike-station-table {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-height: clamp(360px, 42vh, 520px);
  overflow: auto;
  padding-right: 2px;
}

.youbike-station-table-head,
.youbike-station-table-body li {
  display: grid;
  grid-template-columns: minmax(44px, 0.75fr) minmax(96px, 1.65fr) repeat(3, minmax(34px, 0.52fr));
  gap: 6px;
  align-items: center;
}

.youbike-station-table-head {
  padding: 0 7px 4px;
  color: #77716F;
  font-size: 11px;
  font-weight: 900;
}

.youbike-station-table-head span:nth-child(n + 3),
.youbike-station-table-body li b {
  text-align: right;
}

.youbike-station-table-body {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.youbike-station-table-body li {
  min-width: 0;
  padding: 8px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(30, 28, 44, 0.08);
}

.youbike-station-table-body li span,
.youbike-station-table-body li strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.youbike-station-table-body li span {
  color: #77716F;
  font-size: 12px;
  font-weight: 850;
}

.youbike-station-table-body li strong,
.youbike-station-table-body li b {
  color: #1e1c2c;
  font-size: 12px;
  font-weight: 900;
}

.youbike-station-more {
  display: grid;
  gap: 6px;
}

.youbike-station-more summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin-top: 2px;
  padding: 5px 10px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 999px;
  color: #7b62ff;
  background: rgba(121, 216, 214, 0.14);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.youbike-info-button img,
.youbike-metric-info img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.youbike-empty-note {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  color: #77716F;
  background: rgba(30, 28, 44, 0.05);
  font-size: 12px;
  font-weight: 850;
}

.youbike-zone-detail p {
  margin: 0;
  padding: 9px;
  border-radius: 8px;
  color: #1e1c2c;
  background: rgba(254, 223, 106, 0.32);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.6;
}

.youbike-side-panels h3 {
  margin: 0 0 10px;
  color: #1e1c2c;
  font-size: 15px;
  line-height: 1.2;
}

.youbike-village-list,
.youbike-landmark-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.youbike-village-list li,
.youbike-landmark-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(30, 28, 44, 0.08);
}

.youbike-landmark-list li {
  grid-template-columns: auto minmax(0, 1fr);
}

.youbike-village-list li:last-child,
.youbike-landmark-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.youbike-village-list strong,
.youbike-landmark-list strong {
  display: block;
  color: #1e1c2c;
  font-size: 13px;
}

.youbike-village-list small,
.youbike-landmark-list small {
  display: block;
  color: #77716F;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.youbike-village-list b {
  color: #1e1c2c;
  font-size: 12px;
  white-space: nowrap;
}

.youbike-source-note {
  margin: 5px 0 0;
  color: #77716F;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.youbike-incomplete-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 184, 77, 0.38);
  border-radius: 8px;
  color: #1e1c2c;
  background: linear-gradient(135deg, rgba(254, 223, 106, 0.24), rgba(255, 255, 255, 0.86));
}

.youbike-incomplete-card strong {
  font-size: 16px;
  font-weight: 900;
}

.youbike-incomplete-card p,
.youbike-incomplete-card small {
  margin: 0;
  color: #77716F;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
}

.youbike-zone-heatmap-card {
  margin-top: 0;
  padding: 6px 8px;
  border: 1px solid rgba(30, 28, 44, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  overflow-x: auto;
}

.youbike-onepage-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(0, 2fr);
  gap: 11px;
  align-items: stretch;
}

.youbike-left-stack {
  display: grid;
  grid-template-rows: minmax(0, auto) auto;
  gap: 8px;
  min-width: 0;
}

.youbike-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.youbike-section-head h3 {
  margin: 0;
  color: #1e1c2c;
  font-size: 12px;
}

.youbike-section-head small {
  color: #77716F;
  font-size: 11px;
  font-weight: 850;
}

.youbike-zone-heatmap {
  display: grid;
  grid-template-columns: 78px repeat(18, minmax(18px, 1fr));
  gap: 2px;
  min-width: 710px;
  align-items: center;
}

.youbike-zone-heatmap strong,
.youbike-heatmap-hour {
  min-height: 18px;
  display: grid;
  align-items: center;
  border-radius: 7px;
  color: #77716F;
  font-size: 9.5px;
  font-weight: 900;
}

.youbike-zone-heatmap strong {
  padding: 0 6px;
  color: #1e1c2c;
  background: rgba(30, 28, 44, 0.05);
  cursor: pointer;
}

.youbike-zone-heatmap strong.is-selected {
  color: #7b62ff;
  background: rgba(77, 177, 194, 0.16);
  box-shadow: inset 0 0 0 1px rgba(77, 177, 194, 0.38);
}

.youbike-heatmap-hour {
  place-items: center;
}

.youbike-zone-heatmap i {
  display: block;
  min-height: 18px;
  border-radius: 5px;
  background: var(--cell-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.youbike-zone-heatmap i:hover,
.youbike-zone-heatmap i.is-selected {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 2px rgba(30, 28, 44, 0.32), 0 8px 18px rgba(30, 28, 44, 0.14);
}

.youbike-zone-heatmap i.is-empty {
  cursor: default;
  opacity: 1;
  background: #E6E8ED !important;
  background-image: none;
}

.youbike-village-heatmap-card {
  background: rgba(255, 255, 255, 0.84);
}

.youbike-village-heatmap {
  grid-template-columns: 92px repeat(18, minmax(18px, 1fr));
  min-width: 720px;
}

.youbike-village-heatmap strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.youbike-village-heatmap strong span {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.youbike-village-heatmap strong em {
  flex: 0 0 auto;
  margin-left: 2px;
  padding: 0;
  color: #F5A623;
  background: transparent;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.youbike-village-heatmap strong.is-no-station {
  color: #77716F;
  background: rgba(30, 28, 44, 0.035);
  cursor: default;
}

.youbike-zone-heatmap i.is-no-station {
  cursor: default;
  opacity: 1;
  background: #ECEFF3 !important;
  box-shadow: inset 0 0 0 1px rgba(30, 28, 44, 0.06);
}

.youbike-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.youbike-heatmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #77716F;
  font-size: 11px;
  font-weight: 850;
}

.youbike-heatmap-legend i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--color);
}

@media (max-width: 980px) {
  .panel-heading.compact.youbike-panel-heading {
    flex-wrap: wrap;
  }

  .youbike-zone-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .youbike-onepage-grid {
    grid-template-columns: 1fr;
  }

  .youbike-zone-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .youbike-control-strip {
    grid-template-columns: 1fr;
  }

  .youbike-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .youbike-supply-map {
    width: 100%;
    min-height: 520px;
    height: 520px;
  }
}

@media (max-width: 560px) {
  .youbike-top-controls {
    grid-template-columns: 1fr;
  }

  .youbike-zone-cards,
  .youbike-kpi-grid,
  .youbike-zone-switcher {
    grid-template-columns: 1fr;
  }

  .youbike-title-lockup img {
    width: 56px;
    height: 56px;
  }

  .youbike-supply-map {
    width: 100%;
    min-height: 380px;
    height: 380px;
  }
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 16px;
}

.resource-side {
  display: grid;
  gap: 16px;
}

.dashboard-resource-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-resource-counts div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(179, 164, 255, 0.12);
}

.dashboard-resource-counts strong {
  color: var(--purple);
  font-size: 24px;
}

.dashboard-resource-counts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-resource-map {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid rgba(123, 98, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(123, 98, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(123, 98, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 28% 38%, rgba(249, 201, 6, 0.22), transparent 10%),
    radial-gradient(circle at 72% 64%, rgba(233, 75, 122, 0.12), transparent 14%),
    #FBFAFD;
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.dashboard-resource-map i {
  position: absolute;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 4px;
  color: var(--white);
  background: var(--pin-color, var(--purple));
  box-shadow: 0 10px 24px rgba(30, 28, 44, 0.18);
  transform: rotate(-45deg);
}

.dashboard-resource-map span {
  display: block;
  font-style: normal;
  font-weight: 900;
  transform: rotate(45deg);
}

.dashboard-family-illustration {
  min-height: 190px;
  display: grid;
  grid-template-columns: 70px 48px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(249, 201, 6, 0.18), rgba(179, 164, 255, 0.16)),
    var(--white);
}

.dashboard-family-illustration .figure {
  display: block;
  border-radius: 999px 999px 8px 8px;
  background: var(--purple);
}

.dashboard-family-illustration .parent {
  width: 58px;
  height: 122px;
}

.dashboard-family-illustration .child {
  width: 42px;
  height: 82px;
  background: var(--berry);
}

.dashboard-family-illustration div {
  align-self: center;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-family-illustration strong {
  display: block;
  color: var(--purple);
  font-size: 30px;
}

.dashboard-hidden-log {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(233, 75, 122, 0.16);
  border-radius: 8px;
  color: var(--gray);
  background: rgba(233, 75, 122, 0.08);
  font-weight: 800;
}

.dashboard-hidden-log.show {
  display: block;
}

.dashboard-filter-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) auto;
  gap: 12px;
  align-items: end;
  margin: 0 auto 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(30, 28, 44, 0.08);
}

.dashboard-filter-card label {
  display: grid;
  gap: 6px;
}

.dashboard-filter-card span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-filter-card select,
.dashboard-filter-card input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.dashboard-filter-card button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--yellow);
  font-weight: 900;
  cursor: pointer;
}

.complaint-dashboard-grid {
  margin-bottom: 8px;
}

.dashboard-section-title {
  margin: 30px 0 14px;
  padding-left: 10px;
  border-left: 4px solid var(--yellow);
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.dashboard-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
}

.dashboard-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--purple);
}

.dashboard-kpi-card.tone-berry::before { background: var(--berry); }
.dashboard-kpi-card.tone-yellow::before { background: var(--yellow); }
.dashboard-kpi-card.tone-gray::before { background: var(--gray); }
.dashboard-kpi-card.tone-green::before { background: #2A9D72; }
.dashboard-kpi-card.tone-cyan::before { background: #06B6D4; }

.dashboard-issue-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-issue-card {
  min-height: 190px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--purple);
  border-radius: 8px;
  background: var(--white);
}

.dashboard-issue-card.critical { border-left-color: var(--berry); }
.dashboard-issue-card.serious { border-left-color: #D68500; }
.dashboard-issue-card.moderate { border-left-color: var(--yellow); }
.dashboard-issue-card.minor { border-left-color: var(--lavender); }

.dashboard-issue-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.dashboard-issue-card strong {
  color: var(--purple);
  font-size: 30px;
  line-height: 1;
}

.dashboard-issue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-issue-card span {
  width: fit-content;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.18);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
}

.dashboard-analysis-grid.secondary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 18px;
}

.dashboard-panel {
  overflow: hidden;
  padding: 16px;
  border-radius: 12px;
}

.traffic-analysis-panel {
  padding: 0;
}

.traffic-analysis-panel .panel-heading {
  padding: 12px 14px 0;
}

.panel-heading {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-heading.compact {
  display: block;
}

.panel-heading h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 19px;
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-map {
  height: clamp(520px, 62vh, 680px);
  min-height: 520px;
  border-top: 1px solid var(--line);
}

.traffic-rank-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-panel > .traffic-rank-list {
  max-height: 470px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 28, 44, 0.32) transparent;
}

.dashboard-panel > .traffic-rank-list::-webkit-scrollbar {
  width: 6px;
}

.dashboard-panel > .traffic-rank-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(30, 28, 44, 0.28);
}

.traffic-rank-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 41px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}

.traffic-rank-list li:last-child {
  border-bottom: 0;
}

.traffic-rank-list li > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.16);
  font-weight: 900;
}

.traffic-rank-list strong,
.traffic-rank-list small {
  display: block;
}

.traffic-rank-list strong {
  color: var(--ink);
  line-height: 1.25;
  font-size: 13px;
}

.traffic-rank-list small {
  color: var(--muted);
  font-size: 12px;
}

.traffic-rank-list b {
  color: var(--berry);
  white-space: nowrap;
}

.traffic-rank-list .empty {
  display: block;
  color: var(--muted);
}

.traffic-rank-list .rank-extra-row.is-hidden {
  display: none;
}

.traffic-rank-toggle {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 999px;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.1);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.traffic-rank-toggle b {
  font-size: 17px;
  line-height: 1;
}

.traffic-rank-toggle:hover,
.traffic-rank-toggle:focus-visible {
  border-color: rgba(123, 98, 255, 0.36);
  background: rgba(179, 164, 255, 0.2);
}

.traffic-month-chart {
  display: grid;
  gap: 12px;
}

.traffic-month-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 48px 130px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.traffic-month-row i {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(179, 164, 255, 0.18);
}

.traffic-month-row i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--berry));
}

.traffic-month-row strong {
  color: var(--ink);
  font-size: 13px;
}

.traffic-month-row small {
  color: var(--muted);
  font-size: 12px;
}

.vulnerable-road-user-panel {
  grid-column: span 2;
}

.vulnerable-road-user-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  gap: 16px;
}

.vulnerable-subpanel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(143, 130, 188, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.vulnerable-subpanel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vulnerable-subpanel-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.vulnerable-subpanel-head span,
.vulnerable-data-note,
.dashboard-empty-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.vulnerable-rank-list {
  max-height: 276px;
  overflow: auto;
  padding-right: 4px;
}

.vulnerable-age-bars {
  display: grid;
  gap: 10px;
}

.vulnerable-age-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
}

.vulnerable-age-row strong,
.vulnerable-age-row span {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
}

.vulnerable-age-row span {
  text-align: right;
  color: var(--muted);
}

.vulnerable-age-stack {
  display: flex;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 28, 44, 0.08);
}

.vulnerable-age-stack i,
.vulnerable-age-legend i {
  display: block;
  background: var(--bucket-color, #8F82BC);
}

.bucket-child {
  --bucket-color: #fedf6a;
}

.bucket-teen {
  --bucket-color: #b3a4ff;
}

.bucket-youngAdult {
  --bucket-color: #8F82BC;
}

.bucket-middleAge {
  --bucket-color: #7b62ff;
}

.bucket-senior {
  --bucket-color: #E94B7A;
}

.bucket-unknown {
  --bucket-color: #B9B6C8;
}

.vulnerable-age-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
}

.vulnerable-age-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.vulnerable-age-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.vulnerable-data-note {
  margin: 12px 0 0;
  line-height: 1.6;
}

.dashboard-source-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
}

.dashboard-validation-list {
  display: grid;
  gap: 10px;
}

.validation-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.validation-item:last-child {
  border-bottom: 0;
}

.validation-item span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.validation-item strong {
  color: var(--ink);
  font-size: 18px;
}

.validation-item small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-empty {
  margin: 0;
  color: var(--muted);
}

.dashboard-alert-grid,
.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-module-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--lavender);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(30, 28, 44, 0.08);
}

.dashboard-module-card.live {
  border-top-color: #2A9D72;
}

.dashboard-module-card.configured {
  border-top-color: var(--purple);
}

.dashboard-module-card.pending {
  border-top-color: var(--yellow);
  background: linear-gradient(180deg, #fff, rgba(249, 201, 6, 0.08));
}

.dashboard-module-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.dashboard-module-card strong {
  color: var(--purple);
  font-size: 28px;
  line-height: 1.1;
}

.dashboard-module-card p,
.dashboard-module-card small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-module-card small {
  display: block;
}

.severity-medium,
.severity-watch {
  background: var(--purple);
}

.map-legend {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 3;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.legend-high { background: var(--berry); }
.legend-watch { background: var(--purple); }

.map-empty {
  position: absolute;
  left: 24px;
  top: 24px;
  color: var(--muted);
}

.pin {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 6px 22px rgba(30, 28, 44, 0.26);
}

.pin-a { left: 22%; top: 28%; }
.pin-b { left: 58%; top: 22%; background: var(--purple); }
.pin-c { left: 72%; top: 58%; background: var(--yellow); }
.pin-d { left: 36%; top: 67%; background: var(--lavender); }

.map-label {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}

.map-label span {
  color: var(--muted);
  font-size: 13px;
}

.split,
.join,
.admin {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
}

.quick-grid,
.admin-grid {
  display: grid;
  gap: 14px;
}

.quick-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 4px 16px;
  padding: 20px;
}

.quick-item span {
  grid-row: span 2;
  color: var(--purple);
  font-weight: 950;
  font-size: 26px;
}

.quick-item small,
.admin-grid span,
.activity p {
  color: var(--muted);
}

.parents {
  background: linear-gradient(180deg, rgba(179, 164, 255, 0.18), rgba(249, 201, 6, 0.12));
}

.planner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
}

.filters,
.activity-list {
  display: grid;
  align-content: start;
  gap: 12px;
}

.activity {
  padding: 20px;
}

.date {
  color: var(--berry);
  font-weight: 900;
}

.join-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-page {
  min-height: calc(100vh - 72px);
  padding: clamp(44px, 7vw, 86px) clamp(18px, 6vw, 78px);
  background:
    linear-gradient(125deg, rgba(179, 164, 255, 0.22), rgba(249, 201, 6, 0.12) 56%, #fff 56%),
    var(--white);
}

.member-intro {
  max-width: 780px;
  margin-bottom: 30px;
}

.member-intro h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.member-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.member-tabs {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.member-tab {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--gray);
  background: rgba(179, 164, 255, 0.10);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.member-tab.active {
  color: var(--gray);
  border-color: var(--yellow);
  background: var(--yellow);
}

.member-panel {
  display: none;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.member-panel.active {
  display: grid;
}

.login-page {
  min-height: calc(100vh - 160px);
}

.login-shell {
  max-width: 720px;
}

.login-card {
  border-left: 5px solid var(--yellow);
}

.line-login {
  color: var(--white);
  background: #06C755;
}

.line-login:hover {
  background: #05b44d;
}

.google-login {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.google-login:hover {
  color: var(--purple);
  background: rgba(179, 164, 255, 0.12);
}

.member-panel h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.recovery-box,
.settings-heading {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(179, 164, 255, 0.10);
}

.settings-heading {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.recovery-box span {
  color: var(--muted);
  font-size: 14px;
}

.settings-avatar {
  width: 76px;
  height: 76px;
  border: 1px solid var(--yellow);
  border-radius: 50%;
  object-fit: cover;
  background: var(--lavender);
}

.avatar-upload small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.avatar-file-control {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.avatar-file-preview {
  width: 54px;
  height: 54px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  object-fit: cover;
  background: var(--lavender);
}

.avatar-upload input[type="file"] {
  min-height: 46px;
  padding: 10px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin {
  background: var(--gray);
  color: var(--white);
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.admin h2,
.admin .eyebrow {
  color: var(--white);
}

.admin > div > p {
  color: rgba(255, 255, 255, 0.72);
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid div {
  display: grid;
  gap: 8px;
  padding: 20px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-grid span {
  color: rgba(255, 255, 255, 0.7);
}

.admin-session {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 12px;
  color: var(--gray);
  background: var(--yellow);
  border-radius: 8px;
  font-weight: 800;
}

.content-editor {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-issues {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-issues .editor-heading strong,
.admin-issues .editor-heading span {
  color: var(--white);
}

.admin-issue-list {
  max-height: 560px;
  overflow: auto;
  padding-right: 6px;
}

.admin-issue-item {
  background: rgba(255, 255, 255, 0.92);
}

.admin-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.backend-header {
  gap: 12px;
}

.backend-sidebar-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(30, 28, 44, 0.12);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(30, 28, 44, 0.1);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.backend-sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.backend-sidebar-toggle:hover,
.backend-sidebar-toggle:focus-visible {
  border-color: rgba(179, 164, 255, 0.7);
  box-shadow: 0 14px 28px rgba(179, 164, 255, 0.18);
  transform: translateY(-1px);
}

.backend-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  min-height: calc(100vh - 88px);
  padding: 24px clamp(18px, 3vw, 34px) clamp(36px, 5vw, 64px);
  background: var(--soft);
  transition: grid-template-columns 180ms ease;
}

.backend-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: calc(100vh - 124px);
  padding: 16px;
  border: 1px solid rgba(30, 28, 44, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(30, 28, 44, 0.08);
  backdrop-filter: blur(16px);
}

.backend-sidebar-title {
  display: grid;
  gap: 4px;
  padding: 4px 8px 10px;
  border-bottom: 1px solid rgba(30, 28, 44, 0.08);
}

.backend-sidebar-title strong {
  color: var(--ink);
  font-size: 15px;
}

.backend-sidebar-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.backend-sidebar-nav {
  display: grid;
  gap: 6px;
}

.backend-nav-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--gray);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.backend-nav-link:hover,
.backend-nav-link:focus-visible {
  border-color: rgba(179, 164, 255, 0.4);
  color: var(--ink);
  background: rgba(179, 164, 255, 0.14);
  transform: translateX(2px);
}

.backend-nav-link.is-active {
  color: var(--ink);
  border-color: rgba(254, 223, 106, 0.7);
  background: linear-gradient(90deg, rgba(254, 223, 106, 0.72), rgba(255, 255, 255, 0.9));
  box-shadow: 0 12px 26px rgba(254, 223, 106, 0.22);
}

.backend-nav-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--ink);
  background: rgba(250, 229, 174, 0.75);
  font-size: 13px;
  font-weight: 900;
}

.backend-nav-link.is-active .backend-nav-icon {
  background: var(--white);
}

.backend-sidebar-collapsed .backend-shell {
  grid-template-columns: 78px minmax(0, 1fr);
}

.backend-sidebar-collapsed .backend-sidebar {
  padding: 14px 10px;
}

.backend-sidebar-collapsed .backend-sidebar-title span,
.backend-sidebar-collapsed .backend-sidebar-title strong,
.backend-sidebar-collapsed .backend-nav-label {
  display: none;
}

.backend-sidebar-collapsed .backend-nav-link {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 5px;
}

.backend-page {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 24px;
  padding: 0;
  background: transparent;
}

.backend-hero,
.backend-panel {
  width: 100%;
  margin: 0;
}

[data-backend-section][hidden] {
  display: none !important;
}

.backend-hero h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 52px);
}

.backend-hero p:last-child {
  max-width: 760px;
  color: var(--muted);
}

.backend-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.backend-panel.admin-issues {
  color: var(--gray);
  background: var(--white);
}

.backend-panel.admin-issues .editor-heading strong {
  color: var(--ink);
}

.backend-panel.admin-issues .editor-heading span,
.backend-panel .form-note {
  color: var(--muted);
}

@media (max-width: 980px) {
  .backend-shell,
  .backend-sidebar-collapsed .backend-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 14px;
  }

  .backend-sidebar {
    position: static;
    min-height: 0;
  }

  .backend-sidebar-title {
    display: none;
  }

  .backend-sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .backend-nav-link,
  .backend-sidebar-collapsed .backend-nav-link {
    grid-template-columns: 30px max-content;
    min-width: max-content;
    padding: 5px 10px 5px 5px;
  }

  .backend-sidebar-collapsed .backend-nav-label {
    display: inline;
  }

  .backend-nav-icon {
    width: 30px;
    height: 30px;
  }
}

.site-maintenance-admin {
  border-top: 5px solid var(--yellow);
}

.maintenance-editor-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) repeat(2, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.maintenance-editor-grid label {
  display: grid;
  gap: 8px;
  color: var(--gray);
  font-size: 14px;
  font-weight: 800;
}

.maintenance-editor-grid input[type="datetime-local"] {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.maintenance-toggle {
  min-height: 44px;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(123, 98, 255, 0.16);
  border-radius: 8px;
  background: rgba(254, 223, 106, 0.22);
}

.maintenance-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--purple);
}

.dashboard-block-admin {
  border-top: 5px solid var(--purple);
}

.dashboard-block-control-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.dashboard-block-control {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(179, 164, 255, 0.08), rgba(255, 255, 255, 0.96));
}

.dashboard-block-control strong,
.dashboard-block-control small {
  display: block;
}

.dashboard-block-control strong {
  color: var(--ink);
  font-size: 17px;
}

.dashboard-block-control small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-block-control[data-status="maintenance"] {
  border-color: rgba(240, 160, 0, 0.26);
  background: linear-gradient(90deg, rgba(249, 201, 6, 0.18), rgba(255, 255, 255, 0.96));
}

.dashboard-block-control[data-status="hidden"] {
  border-color: rgba(233, 75, 122, 0.22);
  background: linear-gradient(90deg, rgba(233, 75, 122, 0.12), rgba(255, 255, 255, 0.96));
}

.dashboard-block-actions {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(123, 98, 255, 0.16);
  border-radius: 999px;
  background: var(--white);
}

.dashboard-block-actions button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-block-actions button:hover,
.dashboard-block-actions button:focus-visible {
  color: var(--purple);
  background: rgba(179, 164, 255, 0.12);
}

.dashboard-block-actions button.active {
  color: var(--white);
  background: var(--purple);
  box-shadow: 0 8px 18px rgba(123, 98, 255, 0.2);
}

.dashboard-block-actions button[data-status="maintenance"].active {
  color: var(--gray);
  background: var(--yellow);
}

.dashboard-block-actions button[data-status="hidden"].active {
  background: var(--berry);
}

.operation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.operation-grid h3 {
  margin: 0 0 10px;
  color: var(--ink);
}

.operation-list {
  display: grid;
  gap: 10px;
}

.operation-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.operation-item strong {
  color: var(--ink);
}

.operation-item small,
.operation-item li {
  color: var(--muted);
  font-size: 13px;
}

.operation-item ul {
  margin: 0;
  padding-left: 18px;
}

.data-quality-legend,
.data-quality-list {
  display: grid;
  gap: 12px;
}

.data-quality-legend {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0 18px;
}

.data-quality-legend-item,
.data-quality-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.data-quality-legend-item {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.data-quality-legend-item strong,
.data-quality-item strong {
  color: var(--ink);
}

.data-quality-legend-item small,
.data-quality-item p,
.data-quality-item dd,
.data-quality-topline small {
  color: var(--muted);
}

.data-quality-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-quality-item {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.data-quality-item p {
  margin: 0;
  line-height: 1.55;
}

.data-quality-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.grade-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--purple);
  background: rgba(123, 98, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.data-quality-item dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.data-quality-item dl div {
  display: grid;
  gap: 3px;
}

.data-quality-item dt {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.data-quality-item dd {
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
}

.data-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.data-source-links a {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(123, 98, 255, 0.22);
  border-radius: 999px;
  color: var(--purple);
  background: var(--soft);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.grade-a {
  border-top: 4px solid #2A9D72;
}

.grade-b {
  border-top: 4px solid var(--purple);
}

.grade-c {
  border-top: 4px solid var(--yellow);
}

.grade-d {
  border-top: 4px solid var(--berry);
}

.carousel-editor-list {
  display: grid;
  gap: 14px;
}

.carousel-editor-item {
  display: grid;
  grid-template-columns: 150px repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.carousel-editor-item legend {
  padding: 0 6px;
  color: var(--purple);
  font-weight: 900;
}

.carousel-editor-item label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.carousel-editor-item input,
.carousel-editor-item textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.carousel-editor-item textarea {
  resize: vertical;
}

.carousel-thumb {
  width: 150px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}

.carousel-editor-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.youbike-zone-validation {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(42, 157, 114, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(121, 216, 214, 0.12);
}

.youbike-zone-validation[data-status="error"] {
  border-color: rgba(184, 41, 79, 0.28);
  background: rgba(233, 75, 122, 0.1);
}

.youbike-zone-validation strong {
  font-size: 14px;
  font-weight: 900;
}

.youbike-zone-validation span,
.youbike-zone-validation small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.youbike-zone-validation ul {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding-left: 18px;
  color: #B8294F;
  font-size: 13px;
  font-weight: 800;
}

.youbike-zone-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.youbike-zone-editor-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.youbike-zone-editor-item legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.youbike-zone-editor-item label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.youbike-zone-editor-item label.wide {
  grid-column: 1 / -1;
}

.youbike-zone-editor-item input,
.youbike-zone-editor-item textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.youbike-zone-editor-item textarea {
  min-height: 108px;
  line-height: 1.55;
  resize: vertical;
}

.youbike-zone-editor-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.5;
}

.anti-scam-admin {
  border-top: 5px solid var(--yellow);
}

.anti-scam-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 16px;
  margin-top: 16px;
}

.anti-scam-settings-form,
.anti-scam-usage-card,
.anti-scam-test-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.editor-heading.compact {
  align-items: flex-start;
}

.editor-heading.compact span {
  color: var(--muted);
}

.anti-scam-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.anti-scam-form-grid label,
.anti-scam-test-panel label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.anti-scam-form-grid input,
.anti-scam-test-panel textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.anti-scam-test-panel {
  margin-top: 16px;
}

.anti-scam-test-panel textarea {
  min-height: 130px;
  line-height: 1.6;
  resize: vertical;
}

.anti-scam-image-upload {
  display: grid;
  gap: 10px;
}

.anti-scam-image-picker {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px dashed rgba(123, 98, 255, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(254, 223, 106, 0.22), rgba(255, 255, 255, 0.9));
  cursor: pointer;
}

.anti-scam-image-picker span {
  color: var(--ink);
  font-weight: 900;
}

.anti-scam-image-picker small {
  color: var(--muted);
  font-weight: 650;
}

.anti-scam-image-picker input {
  width: 100%;
  color: var(--muted);
  cursor: pointer;
}

.anti-scam-image-preview {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.anti-scam-image-preview[hidden] {
  display: none;
}

.anti-scam-image-preview img {
  width: 96px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f4fb;
}

.anti-scam-image-preview div {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.anti-scam-image-preview strong {
  color: var(--ink);
  font-size: 14px;
}

.anti-scam-image-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.anti-scam-usage-card {
  align-content: start;
  background: linear-gradient(145deg, rgba(254, 223, 106, 0.24), rgba(255, 255, 255, 0.94));
}

.anti-scam-usage-card strong {
  color: var(--ink);
  font-size: 17px;
}

.anti-scam-usage-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.anti-scam-usage-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.anti-scam-usage-card dt,
.anti-scam-usage-card dd {
  margin: 0;
  font-size: 13px;
}

.anti-scam-usage-card dt {
  color: var(--muted);
  font-weight: 850;
}

.anti-scam-usage-card dd {
  color: var(--ink);
  font-weight: 950;
}

.anti-scam-test-result {
  display: grid;
  gap: 12px;
}

.anti-scam-result-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(30, 28, 44, 0.1);
  border-radius: 8px;
  background: var(--white);
}

.anti-scam-result-card.verdict-red {
  border-color: rgba(255, 49, 49, 0.3);
  background: linear-gradient(145deg, rgba(255, 49, 49, 0.08), var(--white));
}

.anti-scam-result-card.verdict-yellow {
  border-color: rgba(249, 201, 6, 0.46);
  background: linear-gradient(145deg, rgba(249, 201, 6, 0.16), var(--white));
}

.anti-scam-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.anti-scam-result-head span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 13px;
  font-weight: 950;
}

.anti-scam-result-head small,
.anti-scam-result-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.anti-scam-result-card strong {
  color: var(--ink);
  font-size: 18px;
}

.anti-scam-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.anti-scam-result-card h4 {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 13px;
}

.anti-scam-result-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.55;
}

.anti-scam-result-card a {
  display: inline-block;
  margin: 0 8px 8px 0;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.anti-scam-result-card details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.anti-scam-result-card summary {
  width: fit-content;
  color: var(--purple);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.anti-scam-result-card pre {
  max-height: 360px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(30, 28, 44, 0.06);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .anti-scam-admin-grid,
  .anti-scam-form-grid,
  .anti-scam-result-grid {
    grid-template-columns: 1fr;
  }
}

.editor-heading strong,
.editor-heading span {
  display: block;
}

.editor-heading span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content-editor textarea {
  width: 100%;
  min-height: 460px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-family: Consolas, "Noto Sans TC", monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.is-hidden {
  display: none !important;
}

.footer {
  position: relative;
  padding: clamp(36px, 5vw, 58px) clamp(18px, 6vw, 78px);
  color: rgba(255, 255, 255, 0.88);
  background: #7b62ff;
  border-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(320px, 1.18fr) minmax(240px, 0.9fr);
  gap: clamp(26px, 7vw, 96px);
  width: min(1220px, 100%);
  margin: 0 auto;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 14px;
}

.footer-kicker {
  margin: 0;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.footer h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 950;
  line-height: 1.12;
}

.footer p,
.footer strong,
.footer dd,
.footer dt {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.65;
}

.footer strong {
  color: var(--white);
}

.footer-identity p:last-child {
  color: rgba(255, 255, 255, 0.9);
}

.footer .footer-identity .footer-line-id {
  color: var(--yellow);
}

.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 2px;
}

.footer-social-link {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  border-color: var(--yellow);
  color: var(--gray);
  background: var(--yellow);
  transform: translateY(-2px);
}

.footer-social-link img {
  width: 19px;
  height: 19px;
  display: block;
  object-fit: contain;
}

.footer-social-glyph {
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

.footer-social-glyph-play {
  font-size: 13px;
  transform: translateX(1px);
}

.footer-account {
  display: grid;
  gap: 5px;
  margin: 0;
}

.footer-account div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
}

.footer-account dd {
  color: rgba(255, 255, 255, 0.9);
}

.footer-emphasis {
  color: var(--yellow);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.footer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: var(--white);
  background: transparent;
  font-size: 14px;
  font-weight: 950;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.footer-pill:hover,
.footer-pill:focus-visible {
  border-color: var(--yellow);
  color: var(--gray);
  background: var(--yellow);
  transform: translateY(-2px);
}

.footer-pill-disabled {
  color: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.24);
  cursor: default;
}

.footer-pill-disabled:hover,
.footer-pill-disabled:focus-visible {
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.24);
  transform: none;
}

.back-to-top {
  position: absolute;
  right: clamp(18px, 4vw, 54px);
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(249, 201, 6, 0.62);
  border-radius: 50%;
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--yellow);
  color: var(--gray);
  background: var(--yellow);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
  }

  .header-actions {
    margin-left: 0;
  }

  .home-carousel,
  .hero,
  .split,
  .join,
  .admin,
  .policy-lead {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .content-card-grid,
  .civic-link-groups,
  .operation-grid,
  .data-quality-list,
  .data-quality-legend,
  .youbike-zone-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .maintenance-editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
  }

  .carousel-stage {
    height: auto;
  }

  .carousel-control {
    top: calc(100% - 28px);
  }

  .carousel-control.prev {
    left: 16px;
  }

  .carousel-control.next {
    right: 16px;
  }

  .policy-lead {
    width: min(100%, 920px);
  }

  .member-shell {
    grid-template-columns: 1fr;
  }

  .member-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .member-tab {
    text-align: center;
  }
}

@media (max-width: 660px) {
  .site-header {
    padding: 12px 16px;
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand-logo {
    width: 118px;
  }

  .brand small {
    display: none;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .support-link,
  .member-button {
    flex: 1;
  }

  .avatar-button {
    flex: 0 0 48px;
  }

  .youbike-zone-editor-grid,
  .youbike-zone-editor-item {
    grid-template-columns: 1fr;
  }

  .member-dropdown {
    left: 0;
    right: auto;
  }

  .hero-stats,
  .dashboard-grid,
  .content-card-grid,
  .civic-link-groups,
  .operation-grid,
  .data-quality-list,
  .data-quality-legend,
  .carousel-editor-item,
  .dashboard-block-control,
  .planner,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-block-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 8px;
  }

  .dashboard-block-actions button {
    padding: 0 8px;
  }

  .hero-visual img {
    max-height: none;
  }

  .home-carousel {
    padding: 4px 14px 24px;
  }

  .carousel-stage {
    height: auto;
  }

  .carousel-slide {
    grid-template-rows: minmax(0, 1fr) 62px;
  }

  .carousel-slide > div {
    min-height: 62px;
    padding: 8px 48px 26px;
  }

  .carousel-slide h2 {
    font-size: 13pt;
  }

  .carousel-slide p {
    font-size: 16px;
    line-height: 1.55;
  }

  .carousel-control {
    top: calc(100% - 31px);
    width: 40px;
    height: 40px;
  }

  .carousel-control.prev {
    left: 10px;
  }

  .carousel-control.next {
    right: 10px;
  }

  .signal-card {
    position: static;
    margin-top: 14px;
  }

  .footer {
    padding-bottom: 92px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-account div {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .member-tabs {
    grid-template-columns: 1fr;
  }

  .settings-heading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1500px) {
  .site-header {
    gap: 14px;
  }

  .brand {
    flex-basis: 500px;
    min-width: 500px;
  }

  .brand-logo {
    width: 126px;
  }

  .brand strong {
    font-size: 17px;
  }

  .nav {
    gap: 2px;
    font-size: 13px;
  }

  .nav a {
    padding: 0 7px;
  }

  .header-actions {
    gap: 8px;
  }

  .support-link {
    padding: 0 14px;
  }

  .avatar-button::after {
    content: "設定";
  }

  .social-button::after {
    content: "追蹤";
  }
}

@media (max-width: 1500px) {
  .avatar-button::after {
    content: "設定";
  }

  .social-button::after {
    content: "追蹤";
  }
}

@media (max-width: 1320px) {
  .brand {
    flex-basis: 460px;
    min-width: 460px;
  }

  .brand strong {
    font-size: 16px;
  }

  .avatar-button,
  .social-button {
    justify-content: center;
    width: 48px;
    min-width: 48px;
    padding: 5px;
  }

  .avatar-button::after,
  .social-button::after {
    display: none;
  }
}

@media (max-width: 1180px) {
  .avatar-button,
  .social-button {
    justify-content: center;
    width: 48px;
    min-width: 48px;
    padding: 5px;
  }

  .avatar-button::after,
  .social-button::after {
    display: none;
  }
}

@media (max-width: 980px) {
  .dashboard-v2-hero,
  .dashboard-v2-filter,
  .dashboard-analysis-grid.monitoring-grid,
  .traffic-cause-grid,
  .traffic-time-layout,
  .vulnerable-road-user-grid,
  .resource-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-v2-actions,
  .area-header {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .dashboard-update-note {
    text-align: left;
  }

  .area-header {
    flex-direction: column;
  }

  .dashboard-range-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-insights,
  .monitoring-modules {
    grid-template-columns: 1fr;
  }

  .vulnerable-road-user-panel {
    grid-column: auto;
  }

  .traffic-condition-strip,
  .traffic-time-band-grid,
  .traffic-condition-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-kpis,
  .dashboard-resource-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero,
  .dashboard-filter-card,
  .dashboard-analysis-grid,
  .dashboard-analysis-grid.secondary {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-grid,
  .dashboard-issue-grid,
  .dashboard-alert-grid,
  .dashboard-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .brand {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .brand strong {
    min-width: 0;
    font-size: clamp(11px, 3.05vw, 12px);
    line-height: 1.12;
    white-space: nowrap;
  }

  .brand-logo {
    width: 92px;
  }

  .brand-title-platform {
    background: linear-gradient(transparent 66%, rgba(249, 201, 6, 0.42) 0);
  }

  .dashboard-kpi-grid,
  .dashboard-issue-grid,
  .dashboard-alert-grid,
  .dashboard-module-grid,
  .dashboard-range-buttons,
  .compact-kpis,
  .traffic-time-band-grid,
  .traffic-condition-strip,
  .traffic-condition-detail-grid,
  .dashboard-resource-counts,
  .dashboard-aqi-box {
    grid-template-columns: 1fr;
  }

  .civic-dashboard-v2 {
    padding-inline: 14px;
  }

  .traffic-condition-summary-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .traffic-time-head,
  .traffic-time-card-head {
    flex-direction: column;
  }

  .traffic-time-head > span {
    white-space: normal;
  }

  .traffic-hour-bars {
    gap: 3px;
    overflow-x: auto;
  }

  .traffic-hour-bar {
    min-width: 12px;
  }

  .traffic-day-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .traffic-day-row strong {
    grid-column: 2;
    white-space: normal;
  }

  .traffic-condition-detail-card {
    padding: 11px;
  }

  .traffic-cause-pie-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .traffic-cause-pie {
    width: min(220px, 74vw);
  }

  .traffic-cause-pie-legend li {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .traffic-cause-pie-legend span {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }

  .dashboard-area {
    padding: 14px;
  }

  .dashboard-v2-actions {
    width: 100%;
  }

  .dashboard-info-button,
  .dashboard-support-button {
    width: 100%;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .dashboard-insight-card {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 14px;
  }

  .dashboard-insight-icon {
    width: 46px;
    height: 46px;
  }

  .dashboard-map {
    height: 460px;
    min-height: 460px;
  }

  .panel-heading {
    display: grid;
  }

  .traffic-month-row {
    grid-template-columns: 72px minmax(0, 1fr) 42px;
  }

  .traffic-month-row small {
    grid-column: 2 / -1;
  }

  .traffic-cause-rank-list li {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .traffic-cause-rank-list b {
    grid-column: 2;
  }
}

@media (max-width: 980px) {
  .traffic-first-screen .area-header {
    grid-template-columns: 1fr;
  }

  .monitoring-grid > aside {
    order: -1;
  }

  .traffic-first-screen .dashboard-map {
    height: 420px;
    min-height: 420px;
  }
}

@media (max-width: 660px) {
  .dashboard-v2-filter {
    padding: 8px;
  }

  .dashboard-range-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .dashboard-range-buttons button {
    flex: 0 0 104px;
    scroll-snap-align: start;
  }

  .traffic-first-screen .compact-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .traffic-first-screen .dashboard-v2-kpi {
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
  }
}

/* v6 visual skin: clean white surfaces with restrained yellow and purple accents. */
:root {
  --lavender: #B3A4FF;
  --yellow: #F9C906;
  --white: #FFFFFF;
  --berry: #D95A78;
  --gray: #1E1C2C;
  --purple: #7B62FF;
  --ink: #1E1C2C;
  --muted: rgba(30, 28, 44, 0.68);
  --line: rgba(30, 28, 44, 0.12);
  --soft: #FBF9F3;
  --warn: #D99A17;
  --shadow: 0 22px 54px rgba(30, 28, 44, 0.09);
  --fluid-page-width: min(1440px, calc(100vw - clamp(24px, 6vw, 96px)));
}

body {
  color: var(--gray);
  background:
    radial-gradient(circle at 86% 8%, rgba(254, 223, 106, 0.32), transparent 26%),
    radial-gradient(circle at 8% 80%, rgba(229, 221, 255, 0.24), transparent 30%),
    linear-gradient(180deg, #FFFFFF 0%, #FFF9E9 44%, #FFFFFF 100%);
}

.site-header {
  position: sticky;
  top: 12px;
  isolation: isolate;
  width: var(--fluid-page-width);
  min-height: 86px;
  margin: 12px auto 8px;
  padding: 12px 12px 12px clamp(24px, 2.4vw, 34px);
  border: 1px solid rgba(30, 28, 44, 0.08);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(254, 223, 106, 0.9) 0 18%, rgba(255, 255, 255, 0.92) 18% 100%),
    var(--white);
  box-shadow: 0 24px 60px rgba(30, 28, 44, 0.11);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 12px;
  z-index: 1;
  width: 11px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 18px 0 0 rgba(254, 223, 106, 0.28);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 0;
  border: 1px solid rgba(30, 28, 44, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
}

.site-header > * {
  position: relative;
  z-index: 2;
}

.brand {
  flex-basis: clamp(520px, 40vw, 660px);
  min-width: clamp(520px, 40vw, 660px);
  gap: 16px;
}

.brand-logo {
  width: 128px;
}

.brand strong {
  font-size: clamp(20px, 1.48vw, 29px);
  gap: 10px;
}

.brand-title-divider {
  display: inline-block;
  width: 1px;
  height: 1.15em;
  color: transparent;
  background: rgba(30, 28, 44, 0.3);
  transform: translateY(0.12em);
}

.brand-title-platform {
  color: var(--purple);
  background: none;
}

.brand small {
  width: max-content;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(254, 223, 106, 0.78), rgba(255, 255, 255, 0.82));
}

.brand-subtitle-lead {
  color: var(--gray);
}

.brand-subtitle-tag {
  border-color: rgba(123, 98, 255, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -2px 0 rgba(254, 223, 106, 0.45);
}

.nav {
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.nav a {
  min-height: 40px;
  padding-inline: 14px;
  color: var(--gray);
}

.nav a.is-active,
.nav a[aria-current="page"],
.nav a:hover,
.nav a:focus-visible {
  border-color: transparent;
  color: var(--white);
  background: var(--purple);
  box-shadow: 0 10px 22px rgba(123, 98, 255, 0.18);
}

.nav a::after {
  display: none;
}

.avatar-button,
.social-button,
.member-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(30, 28, 44, 0.07);
}

.avatar-button:hover,
.avatar-button:focus-visible,
.social-button:hover,
.social-button:focus-visible,
.member-button:hover,
.member-button:focus-visible {
  border-color: rgba(123, 98, 255, 0.2);
  background: var(--white);
  box-shadow: 0 14px 28px rgba(30, 28, 44, 0.12);
  transform: translateY(-2px);
}

.social-button::before,
.social-button::after {
  display: none;
}

.social-button img {
  border-radius: 50%;
  filter: saturate(0.72) brightness(1.03);
}

.social-line-link {
  width: 48px;
  min-width: 48px;
  justify-content: center;
  padding: 5px;
  text-decoration: none;
}

.social-line-link::before,
.social-line-link::after {
  display: none !important;
}

.social-line-link img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
  filter: none;
}

.avatar-button {
  width: 48px;
  min-width: 48px;
  justify-content: center;
  padding: 5px;
  border-radius: 50%;
  text-decoration: none;
}

.avatar-button::before,
.avatar-button::after {
  display: none !important;
}

.avatar-button img {
  width: 34px;
  height: 34px;
  border-width: 0;
  background: #F5F4FB;
  box-shadow: none;
}

.support-link,
.carousel-link,
.dashboard-support-button {
  border-color: rgba(254, 223, 106, 0.78);
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 15px 28px rgba(254, 223, 106, 0.34);
}

.support-link:hover,
.support-link:focus-visible,
.carousel-link:hover,
.carousel-link:focus-visible,
.dashboard-support-button:hover,
.dashboard-support-button:focus-visible {
  background: #FFD261;
  box-shadow: 0 14px 28px rgba(30, 28, 44, 0.12);
  transform: translateY(-2px);
}

.member-dropdown,
.social-dropdown,
.member-identity-popover {
  border-color: rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 42px rgba(30, 28, 44, 0.12);
  backdrop-filter: blur(18px);
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.member-menu.is-open .member-dropdown,
.social-menu.is-open .social-dropdown,
.member-menu:hover:not(.is-open) .member-identity-popover {
  transform: translateY(0) scale(1);
}

.member-dropdown a:hover,
.social-dropdown a:hover,
.dropdown-button:hover {
  color: var(--purple);
  background: rgba(250, 229, 174, 0.42);
}

.logout-modal__backdrop {
  background: rgba(52, 50, 65, 0.24);
}

.logout-modal__panel {
  border-color: rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 64px rgba(30, 28, 44, 0.18);
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.logout-modal.is-open .logout-modal__panel {
  transform: translateY(0) scale(1);
}

.home-carousel {
  padding: clamp(8px, 1.2vw, 18px) 0 clamp(28px, 4vw, 56px);
  background: transparent;
}

.carousel-stage {
  width: var(--fluid-page-width);
  max-width: none;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: var(--white);
  box-shadow: 0 22px 50px rgba(30, 28, 44, 0.1);
}

.carousel-stage::after {
  content: "";
  position: absolute;
  left: 11%;
  right: 11%;
  bottom: -28px;
  z-index: -1;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(30, 28, 44, 0.18), transparent 68%);
  filter: blur(13px);
}

.carousel-slide {
  border-radius: 30px;
  background: var(--white);
}

.carousel-slide::before {
  aspect-ratio: 1920 / 900;
  background:
    var(--slide-image) center center / contain no-repeat,
    linear-gradient(135deg, #FFFFFF, #FFF8E7);
}

.carousel-slide > div {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.carousel-slide h2 {
  color: var(--ink);
}

.carousel-slide.has-missing-image::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 231, 0.96)),
    repeating-linear-gradient(45deg, rgba(123, 98, 255, 0.08) 0 1px, transparent 1px 18px);
}

.carousel-control {
  border-color: var(--line);
  color: var(--purple);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 28px rgba(30, 28, 44, 0.08);
}

.carousel-control.prev {
  left: clamp(12px, 1.6vw, 22px);
}

.carousel-control.next {
  right: clamp(12px, 1.6vw, 22px);
}

.carousel-control:hover,
.carousel-control:focus-visible {
  border-color: rgba(123, 98, 255, 0.22);
  background: var(--white);
  box-shadow: 0 14px 28px rgba(30, 28, 44, 0.12);
}

.carousel-dots button {
  border-color: rgba(123, 98, 255, 0.16);
  background: rgba(123, 98, 255, 0.16);
}

.carousel-dots button.active {
  border-color: var(--purple);
  background: var(--purple);
}

.policy-story,
.policy-video,
.content-card,
.dashboard-area,
.dashboard-panel,
.dashboard-v2-kpi,
.traffic-cause-card,
.traffic-summary-card,
.traffic-time-card,
.traffic-trend-card,
.traffic-condition-mini-card,
.traffic-condition-detail-card,
.dashboard-module-card,
.dashboard-resource-counts div,
.dashboard-filter-card,
.auth-card,
.login-card,
.member-panel,
.backend-hero {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 30px rgba(30, 28, 44, 0.07);
  backdrop-filter: blur(18px);
}

.home-policy {
  padding-left: 0;
  padding-right: 0;
}

.policy-lead,
.policy-card-heading,
.policy-card-grid {
  width: var(--fluid-page-width);
  margin-left: auto;
  margin-right: auto;
}

.policy-story {
  box-shadow: inset 6px 0 0 rgba(254, 223, 106, 0.78), 0 12px 30px rgba(30, 28, 44, 0.07);
}

.policy-story h3,
.policy-card-heading h2,
.dashboard-v2-hero p,
.area-title h2,
.area-header h2,
.panel-heading h2,
.panel-heading h3,
.traffic-cause-card h3,
.traffic-time-card-head strong,
.dashboard-panel h2,
.dashboard-panel h3,
.dashboard-data-note,
.dashboard-block-badge,
.content-card h3 {
  color: var(--purple);
}

.content-card,
.policy-card-grid .content-card {
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 12%, rgba(250, 229, 174, 0.28), transparent 28%),
    rgba(255, 255, 255, 0.76);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.content-card:hover,
.content-card:focus-within,
.dashboard-panel:hover,
.dashboard-v2-kpi:hover {
  border-color: rgba(123, 98, 255, 0.14);
  box-shadow: 0 18px 36px rgba(30, 28, 44, 0.1);
  transform: translateY(-3px);
}

.policy-card-grid .content-card span,
.home-dashboard-highlights span,
.content-card span {
  color: var(--purple);
}

.policy-card-grid .policy-service-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 0;
  border-color: rgba(30, 28, 44, 0.08);
  background:
    radial-gradient(circle at 88% 8%, rgba(254, 223, 106, 0.34), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
}

.policy-card-grid .policy-service-card::after {
  content: "";
  position: absolute;
  inset: auto 20px 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #b3a4ff, #fedf6a);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 240ms ease;
}

.policy-service-card-head {
  display: grid;
  min-height: 174px;
  width: 100%;
  place-items: center;
  gap: 14px;
  padding: 24px 20px 22px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.policy-service-icon {
  display: inline-grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(254, 223, 106, 0.82), rgba(255, 255, 255, 0.96));
  box-shadow:
    0 16px 28px rgba(30, 28, 44, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.policy-service-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.policy-service-title {
  display: grid;
  gap: 6px;
}

.policy-card-grid .policy-service-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.policy-service-title strong {
  color: var(--ink);
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 950;
  line-height: 1.3;
}

.policy-service-detail {
  display: grid;
  gap: 10px;
  max-height: 0;
  padding: 0 22px;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: max-height 320ms ease, opacity 220ms ease 120ms, transform 220ms ease 120ms, padding 260ms ease;
}

.policy-card-grid .policy-service-detail p {
  margin: 0;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.65;
}

.policy-card-grid .policy-service-detail p strong {
  color: var(--ink);
}

.policy-service-card:hover::after,
.policy-service-card:focus-within::after,
.policy-service-card.is-open::after {
  opacity: 1;
  transform: scaleX(1);
}

.policy-service-card:hover .policy-service-icon,
.policy-service-card:focus-within .policy-service-icon,
.policy-service-card.is-open .policy-service-icon {
  animation: policyIconHop 520ms cubic-bezier(0.22, 1.34, 0.36, 1);
}

.policy-service-card:hover .policy-service-detail,
.policy-service-card:focus-within .policy-service-detail,
.policy-service-card.is-open .policy-service-detail {
  max-height: 260px;
  padding: 0 22px 24px;
  opacity: 1;
  transform: translateY(0);
}

.policy-service-card:hover,
.policy-service-card:focus-within,
.policy-service-card.is-open {
  border-color: rgba(179, 164, 255, 0.28);
  box-shadow: 0 22px 44px rgba(30, 28, 44, 0.12);
}

@keyframes policyIconHop {
  0% {
    transform: translateY(0) scale(1);
  }
  38% {
    transform: translateY(-10px) scale(1.04);
  }
  68% {
    transform: translateY(2px) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .policy-service-card:hover .policy-service-icon,
  .policy-service-card:focus-within .policy-service-icon,
  .policy-service-card.is-open .policy-service-icon {
    animation: none;
  }

  .policy-service-detail,
  .policy-card-grid .policy-service-card::after {
    transition: none;
  }
}

.policy-card-grid .content-card span,
.dashboard-v2-kpi i,
.dashboard-insight-icon,
.traffic-summary-card::before,
.traffic-condition-mini-card::before {
  background: rgba(254, 223, 106, 0.48);
}

.policy-card-grid {
  align-items: start;
}

.policy-card-grid .policy-service-card {
  align-self: start;
}

.policy-card-grid .policy-service-icon {
  background:
    linear-gradient(145deg, rgba(254, 223, 106, 0.82), rgba(255, 255, 255, 0.96));
}

.policy-card-grid .policy-service-title,
.policy-card-grid .policy-service-title small,
.policy-card-grid .policy-service-title strong {
  background: transparent;
}

.dashboard-v2-kpi i {
  color: var(--white);
}

.dashboard-v2-kpi:nth-child(1) i {
  background: linear-gradient(135deg, #F05B7D, #C91F55);
}

.dashboard-v2-kpi:nth-child(2) i {
  background: linear-gradient(135deg, #1e1c2c, #15131D);
}

.dashboard-v2-kpi:nth-child(3) i {
  color: #1e1c2c;
  background: linear-gradient(135deg, #fedf6a, #F2A900);
}

.dashboard-v2-kpi:nth-child(4) i {
  background: linear-gradient(135deg, #b3a4ff, #2F8EA1);
}

.dashboard-v2-filter {
  border-color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 30px rgba(30, 28, 44, 0.07);
  backdrop-filter: blur(18px);
}

.dashboard-range-buttons {
  gap: 6px;
}

.dashboard-range-buttons button {
  border-color: transparent;
  border-radius: 999px;
  color: var(--purple);
  background: transparent;
}

.dashboard-range-buttons button:hover,
.dashboard-range-buttons button:focus-visible {
  border-color: transparent;
  color: var(--ink);
  background: rgba(250, 229, 174, 0.5);
  box-shadow: none;
}

.dashboard-range-buttons button.active {
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 10px 22px rgba(254, 223, 106, 0.24);
}

.dashboard-area {
  border-radius: 30px;
}

.dashboard-panel {
  border-radius: 22px;
}

.dashboard-map,
.map-canvas,
.dashboard-mini-map,
.dashboard-resource-map {
  border-color: rgba(123, 98, 255, 0.08);
  background-color: #FFF8E7;
}

.leaflet-container {
  background: #FFF8E7;
}

.rank-info-button {
  border-color: rgba(123, 98, 255, 0.18);
  color: var(--purple);
  background: rgba(229, 221, 255, 0.58);
}

.rank-info-button:hover,
.rank-info-button:focus-visible {
  background: rgba(254, 223, 106, 0.52);
}

.traffic-rank-list li,
.traffic-cause-rank-list li,
.traffic-detail-item,
.dashboard-light-list div,
.dashboard-resource-counts div,
.traffic-time-band-card,
.traffic-month-row,
.traffic-condition-row,
.traffic-condition-detail-card li {
  background: rgba(255, 255, 255, 0.66);
}

.traffic-hotspot-rank {
  color: var(--white);
  background: var(--gray);
}

.traffic-hotspot-count,
.traffic-cause-rank-list b,
.traffic-summary-card strong,
.traffic-time-band-card strong,
.traffic-time-card-head strong {
  color: var(--purple);
}

.traffic-cause-pie,
.traffic-cause-donut,
.traffic-condition-donut,
.traffic-time-chart i.hot,
.traffic-trend-bars i.hot {
  filter: saturate(0.82) brightness(1.03);
}

.footer {
  color: rgba(255, 255, 255, 0.9);
  background: var(--gray);
  box-shadow: 0 -12px 38px rgba(30, 28, 44, 0.08);
}

.footer-kicker,
.footer-emphasis,
.footer .footer-identity .footer-line-id,
.back-to-top {
  color: var(--yellow);
}

.footer-pill:hover,
.footer-pill:focus-visible,
.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--ink);
  background: var(--yellow);
}

.home-carousel,
.policy-story,
.policy-video,
.policy-card-grid .content-card,
.dashboard-v2-hero,
.dashboard-area,
.dashboard-panel,
.dashboard-v2-kpi,
.footer {
  animation: akanSoftRiseIn 0.68s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.policy-video,
.dashboard-area:nth-of-type(2) {
  animation-delay: 0.08s;
}

.policy-card-grid .content-card:nth-child(2),
.dashboard-panel:nth-child(2),
.dashboard-v2-kpi:nth-child(2) {
  animation-delay: 0.06s;
}

.policy-card-grid .content-card:nth-child(3),
.dashboard-panel:nth-child(3),
.dashboard-v2-kpi:nth-child(3) {
  animation-delay: 0.1s;
}

.policy-card-grid .content-card:nth-child(4),
.dashboard-v2-kpi:nth-child(4) {
  animation-delay: 0.14s;
}

@keyframes akanSoftRiseIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    top: 8px;
    width: min(100% - 20px, 760px);
    border-radius: 28px;
  }

  .site-header > *,
  .nav {
    min-width: 0;
  }

  .dashboard-v2-filter {
    border-radius: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .site-header {
    align-items: flex-start;
    margin-top: 8px;
    padding: 10px;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  .brand-logo {
    width: 84px;
  }

  .brand strong,
  .brand small,
  .brand-subtitle-lead,
  .brand-subtitle-tags {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .brand small {
    grid-template-columns: 1fr;
  }

  .nav {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .member-dropdown,
  .social-dropdown,
  .member-identity-popover {
    right: auto;
    left: 0;
  }

  .carousel-stage,
  .carousel-slide {
    border-radius: 24px;
  }

  .carousel-stage {
    overflow: hidden;
  }

  .carousel-control.prev {
    left: 10px;
  }

  .carousel-control.next {
    right: 10px;
  }

  .dashboard-area {
    border-radius: 24px;
  }
}

/* Accepted banner option B: glass dashboard identity strip. */
.site-header {
  top: 12px;
  isolation: isolate;
  width: var(--fluid-page-width);
  min-height: 96px;
  margin: 12px auto 8px;
  padding: 12px 16px 12px 18px;
  overflow: hidden;
  border: 1px solid rgba(30, 28, 44, 0.1);
  border-radius: 34px;
  background:
    linear-gradient(115deg, rgba(254, 223, 106, 0.88) 0 22%, rgba(255, 255, 255, 0.78) 22% 77%, rgba(229, 221, 255, 0.68) 100%),
    var(--white);
  box-shadow:
    0 30px 70px rgba(30, 28, 44, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 0;
  width: auto;
  border: 0;
  border-radius: 25px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(135deg, rgba(123, 98, 255, 0.075) 0 1px, transparent 1px 18px);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  bottom: auto;
  left: auto;
  z-index: 0;
  width: 164px;
  height: 164px;
  border: 1px solid rgba(123, 98, 255, 0.13);
  border-radius: 42px;
  background:
    linear-gradient(90deg, rgba(123, 98, 255, 0.11), transparent 1px),
    linear-gradient(0deg, rgba(123, 98, 255, 0.11), transparent 1px);
  background-size: 24px 24px;
  opacity: 0.48;
  transform: translateY(-50%) rotate(12deg);
  animation: bannerFloatGrid 7s ease-in-out infinite;
}

.site-header > * {
  position: relative;
  z-index: 2;
}

.brand {
  flex-basis: clamp(560px, 46vw, 820px);
  min-width: clamp(560px, 46vw, 820px);
  gap: 18px;
  min-height: 72px;
}

.brand::after {
  content: "";
  position: absolute;
  left: clamp(158px, 11.6vw, 190px);
  right: clamp(72px, 9vw, 160px);
  bottom: 4px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), rgba(121, 216, 214, 0.78), rgba(123, 98, 255, 0.28), transparent);
  box-shadow: 0 8px 18px rgba(121, 216, 214, 0.18);
  transform-origin: left;
  animation: bannerDataLine 5s ease-in-out infinite;
}

.brand::before {
  content: "";
  position: absolute;
  left: clamp(158px, 11.6vw, 190px);
  bottom: 1px;
  z-index: 3;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #b3a4ff;
  box-shadow: 0 0 0 6px rgba(121, 216, 214, 0.13);
  animation: bannerDataDot 5s ease-in-out infinite;
}

.brand-logo {
  width: clamp(132px, 10.4vw, 172px);
  filter: drop-shadow(0 12px 20px rgba(30, 28, 44, 0.1));
}

.brand strong {
  gap: 12px;
  font-size: clamp(24px, 1.95vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-title-main,
.candidate-title {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1vw, 16px);
  min-width: 0;
}

.brand-title-main.brand-title-plain {
  gap: 10px;
  color: var(--ink);
  white-space: nowrap;
}

.candidate-name.is-text,
.brand-title-platform-text {
  display: inline-flex;
  align-items: center;
  font-size: clamp(20px, 1.45vw, 26px);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1.1;
}

.candidate-title-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.candidate-name {
  font-size: 1em;
  font-weight: 1000;
}

.candidate-name.is-image {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.candidate-wordmark {
  display: block;
  width: clamp(142px, 10.4vw, 182px);
  max-height: clamp(43px, 3.2vw, 56px);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 8px 14px rgba(47, 48, 59, 0.1));
}

.candidate-role {
  color: rgba(30, 28, 44, 0.72);
  font-size: 0.56em;
  font-weight: 950;
  transform: translateY(-0.08em);
}

.brand-title-divider {
  width: 2px;
  height: 0.9em;
  color: transparent;
  background: rgba(30, 28, 44, 0.18);
  transform: translateY(0.08em);
}

.brand-title-plain .brand-title-divider {
  width: auto;
  height: auto;
  color: rgba(30, 28, 44, 0.38);
  background: transparent;
  font-size: clamp(18px, 1.25vw, 23px);
  font-weight: 900;
  transform: none;
}

.brand-title-platform {
  color: var(--purple);
}

.platform-name-image {
  display: block;
  width: clamp(150px, 12.5vw, 190px);
  max-height: 36px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 7px 14px rgba(30, 28, 44, 0.1));
}

.platform-title-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 0 3px;
  background: transparent;
  color: #1e1c2c;
  font-size: clamp(11px, 0.78vw, 13px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-platform-stack {
  display: inline-flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.candidate-title-badge {
  display: block;
  flex: 0 0 auto;
  width: clamp(138px, 10vw, 172px);
  max-width: min(172px, 28vw);
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 5px 10px rgba(30, 28, 44, 0.08));
}

.candidate-title-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  max-width: none;
  color: rgba(30, 28, 44, 0.86);
  font-size: clamp(9px, 0.62vw, 11px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: left;
}

.candidate-title-role {
  color: #1e1c2c;
  font-weight: 1000;
}

.candidate-title-separator {
  color: rgba(30, 28, 44, 0.45);
  font-weight: 700;
}

.candidate-title-hash {
  padding: 1px 5px 2px;
  border: 1px solid rgba(179, 164, 255, 0.46);
  border-radius: 999px;
  color: #7B62FF;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -1px 0 rgba(254, 223, 106, 0.36);
  font-size: 0.88em;
  line-height: 1.05;
}

.brand small {
  width: auto !important;
  min-height: 27px;
  margin-top: 8px;
  padding: 0;
  background: transparent;
}

.brand-subtitle-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.brand-subtitle-lead {
  display: none;
}

.brand-subtitle-tag {
  min-height: 23px;
  padding: 3px 12px 4px;
  border-color: rgba(123, 98, 255, 0.16);
  color: var(--purple);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -2px 0 rgba(254, 223, 106, 0.45);
  font-size: 12.5px;
}

.brand-subtitle-separator {
  color: rgba(30, 28, 44, 0.48);
  font-size: 12px !important;
  font-weight: 900;
  line-height: 1;
}

@keyframes bannerFloatGrid {
  0%, 100% { transform: translateY(-50%) rotate(12deg) translateX(0); }
  50% { transform: translateY(-53%) rotate(12deg) translateX(-8px); }
}

@keyframes bannerDataLine {
  0%, 100% { transform: scaleX(0.32); opacity: 0.62; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes bannerDataDot {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(min(34vw, 520px)); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header::after,
  .brand::before,
  .brand::after {
    animation: none;
  }
}

@media (max-width: 1180px) {
  .brand {
    flex-basis: min(100%, 720px);
    min-width: min(100%, 720px);
  }

  .nav {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 8px;
    width: min(100% - 24px, 720px);
    min-height: 154px;
    padding: 12px;
    border-radius: 28px;
  }

  .site-header::before {
    inset: 8px;
    border-radius: 22px;
  }

  .site-header::after {
    right: -22px;
    width: 150px;
    height: 150px;
  }

  .brand {
    width: 100%;
    min-width: 0;
    gap: 10px 12px;
  }

  .brand-logo {
    width: 142px;
  }

  .brand-text {
    min-width: 0;
  }

  .brand strong {
    display: block;
    font-size: 24px;
    line-height: 1.22;
    white-space: normal;
  }

  .brand-title-main,
  .candidate-title {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 9px;
  }

  .candidate-role {
    font-size: 0.58em;
  }

  .brand-title-divider {
    display: none;
  }

  .brand-title-platform {
    display: block;
  }

  .brand::before {
    left: 12px;
    bottom: 0;
  }

  .brand::after {
    left: 12px;
    right: 84px;
    bottom: 3px;
  }

  .brand-subtitle-tags {
    gap: 7px;
  }
}

/* Banner B cleanup: wider, quieter, and closer to the simpler POC feel. */
:root {
  --banner-page-width: min(1640px, calc(100vw - clamp(16px, 2.2vw, 36px)));
}

.site-header {
  width: var(--banner-page-width);
  min-height: 88px;
  padding: 10px 14px 10px 16px;
  border-radius: 28px;
}

.site-header::before {
  inset: 10px;
  border-radius: 22px;
}

.site-header::after {
  right: 18px;
  width: 132px;
  height: 132px;
  opacity: 0.32;
}

.brand {
  flex-basis: clamp(590px, 45vw, 760px);
  min-width: clamp(590px, 45vw, 760px);
  min-height: 64px;
  gap: 14px;
}

.brand-logo {
  width: clamp(118px, 8.8vw, 148px);
}

.brand strong {
  gap: 9px;
  font-size: clamp(23px, 1.62vw, 30px);
  line-height: 1.08;
}

.brand-title-main,
.candidate-title {
  gap: 8px;
}

.candidate-role {
  color: rgba(30, 28, 44, 0.66);
  font-size: 0.48em;
  font-weight: 900;
}

.brand-title-divider {
  width: 1px;
  height: 0.78em;
  opacity: 0.58;
}

.brand-title-platform {
  font-size: 1em;
  font-weight: 1000;
}

.brand small {
  min-height: 22px;
  margin-top: 5px;
}

.brand-subtitle-tags {
  gap: 6px;
}

.brand-subtitle-tag {
  min-height: 21px;
  padding: 2px 10px 3px;
  font-size: 12px;
  line-height: 1.05;
}

.brand::after {
  left: clamp(134px, 9.9vw, 166px);
  right: clamp(92px, 12vw, 210px);
  bottom: 2px;
  height: 3px;
  opacity: 0.75;
}

.brand::before {
  left: clamp(134px, 9.9vw, 166px);
  bottom: -1px;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 5px rgba(121, 216, 214, 0.11);
}

.nav {
  padding: 4px;
}

.nav a {
  min-height: 36px;
  padding-inline: 13px;
  gap: 6px;
  font-size: 15px !important;
  font-weight: 900;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: rgba(121, 216, 214, 0.72);
  color: #2F6F80;
  background: rgba(121, 216, 214, 0.28);
  box-shadow: 0 10px 22px rgba(121, 216, 214, 0.2);
}

.support-link {
  min-height: 42px;
  padding-inline: 16px;
}

.support-link {
  position: relative;
  isolation: isolate;
  min-height: 44px;
  padding-inline: 20px;
  overflow: hidden;
  border-radius: 999px;
  border-color: rgba(255, 211, 85, 0.96);
  color: #2E2B36;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #FFF2A4 0%, #fedf6a 46%, #F2C337 100%);
  box-shadow:
    0 3px 0 #C99A11,
    0 15px 26px rgba(242, 195, 55, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(173, 129, 0, 0.2);
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);
  letter-spacing: 0;
}

.support-link::before {
  content: "";
  position: absolute;
  inset: 3px 6px auto;
  height: 38%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.support-link:hover,
.support-link:focus-visible {
  color: #24212C;
  border-color: rgba(254, 223, 106, 1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #FFF7BE 0%, #FFE08E 44%, #f9c906 100%);
  box-shadow:
    0 5px 0 #B98400,
    0 20px 34px rgba(242, 195, 55, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(173, 129, 0, 0.18);
  transform: translateY(-3px);
}

.support-link:active {
  box-shadow:
    0 1px 0 #B98400,
    0 9px 18px rgba(242, 195, 55, 0.28),
    inset 0 2px 5px rgba(173, 129, 0, 0.2);
  transform: translateY(1px);
}

.site-header {
  overflow: visible;
}

.site-header::before,
.site-header::after {
  pointer-events: none;
}

.member-menu {
  z-index: 20;
}

.member-dropdown,
.member-identity-popover {
  z-index: 2400;
}

@media (max-width: 980px) {
  .member-dropdown,
  .member-identity-popover {
    right: auto;
    left: 0;
  }
}

@media (max-width: 1180px) {
  .site-header {
    width: min(100% - 20px, 980px);
  }

  .brand {
    flex-basis: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .site-header {
    width: min(100% - 20px, 720px);
    min-height: auto;
    padding: 10px;
    border-radius: 26px;
  }

  .brand {
    min-height: 0;
    gap: 8px 11px;
  }

  .brand-logo {
    width: 118px;
  }

  .brand strong {
    font-size: 23px;
    line-height: 1.14;
  }

  .brand-title-main.brand-title-plain {
    flex-wrap: wrap;
    gap: 5px 8px;
    white-space: normal;
  }

  .candidate-name.is-text,
  .brand-title-platform-text {
    font-size: 20px;
  }

  .candidate-role {
    font-size: 0.52em;
  }

  .candidate-wordmark {
    width: clamp(142px, 48vw, 220px);
    max-height: 64px;
  }

  .brand small {
    margin-top: 5px;
  }

  .brand-subtitle-tag {
    min-height: 20px;
    padding-inline: 9px;
    font-size: 11.5px;
  }

  .brand::before {
    left: 10px;
    bottom: -1px;
  }

  .brand::after {
    left: 10px;
    right: 72px;
    bottom: 2px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Global typography cleanup: keep public pages to three readable sizes and gray headings. */
:root {
  --type-small: 13px;
  --type-body: 16px;
  --type-title: 28px;
  --heading-gray: #1e1c2c;
  --heading-muted-gray: #6E6B76;
}

body {
  font-size: var(--type-body);
}

:where(p, li, a, button, input, select, textarea, label, td, th, dt, dd, summary, span, small, em, b, strong, div) {
  font-size: var(--type-body) !important;
}

:where(
  small,
  .eyebrow,
  .env-poc-badge,
  .brand-subtitle-lead,
  .brand-subtitle-tag,
  .nav,
  .nav a,
  .support-link,
  .member-dropdown a,
  .social-dropdown a,
  .member-identity-popover,
  .carousel-slide p,
  .dashboard-update-note,
  .dashboard-data-note,
  .dashboard-block-badge,
  .dashboard-v2-filter span,
  .dashboard-range-buttons button,
  .dashboard-v2-kpi span,
  .dashboard-v2-kpi em,
  .dashboard-v2-kpi small,
  .dashboard-panel p,
  .traffic-rank-note,
  .traffic-detail-row,
  .traffic-condition-caption,
  .footer p,
  .footer a
) {
  font-size: var(--type-small) !important;
}

:where(
  h1,
  h2,
  h3,
  .brand strong,
  .brand-title-main,
  .brand-title-platform,
  .candidate-name,
  .carousel-slide h2,
  .section-heading h2,
  .policy-card-heading h2,
  .policy-story h3,
  .policy-video-meta h3,
  .policy-card-grid .content-card h3,
  .content-card h3,
  .dashboard-v2-hero h1,
  .area-title h2,
  .area-header h2,
  .panel-heading h2,
  .panel-heading h3,
  .dashboard-panel h2,
  .dashboard-panel h3,
  .traffic-cause-card-head h3,
  .traffic-time-head h3,
  .traffic-condition-summary-head h3,
  .dashboard-section-title,
  .dashboard-v2-kpi strong,
  .dashboard-aqi-box strong,
  .dashboard-resource-counts strong,
  .dashboard-issue-card strong,
  .dashboard-module-card strong,
  .member-intro h1,
  .member-panel h2,
  .backend-hero h1,
  .admin h2,
  .footer h2
) {
  font-size: var(--type-title) !important;
  line-height: 1.18;
}

:where(
  h1,
  h2,
  h3,
  .brand strong,
  .brand-title-main,
  .brand-title-platform,
  .candidate-name,
  .section-heading h2,
  .policy-card-heading h2,
  .policy-story h3,
  .policy-video-meta h3,
  .policy-card-grid .content-card h3,
  .content-card h3,
  .dashboard-v2-hero h1,
  .area-title h2,
  .area-header h2,
  .panel-heading h2,
  .panel-heading h3,
  .dashboard-panel h2,
  .dashboard-panel h3,
  .traffic-cause-card-head h3,
  .traffic-time-head h3,
  .traffic-condition-summary-head h3,
  .dashboard-section-title,
  .member-intro h1,
  .member-panel h2,
  .backend-hero h1,
  .admin h2
) {
  color: var(--heading-gray) !important;
}

.candidate-role {
  color: var(--heading-muted-gray) !important;
  font-size: var(--type-small) !important;
}

.brand-title-platform {
  background: none !important;
}

.brand-subtitle-tag {
  color: var(--heading-gray) !important;
}

@media (max-width: 760px) {
  :root {
    --type-small: 12px;
    --type-body: 15px;
    --type-title: 24px;
  }
}

/* Carousel and color cleanup requested after v0.5.154. */
.carousel-slide > div,
.carousel-slide h2,
.carousel-slide p,
.carousel-link {
  display: none !important;
}

.carousel-full-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  border-radius: inherit;
  color: transparent !important;
  font-size: 0 !important;
}

.carousel-control {
  top: 50% !important;
  width: 48px;
  height: 48px;
  color: var(--heading-gray) !important;
  background: rgba(255, 255, 255, 0.92);
}

.carousel-control.prev {
  left: calc(-1 * clamp(54px, 4vw, 72px)) !important;
}

.carousel-control.next {
  right: calc(-1 * clamp(54px, 4vw, 72px)) !important;
}

.carousel-dots button {
  border-color: rgba(30, 28, 44, 0.18) !important;
  background: rgba(30, 28, 44, 0.18) !important;
}

.carousel-dots button.active {
  border-color: var(--heading-gray) !important;
  background: var(--heading-gray) !important;
}

:where(
  .brand-subtitle-lead,
  .brand-subtitle-tag,
  .brand-title-platform,
  .carousel-control,
  .nav a,
  .dashboard-range-buttons button,
  .dashboard-info-button,
  .dashboard-v2-filter span,
  .dashboard-coverage strong,
  .dashboard-area strong,
  .dashboard-insight-card span,
  .dashboard-v2-kpi i,
  .dashboard-v2-kpi small,
  .dashboard-data-note,
  .dashboard-block-badge,
  .traffic-cause-label,
  .traffic-rank-meta,
  .traffic-prevention-advice h4,
  .traffic-time-head strong,
  .traffic-condition-summary-head strong,
  .carousel-editor-item legend,
  .admin a,
  .backend-hero a
) {
  color: var(--heading-gray) !important;
}

:where(
  .policy-video-actions a,
  .policy-video-actions button,
  .policy-card-grid span,
  .content-card span,
  .dashboard-v2-hero p,
  .area-tag,
  .rank-info-button,
  .traffic-rank-list span,
  .traffic-rank-list button,
  .traffic-rank-toggle,
  .traffic-rank-toggle *,
  .traffic-prevention-advice,
  .traffic-prevention-advice *,
  .traffic-time-analysis,
  .traffic-time-analysis *,
  .traffic-condition-summary,
  .traffic-condition-summary *,
  .traffic-cause-card,
  .traffic-cause-card *,
  .dashboard-range-buttons button.active
) {
  color: var(--heading-gray) !important;
}

.civic-dashboard :where(span, b, button, h4, p, a) {
  color: var(--heading-gray) !important;
}

.policy-card-grid .policy-service-title,
.policy-card-grid .policy-service-title *,
.policy-card-grid .policy-service-card-head,
.policy-card-grid .policy-service-card-head * {
  background-color: transparent !important;
}

.policy-card-grid .policy-service-icon {
  background:
    linear-gradient(145deg, rgba(254, 223, 106, 0.82), rgba(255, 255, 255, 0.96)) !important;
}

.civic-dashboard .dashboard-v2-kpi i {
  color: #FFFFFF !important;
}

.civic-dashboard .dashboard-v2-kpi:nth-child(3) i {
  color: #1e1c2c !important;
}

.civic-dashboard-v2 {
  padding-top: clamp(8px, 1.4vw, 18px);
}

.dashboard-v2-hero {
  grid-template-columns: minmax(320px, 0.86fr) minmax(620px, 1.14fr);
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  margin-bottom: 8px;
}

.dashboard-v2-title-block[hidden] {
  display: none;
}

.dashboard-v2-hero.dashboard-v2-hero-title-hidden {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 0;
}

.dashboard-v2-hero.dashboard-v2-hero-title-hidden .dashboard-v2-control-panel {
  justify-self: end;
  width: min(100%, 1280px);
}

.dashboard-v2-hero h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 2.1vw, 30px) !important;
  line-height: 1.05 !important;
}

.dashboard-v2-control-panel {
  display: grid;
  grid-template-columns: minmax(320px, auto) minmax(560px, 1fr);
  align-items: center;
  gap: 4px;
}

.dashboard-problem-flow {
  color: #7b62ff;
  font-size: clamp(18px, 1.35vw, 22px) !important;
  font-weight: 1000;
  line-height: 1.25;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

main .dashboard-section-title h2 {
  font-size: 22px !important;
}

.dashboard-v2-filter {
  padding: 6px;
}

.dashboard-v2-filter.time-only > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.dashboard-v2-filter span {
  flex: 0 0 auto;
  margin: 0 !important;
  white-space: nowrap;
}

.dashboard-range-buttons {
  flex: 1 1 auto;
  display: flex;
  grid-template-columns: none;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.dashboard-range-buttons button {
  flex: 1 1 clamp(82px, 9vw, 128px);
  min-width: 82px;
  min-height: 30px;
  padding: 4px 10px;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-v2-filter.is-custom-range .dashboard-range-buttons {
  flex: 1 1 100%;
}

.dashboard-v2-filter.is-custom-range input[type="date"],
.dashboard-v2-filter.is-custom-range .dashboard-date-apply {
  margin-top: 2px;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 13px !important;
  font-weight: 900;
  line-height: 1;
}

.dashboard-v2-filter.is-custom-range input[type="date"] {
  flex: 1 1 154px;
  width: auto;
  min-width: 154px;
  max-width: 210px;
}

.dashboard-v2-filter.is-custom-range .dashboard-date-apply {
  flex: 0 0 auto;
  min-width: 92px;
}

.nav a.is-active,
.nav a[aria-current="page"] {
  border-color: rgba(121, 216, 214, 0.92) !important;
  color: #7b62ff !important;
  background: linear-gradient(135deg, rgba(121, 216, 214, 0.42), rgba(254, 223, 106, 0.34)) !important;
  box-shadow: 0 10px 22px rgba(121, 216, 214, 0.2), inset 0 -2px 0 rgba(254, 223, 106, 0.82) !important;
}

.nav a.nav-home-link {
  flex: 0 0 auto;
  min-width: 0;
  justify-content: center;
  gap: 6px;
  padding-inline: 12px 14px;
}

.nav-item-icon {
  width: 19px;
  height: 19px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.82;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-home-icon {
  width: 22px;
  height: 22px;
}

.nav-home-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.nav a:hover .nav-item-icon,
.nav a:focus-visible .nav-item-icon,
.nav a.is-active .nav-item-icon,
.nav a[aria-current="page"] .nav-item-icon,
.nav a.nav-home-link:hover .nav-home-icon,
.nav a.nav-home-link:focus-visible .nav-home-icon,
.nav a.nav-home-link.is-active .nav-home-icon,
.nav a.nav-home-link[aria-current="page"] .nav-home-icon {
  opacity: 1;
  transform: scale(1.05);
}

.dashboard-v2-hero .dashboard-update-note {
  font-size: 11px !important;
  line-height: 1.25;
}

@media (max-width: 980px) {
  .dashboard-v2-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-v2-control-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-problem-flow {
    white-space: normal;
  }

  .dashboard-section-heading {
    flex-wrap: wrap;
  }

  .dashboard-section-status {
    width: 100%;
    padding-left: 46px;
  }

  .traffic-first-screen .area-header {
    grid-template-columns: 1fr;
  }

  .dashboard-v2-filter.time-only > div {
    align-items: center;
    flex-direction: row;
  }

  .dashboard-range-buttons {
    display: flex;
    gap: 4px;
  }

  .dashboard-range-buttons button {
    flex: 1 1 92px;
    min-width: 86px;
  }
}

@media (max-width: 620px) {
  .dashboard-section-title h2 {
    font-size: 18px;
  }

  .dashboard-section-status {
    padding-left: 0;
  }

  .dashboard-v2-filter span {
    flex-basis: 100%;
  }

  .dashboard-range-buttons button {
    flex-basis: calc(50% - 4px);
  }

  .dashboard-v2-filter.is-custom-range input[type="date"],
  .dashboard-v2-filter.is-custom-range .dashboard-date-apply {
    flex: 1 1 100%;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .carousel-control {
    width: 42px;
    height: 42px;
  }

  .carousel-control.prev {
    left: 12px !important;
  }

  .carousel-control.next {
    right: 12px !important;
  }
}

main :where(h1, h2, h3, h4, h5, h6),
.campaign-footer :where(h1, h2, h3, h4, h5, h6) {
  font-size: min(20px, 1.25rem) !important;
}

main :where(.dashboard-v2-kpi strong, .dashboard-card .metric strong, .dashboard-aqi-box strong, .dashboard-resource-counts strong, .dashboard-issue-card strong, .dashboard-module-card strong, .policy-card strong, .content-card strong, .carousel-title, .carousel-slide-title, .stat-value, .metric-value),
.campaign-footer :where(strong, .footer-identity h2, .footer-emphasis) {
  font-size: min(20px, 1.25rem) !important;
}

#monitoringAreaTitle.area-icon-title .area-title-icon,
#monitoringAreaTitle.area-icon-title .area-title-icon img {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
}

.ntpc-hero-compact {
  grid-template-areas:
    "title topics filters";
  grid-template-columns: minmax(180px, .62fr) minmax(320px, 1.15fr) minmax(420px, 1.35fr);
  gap: 14px;
  padding: 16px 18px 16px 26px;
  align-items: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ntpc-hero-tabs-only {
  grid-template-areas: "topics filters";
  grid-template-columns: minmax(340px, .68fr) minmax(560px, 1.32fr);
  gap: 18px;
  padding: 10px 14px;
  min-height: 74px;
  align-items: center;
}

.ntpc-hero-tabs-only .ntpc-topic-grid {
  grid-area: topics;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 0;
}

.ntpc-hero-tabs-only .ntpc-topic-button {
  flex: 1 0 142px;
  min-width: 132px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 14px 14px 0 0;
  justify-content: center;
}

.ntpc-hero-tabs-only .ntpc-topic-button strong {
  font-size: 15px !important;
}

.ntpc-hero-tabs-only .ntpc-topic-icon {
  width: 24px;
  height: 24px;
}

.ntpc-hero-compact .ntpc-title-block {
  min-width: 0;
}

.ntpc-hero-compact .ntpc-topic-grid {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ntpc-hero-compact .ntpc-topic-button {
  min-width: 132px;
}

.ntpc-filter-panel {
  grid-area: filters;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ntpc-range-filter {
  width: 100%;
}

.ntpc-range-main {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.ntpc-range-main > span {
  color: var(--ntpc-muted);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.ntpc-range-main .dashboard-range-buttons {
  flex: 1 1 auto;
}

.ntpc-period {
  margin: 0;
  color: var(--ntpc-muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  text-align: right;
}

.ntpc-filter-group {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.ntpc-filter-group > span,
.ntpc-filter-group > label {
  color: var(--ntpc-muted);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.ntpc-filter-tabs,
.ntpc-scale-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ntpc-filter-tabs button,
.ntpc-scale-tabs button,
.ntpc-custom-range button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--ntpc-line);
  border-radius: 999px;
  color: var(--ntpc-ink);
  background: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .18s var(--ntpc-ease), background .18s var(--ntpc-ease), border-color .18s var(--ntpc-ease);
}

.ntpc-filter-tabs button:hover,
.ntpc-scale-tabs button:hover,
.ntpc-custom-range button:hover {
  transform: translateY(-1px);
  border-color: rgba(113, 200, 212, .78);
  background: var(--ntpc-cyan);
}

.ntpc-filter-tabs button.active,
.ntpc-scale-tabs button.active {
  color: var(--ntpc-ink-deep);
  border-color: rgba(254, 223, 106, .95);
  background: var(--ntpc-yellow);
  box-shadow: 0 8px 18px rgba(254, 223, 106, .24);
}

.ntpc-filter-inline {
  flex-wrap: wrap;
}

.ntpc-filter-inline select,
.ntpc-custom-range input {
  min-height: 30px;
  border: 1px solid var(--ntpc-line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ntpc-ink);
  background: rgba(255,255,255,.86);
  font-size: 12px;
  font-weight: 900;
}

.ntpc-custom-range {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ntpc-custom-range[hidden] {
  display: none !important;
}

.ntpc-custom-range label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ntpc-muted);
  font-size: 12px;
  font-weight: 900;
}

.ntpc-dashboard-grid-wide {
  grid-template-columns: minmax(0, 1fr) minmax(310px, .36fr);
  align-items: start;
}

.ntpc-district-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.ntpc-district-comparison,
.ntpc-side-cards,
.ntpc-mini-card {
  min-height: 100%;
}

.ntpc-cause-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 420px);
}

.ntpc-cause-control[hidden] {
  display: none !important;
}

.ntpc-cause-control label {
  color: var(--ntpc-muted);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.ntpc-cause-control select {
  flex: 1 1 auto;
  min-width: 220px;
  min-height: 34px;
  border: 1px solid var(--ntpc-line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ntpc-ink);
  background: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 900;
}

.ntpc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ntpc-district-comparison > .ntpc-section-head {
  justify-content: flex-start;
}

.ntpc-section-head h3:empty {
  display: none;
}

.ntpc-section-head h3 {
  margin: 0;
  color: var(--ntpc-ink-deep);
  font-size: 15px !important;
  font-weight: 950;
}

.ntpc-bars-scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 5px;
}

.ntpc-bars-scroll .ntpc-bar-row {
  grid-template-columns: 92px minmax(0, 1fr) 112px;
  min-height: 34px;
}

.ntpc-bar-value small {
  display: block;
  margin-top: 2px;
  color: var(--ntpc-muted);
  font-size: 10px;
  font-weight: 800;
}

.ntpc-side-cards {
  display: grid;
  gap: 14px;
}

.ntpc-mini-card {
  border: 1px solid var(--ntpc-line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  padding: 14px;
}

.ntpc-cause-pie-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  justify-items: center;
}

.ntpc-cause-pie {
  width: 188px;
  height: 188px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 14px rgba(255,255,255,.72), 0 12px 30px rgba(30, 28, 44,.12);
}

.ntpc-cause-pie span {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  color: var(--ntpc-ink-deep);
  background: rgba(255,255,255,.9);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.ntpc-cause-pie small {
  max-width: 82px;
  color: var(--ntpc-muted);
  font-size: 10px;
  line-height: 1.12;
}

.ntpc-cause-legend {
  display: grid;
  gap: 7px;
  width: 100%;
  max-height: 354px;
  overflow-y: auto;
  padding-right: 4px;
}

.ntpc-cause-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  color: var(--ntpc-ink);
  font-size: 12px;
  font-weight: 850;
}

.ntpc-cause-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}

.ntpc-cause-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ntpc-cause-row strong,
.ntpc-cause-row em {
  color: var(--ntpc-ink-deep);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.ntpc-bridge-list {
  display: grid;
  gap: 8px;
  max-height: 282px;
  overflow-y: auto;
  padding-right: 4px;
}

.ntpc-bridge-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(250, 229, 174, .42);
}

.ntpc-bridge-row strong,
.ntpc-bridge-row em {
  color: var(--ntpc-ink-deep);
  font-size: 13px;
  font-weight: 950;
  font-style: normal;
}

.ntpc-bridge-row span,
.ntpc-bridge-row small {
  color: var(--ntpc-muted);
  font-size: 11px;
  font-weight: 850;
}

.ntpc-bridge-row small {
  grid-column: 1 / -1;
}

.ntpc-rank-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.ntpc-trend-lines {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ntpc-trend-lines svg {
  width: 100%;
  min-width: 760px;
  height: auto;
  min-height: 210px;
}

.ntpc-trend-series {
  transition: opacity .18s var(--ntpc-ease);
}

.ntpc-trend-series path {
  fill: none;
  stroke: var(--c);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-width .18s var(--ntpc-ease);
}

.ntpc-trend-series circle {
  fill: #fff;
  stroke: var(--c);
  stroke-width: 2.5;
  cursor: pointer;
  transition: r .18s var(--ntpc-ease), fill .18s var(--ntpc-ease);
}

.ntpc-trend-series:hover path {
  stroke-width: 5;
}

.ntpc-trend-series:hover circle {
  r: 6;
  fill: var(--c);
}

.ntpc-trend-lines svg:has(.ntpc-trend-series:hover) .ntpc-trend-series:not(:hover) {
  opacity: .22;
}

.ntpc-trend-lines line {
  stroke: rgba(30, 28, 44,.16);
  stroke-width: 1.5;
}

.ntpc-trend-lines text {
  fill: var(--ntpc-muted);
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
}

.ntpc-trend-lines .ntpc-trend-end-label {
  fill: var(--c);
  font-size: 11px;
  font-weight: 950;
  text-anchor: start;
  paint-order: stroke;
  stroke: rgba(255,255,255,.86);
  stroke-width: 4px;
}

.ntpc-line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ntpc-line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ntpc-ink);
  font-size: 11px;
  font-weight: 900;
}

.ntpc-line-legend strong {
  color: var(--ntpc-ink-deep);
  font-size: 11px;
  font-weight: 950;
}

.ntpc-line-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}

.ntpc-trend-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.ntpc-trend-summary div {
  border-radius: 12px;
  padding: 9px;
  background: rgba(221, 247, 246, .58);
}

.ntpc-trend-summary strong {
  display: block;
  color: var(--ntpc-ink-deep);
  font-size: 12px;
  font-weight: 950;
}

.ntpc-trend-summary span {
  display: block;
  margin-top: 3px;
  color: var(--ntpc-muted);
  font-size: 11px;
  font-weight: 850;
}

.ntpc-empty {
  border-radius: 12px;
  padding: 14px;
  color: var(--ntpc-muted);
  background: rgba(30, 28, 44,.06);
  font-size: 12px;
  font-weight: 900;
}

.ntpc-trend-panel {
  margin-top: 16px;
}

@media (max-width: 1180px) {
  .ntpc-hero-compact {
    grid-template-areas:
      "title"
      "topics"
      "filters";
    grid-template-columns: 1fr;
  }

  .ntpc-hero-tabs-only {
    grid-template-areas:
      "topics"
      "filters";
    grid-template-columns: 1fr;
  }

  .ntpc-dashboard-grid-wide,
  .ntpc-district-layout {
    grid-template-columns: 1fr;
  }

  .ntpc-cause-pie-wrap {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .ntpc-hero-compact {
    padding: 14px 14px 14px 22px;
  }

  .ntpc-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ntpc-panel-title {
    min-width: 0;
  }

  .ntpc-panel-title > div {
    min-width: 0;
  }

  .ntpc-panel-title h2 {
    white-space: normal;
    word-break: keep-all;
    line-height: 1.22;
  }

  .ntpc-filter-group,
  .ntpc-range-main,
  .ntpc-cause-control,
  .ntpc-custom-range {
    align-items: stretch;
    flex-direction: column;
  }

  .ntpc-hero-tabs-only .ntpc-topic-button {
    flex: 1 1 30%;
    min-width: 96px;
  }

  .ntpc-filter-tabs button,
  .ntpc-scale-tabs button {
    flex: 1 1 calc(50% - 4px);
  }

  .ntpc-cause-control select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .ntpc-period {
    font-size: 10px;
    text-align: left;
  }

  .ntpc-cause-pie-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .ntpc-bars-scroll .ntpc-bar-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .ntpc-bars-scroll .ntpc-bar-value {
    grid-column: 2;
    text-align: left;
  }
}

/* Header icon layout: keep the full banner responsive after nav icons are added. */
:root {
  --banner-page-width: calc(100vw - clamp(8px, 1.2vw, 20px));
}

.site-header {
  width: var(--banner-page-width) !important;
  max-width: none !important;
  gap: clamp(8px, 1vw, 14px);
  padding-inline: clamp(10px, 1.2vw, 16px);
}

.brand {
  flex: 1 1 clamp(430px, 35vw, 560px) !important;
  min-width: clamp(420px, 32vw, 540px) !important;
}

.nav {
  flex: 1 1 640px;
  min-width: min(640px, 100%);
  max-width: none;
  justify-content: center;
  overflow: visible;
}

.nav a {
  flex: 0 0 auto;
  min-width: max-content;
  padding-inline: 11px;
}

.nav-item-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
  line-height: 1;
}

.header-actions {
  flex: 0 0 auto;
}

@media (min-width: 1321px) {
  .site-header {
    flex-wrap: nowrap;
  }
}

@media (max-width: 1320px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
  }

  .brand {
    flex: 1 1 calc(100% - 232px) !important;
    min-width: 0 !important;
  }

  .nav {
    order: 3;
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav a {
    min-width: max-content;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    width: calc(100vw - 16px) !important;
  }

  .nav {
    padding-bottom: 6px;
  }
}

/* Frontend nav: clean underline interaction inspired by Sarab header. */
.site-header .nav {
  gap: clamp(8px, 1.1vw, 18px) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.site-header .nav a {
  position: relative;
  display: inline-flex !important;
  align-items: flex-start !important;
  min-height: 42px !important;
  padding: 0 2px 5px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #1e1c2c !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 0.24s cubic-bezier(0.22, 1, 0.36, 1), transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header .nav a::after {
  display: none !important;
}

.site-header .nav a:hover,
.site-header .nav a:focus-visible,
.site-header .nav a.is-active,
.site-header .nav a[aria-current="page"] {
  border-color: transparent !important;
  color: #7B62FF !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.site-header .nav a:focus-visible {
  outline: 2px solid rgba(179, 164, 255, 0.52);
  outline-offset: 7px;
}

.site-header .nav-item-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding-bottom: 16px;
  white-space: nowrap;
  line-height: 1;
}

.site-header .nav-item-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7B62FF, #B3A4FF 68%, #F9C906);
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center center;
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header .nav a:hover .nav-item-label::after,
.site-header .nav a:focus-visible .nav-item-label::after,
.site-header .nav a.is-active .nav-item-label::after,
.site-header .nav a[aria-current="page"] .nav-item-label::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.site-header .nav-item-icon {
  width: 18px;
  height: 18px;
  margin-top: 0;
  transform: translateY(-1px);
  opacity: 0.74;
  filter: saturate(0.78) brightness(0.96);
}

.site-header .nav-home-icon {
  width: 20px;
  height: 20px;
}

.site-header .nav a:hover .nav-item-icon,
.site-header .nav a:focus-visible .nav-item-icon,
.site-header .nav a.is-active .nav-item-icon,
.site-header .nav a[aria-current="page"] .nav-item-icon {
  opacity: 1;
  filter: saturate(1.02) brightness(1.02);
  transform: translateY(-2px);
}

@media (max-width: 1320px) {
  .site-header .nav {
    gap: 18px !important;
    padding-bottom: 8px !important;
  }
}

@media (max-width: 760px) {
  .site-header .nav {
    gap: 16px !important;
  }

  .site-header .nav a {
    min-height: 38px !important;
    font-size: 14px !important;
  }
}

/* Header wordmark image: keep candidate mark readable without crowding nav. */
.site-header .brand strong {
  gap: 8px !important;
}

.site-header .brand-title-platform {
  font-size: clamp(20px, 1.38vw, 24px) !important;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 !important;
}

.site-header .candidate-wordmark {
  width: clamp(132px, 9.2vw, 160px);
  max-height: clamp(40px, 2.9vw, 49px);
}

@media (max-width: 760px) {
  .site-header .brand-title-platform {
    font-size: 20px !important;
  }

  .site-header .candidate-wordmark {
    width: clamp(140px, 45vw, 190px);
    max-height: 58px;
  }
}

/* Compact header with the English campaign logo. */
.site-header {
  min-height: 57px !important;
  padding-block: 6px !important;
}

.site-header::before {
  inset-block: 6px !important;
}

.site-header .brand {
  min-height: 50px !important;
  gap: 10px !important;
}

.site-header .brand-text {
  display: flex;
  align-items: center;
}

.site-header .brand-logo {
  width: auto !important;
  height: clamp(32px, 3.15vw, 45px) !important;
  max-width: clamp(35px, 3.35vw, 48px) !important;
  max-height: clamp(32px, 3.15vw, 45px) !important;
  object-fit: contain !important;
}

.site-header .brand strong {
  align-items: center !important;
  line-height: 1 !important;
}

.site-header .brand-title-main {
  align-items: center !important;
}

.site-header .candidate-title-lockup {
  min-height: 50px;
}

.site-header .candidate-title-badge {
  width: clamp(138px, 10vw, 172px);
  max-height: 19px;
}

.site-header .candidate-title-line {
  font-size: clamp(11px, 0.72vw, 13px);
}

.site-header .candidate-title-hash {
  font-size: clamp(9px, 0.56vw, 10.5px) !important;
}

.site-header .brand small {
  display: none !important;
}

.site-header .brand-subtitle-tag {
  min-height: 19px;
  padding: 1px 9px 2px;
  font-size: 11.5px;
}

@media (max-width: 760px) {
  .site-header {
    padding-block: 8px !important;
  }

  .site-header .brand-logo {
    width: clamp(112px, 36vw, 146px) !important;
  }
}

/* Final header surface: flat top bar with a soft lower shadow, no capsule frame. */
.site-header {
  top: 0 !important;
  width: 100vw !important;
  max-width: none !important;
  margin: 0 0 14px !important;
  padding: 8px clamp(18px, 2.6vw, 44px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fedf6a !important;
  box-shadow:
    0 13px 28px rgba(30, 28, 44, 0.13),
    0 1px 0 rgba(30, 28, 44, 0.08) !important;
  overflow: visible !important;
}

.site-header .brand::before,
.site-header .brand::after {
  display: none !important;
}

body {
  padding-top: 0 !important;
}

@media (max-width: 760px) {
  .site-header {
    width: 100vw !important;
    margin-bottom: 10px !important;
    padding-inline: 12px !important;
  }
}

/* Banner sample 2 final: white civic identity strip, responsive and cache-safe. */
.site-header {
  top: 0 !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: 100vw !important;
  max-width: none !important;
  min-height: clamp(72px, 6.2vw, 92px) !important;
  margin: 0 0 14px !important;
  padding: clamp(8px, 0.9vw, 13px) clamp(14px, 2.4vw, 42px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-shadow:
    0 12px 28px rgba(30, 28, 44, 0.11),
    0 1px 0 rgba(30, 28, 44, 0.08) !important;
  overflow: visible !important;
  isolation: isolate !important;
}

.site-header::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: min(78vw, 1180px) !important;
  height: 100% !important;
  pointer-events: none !important;
  background:
    url("/assets/brand-header-flow.svg?v=20260606-yellow-band-v4") left center / 100% 100% no-repeat,
    radial-gradient(circle at 17% 42%, rgba(249, 201, 6, 0.38), transparent 35%),
    radial-gradient(circle at 45% 50%, rgba(254, 223, 106, 0.28), transparent 42%) !important;
  filter: saturate(1.16) contrast(1.03) !important;
  opacity: 0.94 !important;
  transform: translate3d(-1.5%, 0, 0) scale(1.02) !important;
  animation: headerBrandFlow 20s ease-in-out infinite alternate !important;
}

.site-header::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  pointer-events: none !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.86) 38%, rgba(255, 255, 255, 0.98) 76%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)) !important;
  backdrop-filter: blur(1px) !important;
}

.site-header > * {
  position: relative !important;
  z-index: 3 !important;
}

@keyframes headerBrandFlow {
  0% {
    transform: translate3d(-2.2%, -0.7%, 0) scale(1.02) rotate(-0.2deg);
    background-position: left 50%, 12% 46%, 40% 52%;
  }
  50% {
    transform: translate3d(1.2%, 0.9%, 0) scale(1.05) rotate(0.35deg);
    background-position: 8% 48%, 18% 38%, 48% 60%;
  }
  100% {
    transform: translate3d(2.8%, -0.2%, 0) scale(1.03) rotate(-0.1deg);
    background-position: 14% 52%, 22% 54%, 44% 44%;
  }
}

.site-header .brand {
  flex: 1 1 clamp(650px, 48vw, 850px) !important;
  min-width: clamp(620px, 46vw, 820px) !important;
  min-height: clamp(56px, 4.8vw, 72px) !important;
  align-items: center !important;
  gap: clamp(14px, 1.6vw, 28px) !important;
  color: #1e1c2c !important;
}

.site-header .brand-logo {
  width: auto !important;
  height: clamp(32px, 3.15vw, 45px) !important;
  max-width: clamp(35px, 3.35vw, 48px) !important;
  max-height: clamp(32px, 3.15vw, 45px) !important;
  object-fit: contain !important;
  filter: none !important;
}

.site-header .brand-logo-caption {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  max-width: none !important;
  color: #ffffff !important;
  -webkit-text-stroke: 1.65px #1e1c2c;
  paint-order: stroke fill;
  text-shadow:
    1.45px 0 #1e1c2c,
    -1.45px 0 #1e1c2c,
    0 1.45px #1e1c2c,
    0 -1.45px #1e1c2c,
    0 3px 10px rgba(30, 28, 44, 0.16);
  font-size: clamp(17px, 1.22vw, 21px) !important;
  font-weight: 1000 !important;
  line-height: 1 !important;
  letter-spacing: 0.045em !important;
  white-space: nowrap !important;
}

.site-header .brand-text {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

.site-header .brand strong {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  gap: clamp(10px, 1.1vw, 18px) !important;
  line-height: 1 !important;
}

.site-header .brand-title-main {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0 !important;
  gap: clamp(10px, 1vw, 18px) !important;
}

.site-header .candidate-title-lockup {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  width: max-content !important;
  min-height: auto !important;
}

.site-header .candidate-name.is-image {
  flex: 0 0 auto !important;
}

.site-header .candidate-wordmark {
  width: clamp(172px, 13.4vw, 220px) !important;
  max-height: clamp(48px, 4vw, 64px) !important;
  object-fit: contain !important;
  filter:
    contrast(1.12)
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72))
    drop-shadow(0 8px 16px rgba(30, 28, 44, 0.16)) !important;
}

.site-header .brand-title-divider {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 2px !important;
  height: clamp(34px, 3.2vw, 48px) !important;
  margin: 0 clamp(2px, 0.4vw, 8px) !important;
  border-radius: 999px !important;
  background: rgba(30, 28, 44, 0.26) !important;
  color: transparent !important;
  overflow: hidden !important;
}

.site-header .brand-title-platform {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 5px !important;
  width: clamp(178px, 14.6vw, 236px) !important;
  padding: 0 !important;
  color: #1e1c2c !important;
  background: none !important;
  font-size: 1em !important;
}

.site-header .platform-title-pill {
  width: 100% !important;
  min-height: clamp(19px, 1.55vw, 24px) !important;
  padding: 2px 0 3px !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1e1c2c !important;
  box-shadow: none !important;
  font-size: clamp(11px, 0.82vw, 14px) !important;
  font-weight: 1000 !important;
  letter-spacing: 0.10em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-align: center !important;
}

.site-header .candidate-title-line {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  max-width: none !important;
  width: 100% !important;
  margin-top: 1px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(30, 28, 44, 0.88) !important;
  font-size: clamp(8px, 0.54vw, 9.5px) !important;
  font-weight: 950 !important;
  line-height: 1.16 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
  text-align: center !important;
}

.site-header .candidate-title-line > span:not(.candidate-title-separator) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  min-height: 18px !important;
  padding: 2px 5px !important;
  border: 1px solid rgba(249, 201, 6, 0.28) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.68) !important;
  box-shadow: 0 5px 14px rgba(30, 28, 44, 0.05) !important;
}

.site-header .candidate-title-role {
  color: #1e1c2c !important;
}

.site-header .candidate-title-separator {
  color: rgba(30, 28, 44, 0.42) !important;
  font-weight: 800 !important;
  padding: 0 3px !important;
}

.site-header .nav {
  flex: 1 1 auto !important;
  justify-content: center !important;
  align-self: flex-end !important;
  align-items: flex-end !important;
  margin-top: auto !important;
  padding-bottom: 4px !important;
  min-width: 280px !important;
}

.site-header .header-actions {
  flex: 0 0 auto !important;
  margin-left: 0 !important;
}

@media (min-width: 821px) {
  .site-header {
    min-height: 96px !important;
    height: 96px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .site-header .brand {
    min-height: 72px !important;
  }

  .site-header .brand-logo {
    height: 46px !important;
    max-width: 49px !important;
    max-height: 46px !important;
  }

  .site-header .brand-logo-caption {
    font-size: 21px !important;
  }

  .site-header .candidate-wordmark {
    width: 171px !important;
    max-height: 52px !important;
  }

  .site-header .brand-title-platform {
    width: 260px !important;
  }

  .site-header .platform-title-pill {
    font-size: 11pt !important;
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .site-header .candidate-title-line {
    font-size: 11pt !important;
  }

  .site-header .candidate-title-line > span:not(.candidate-title-separator) {
    font-size: 11pt !important;
    line-height: 1.16 !important;
  }

  .site-header .nav {
    align-self: flex-end !important;
    padding-bottom: 2px !important;
  }

  .site-header .nav a {
    min-height: 40px !important;
    font-size: 11pt !important;
    align-items: flex-start !important;
  }

  .site-header .nav-item-label {
    font-size: 11pt !important;
    line-height: 1.1 !important;
  }

  .site-header .nav-item-icon {
    width: 20px !important;
    height: 20px !important;
  }

  .site-header .header-actions {
    align-items: center !important;
  }

  .site-header .avatar-button,
  .site-header .social-button {
    width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .site-header .support-link {
    min-height: 42px !important;
    height: 42px !important;
  }
}

@media (max-width: 1520px) {
  .site-header {
    flex-wrap: wrap !important;
    row-gap: 8px !important;
  }

  .site-header .brand {
    flex: 1 1 calc(100% - 220px) !important;
    min-width: 0 !important;
  }

  .site-header .nav {
    order: 3 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    align-self: flex-end !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  .site-header .nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start !important;
    padding: 9px 12px 10px !important;
    row-gap: 8px !important;
  }

  .site-header::before {
    width: 132vw !important;
    inset: 0 auto 0 -42% !important;
    height: 100% !important;
    opacity: 0.54 !important;
    filter: saturate(1.08) !important;
  }

  .site-header .brand {
    order: 1 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
  }

  .site-header .brand-logo {
    width: auto !important;
    height: clamp(36px, 10vw, 45px) !important;
    max-width: clamp(39px, 10.6vw, 48px) !important;
    max-height: 45px !important;
  }

  .site-header .brand-logo-caption {
    max-width: none !important;
    font-size: clamp(16px, 4vw, 18px) !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  .site-header .brand-title-main {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .site-header .brand-title-divider {
    display: none !important;
  }

  .site-header .brand-title-platform {
    align-items: flex-start !important;
  }

  .site-header .candidate-wordmark {
    width: clamp(166px, 43vw, 208px) !important;
    max-height: 62px !important;
  }

  .site-header .candidate-title-line {
    justify-content: space-between !important;
    row-gap: 2px !important;
    white-space: nowrap !important;
    width: 100% !important;
    font-size: 9px !important;
    text-align: left !important;
  }

  .site-header .platform-title-pill {
    font-size: 13px !important;
  }

  .site-header .header-actions {
    order: 2 !important;
    width: 100% !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    gap: 8px !important;
  }

  .site-header .nav {
    order: 3 !important;
    justify-content: flex-start !important;
    align-self: stretch !important;
    margin-top: 0 !important;
    padding-bottom: 2px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header::before {
    animation: none !important;
  }
}

@media (min-width: 821px) and (max-width: 900px) {
  .site-header .brand {
    flex: 1 1 calc(100% - 220px) !important;
    min-width: 0 !important;
    gap: 12px !important;
  }

  .site-header .brand-logo {
    width: auto !important;
    height: 38px !important;
    max-width: 41px !important;
    max-height: 38px !important;
  }

  .site-header .brand-logo-caption {
    max-width: none !important;
    font-size: 15px !important;
    white-space: nowrap !important;
  }

  .site-header .brand-title-main {
    gap: 8px !important;
  }

  .site-header .candidate-wordmark {
    width: clamp(140px, 18vw, 160px) !important;
    max-height: 50px !important;
  }

  .site-header .brand-title-divider {
    height: 36px !important;
    margin-inline: 2px !important;
  }

  .site-header .brand-title-platform {
    width: clamp(170px, 26vw, 220px) !important;
    max-width: 220px !important;
  }

  .site-header .platform-title-pill {
    padding-inline: 0 !important;
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
  }

  .site-header .candidate-title-line {
    row-gap: 1px !important;
    max-width: none !important;
    width: 100% !important;
    font-size: 8.5px !important;
    white-space: normal !important;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: auto !important;
    margin-bottom: 10px !important;
  }

  .site-header .brand-logo {
    width: auto !important;
    height: 58px !important;
    max-width: 62px !important;
    max-height: 58px !important;
  }

  .site-header .brand-logo-caption {
    max-width: none !important;
    font-size: 16px !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  .site-header .candidate-wordmark {
    width: clamp(150px, 50vw, 190px) !important;
  }

  .site-header .platform-title-pill {
    min-height: 22px !important;
    padding-inline: 0 !important;
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
  }

  .site-header .brand-title-platform {
    width: clamp(176px, 54vw, 218px) !important;
  }

  .site-header .candidate-title-line {
    font-size: 8.4px !important;
  }

  .site-header .candidate-title-line > span:not(.candidate-title-separator) {
    min-height: 17px !important;
    padding-inline: 4px !important;
  }

  .site-header .nav a {
    font-size: 13.5px !important;
  }
}

/* Keep the backend management header independent from the public-site banner. */
.site-header.backend-header {
  top: 12px !important;
  width: var(--fluid-page-width) !important;
  min-height: 76px !important;
  margin: 12px auto 8px !important;
  padding: 12px clamp(18px, 2.4vw, 34px) !important;
  border: 1px solid rgba(30, 28, 44, 0.08) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 18px 45px rgba(30, 28, 44, 0.1) !important;
}

.site-header.backend-header .brand {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 48px !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
}

.site-header.backend-header .brand-logo {
  width: 126px !important;
  max-height: 42px !important;
}

.site-header.backend-header .brand strong {
  display: block !important;
  font-size: clamp(18px, 1.4vw, 24px) !important;
  line-height: 1.12 !important;
}

.site-header.backend-header .brand small {
  display: block !important;
}

@media (max-width: 760px) {
  .site-header.backend-header {
    width: min(100% - 20px, 720px) !important;
    margin-top: 8px !important;
  }
}

.civic-proposal-open {
  overflow: hidden;
}

.civic-data-point-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.civic-data-point-title > strong,
.civic-data-point-title > h3 {
  min-width: 0;
  margin: 0;
}

.civic-data-point-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.civic-action-button,
.civic-proposal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px 0 10px;
  border: 1px solid rgba(30, 28, 44, 0.1);
  border-bottom-color: rgba(30, 28, 44, 0.26);
  border-radius: 999px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(254, 223, 106, 0.82) 42%, var(--yellow) 100%);
  box-shadow:
    0 4px 0 rgba(123, 98, 255, 0.24),
    0 14px 26px rgba(30, 28, 44, 0.15);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background 160ms ease;
}

.civic-action-button::after,
.civic-proposal-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.52) 42%, transparent 64%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
  pointer-events: none;
}

.civic-action-button:hover,
.civic-action-button:focus-visible,
.civic-proposal-button:hover,
.civic-proposal-button:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow:
    0 6px 0 rgba(123, 98, 255, 0.28),
    0 20px 34px rgba(30, 28, 44, 0.18);
}

.civic-action-button:hover::after,
.civic-action-button:focus-visible::after,
.civic-proposal-button:hover::after,
.civic-proposal-button:focus-visible::after {
  transform: translateX(120%);
}

.civic-action-button:active,
.civic-proposal-button:active {
  transform: translateY(1px);
  box-shadow:
    0 2px 0 rgba(123, 98, 255, 0.22),
    0 9px 18px rgba(30, 28, 44, 0.14);
}

.civic-action-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.86),
    0 3px 8px rgba(30, 28, 44, 0.1);
  position: relative;
  z-index: 1;
}

.civic-action-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.civic-action-button > span,
.civic-action-button > b,
.civic-proposal-button > span {
  position: relative;
  z-index: 1;
}

.civic-action-button--propose {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(254, 223, 106, 0.9) 38%, #f9c906 100%);
}

.civic-action-button--endorse {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(254, 223, 106, 0.78) 48%, #f9c906 100%);
}

.civic-action-button--discuss {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(229, 221, 255, 0.9) 50%, #b3a4ff 100%);
}

.civic-proposal-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.civic-proposal-layer.is-open {
  pointer-events: auto;
}

.civic-proposal-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(30, 28, 44, 0.32);
  backdrop-filter: blur(4px);
  transition: opacity 180ms ease;
}

.civic-proposal-layer.is-open .civic-proposal-backdrop {
  opacity: 1;
}

.civic-proposal-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100%;
  padding: 26px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -24px 0 64px rgba(30, 28, 44, 0.22);
  transform: translateX(104%);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.civic-proposal-layer.is-open .civic-proposal-drawer {
  transform: translateX(0);
}

.civic-proposal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--gray);
  background: rgba(179, 164, 255, 0.18);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  z-index: 1;
}

.civic-proposal-heading {
  display: grid;
  gap: 8px;
  padding: 6px 46px 18px 0;
  border-bottom: 1px solid var(--line);
}

.civic-proposal-heading p {
  margin: 0;
  color: var(--purple);
  font-size: 13px;
  font-weight: 900;
}

.civic-proposal-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
}

.civic-proposal-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.civic-proposal-metrics,
.civic-proposal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 0;
}

.civic-proposal-metrics div,
.civic-proposal-summary div {
  padding: 10px;
  border-radius: 10px;
  background: rgba(254, 223, 106, 0.34);
}

.civic-proposal-metrics dt,
.civic-proposal-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.civic-proposal-metrics dd,
.civic-proposal-summary strong {
  display: block;
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.civic-proposal-message {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--purple);
  background: rgba(179, 164, 255, 0.18);
  font-weight: 900;
}

.civic-login-gate,
.civic-proposal-form {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(123, 98, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.civic-login-gate p,
.civic-proposal-form small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.civic-proposal-form label {
  display: grid;
  gap: 6px;
  color: var(--gray);
  font-size: 13px;
  font-weight: 900;
}

.civic-proposal-form input,
.civic-proposal-form textarea,
.civic-comment-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.civic-proposal-form input,
.civic-comment-form input {
  min-height: 40px;
  padding: 0 12px;
}

.civic-proposal-form textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.civic-captcha-row {
  display: grid;
  grid-template-columns: auto 82px auto;
  gap: 8px;
  align-items: center;
}

.civic-captcha-row span {
  color: var(--ink);
  font-weight: 950;
}

.civic-captcha-row button,
.civic-comment-form button,
.civic-endorse-button {
  border: 1px solid rgba(30, 28, 44, 0.1);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 950;
  cursor: pointer;
}

.civic-captcha-row button {
  min-height: 40px;
  padding: 0 15px;
}

.civic-proposal-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.civic-proposal-empty {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(179, 164, 255, 0.12);
}

.civic-proposal-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.civic-proposal-card-head {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.civic-proposal-card h4,
.civic-proposal-card p {
  margin: 0;
}

.civic-proposal-card h4 {
  color: var(--ink);
  font-size: 17px;
}

.civic-proposal-card span,
.civic-proposal-card small {
  color: var(--muted);
  font-size: 12px;
}

.civic-endorse-button {
  min-width: 104px;
  min-height: 42px;
  white-space: nowrap;
}

.civic-endorse-button.is-active {
  color: var(--white);
  background:
    linear-gradient(180deg, #9b8cff 0%, #7b62ff 62%, #6a59b2 100%);
  box-shadow:
    0 4px 0 rgba(30, 28, 44, 0.28),
    0 14px 28px rgba(123, 98, 255, 0.26);
}

.civic-endorse-button.is-active .civic-action-icon {
  background: rgba(255, 255, 255, 0.88);
}

.civic-proposal-comments summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
}

.civic-proposal-comments summary::-webkit-details-marker {
  display: none;
}

.civic-proposal-comment-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.civic-proposal-comment-list p {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(254, 223, 106, 0.2);
}

.civic-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.civic-comment-form button {
  padding: 0 16px 0 10px;
}

.member-tracking-list {
  display: grid;
  gap: 12px;
}

.member-tracking-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.member-tracking-card strong {
  color: var(--ink);
  font-size: 17px;
}

.member-tracking-card span,
.member-tracking-card small {
  color: var(--muted);
  font-size: 13px;
}

.member-tracking-card a {
  width: fit-content;
  color: var(--purple);
  font-weight: 900;
}

@media (max-width: 720px) {
  .civic-proposal-drawer {
    padding: 18px;
  }

  .civic-proposal-metrics,
  .civic-proposal-summary,
  .civic-captcha-row,
  .civic-comment-form {
    grid-template-columns: 1fr;
  }

  .civic-proposal-card-head {
    display: grid;
  }

  .civic-data-point-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .civic-data-point-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 2026-06-08 banner refinement: compact left lockup with fewer font sizes. */
.site-header .brand-logo-caption {
  display: none !important;
}

.site-header .brand {
  flex: 0 1 clamp(520px, 39vw, 680px) !important;
  min-width: clamp(500px, 37vw, 650px) !important;
  gap: clamp(11px, 1vw, 18px) !important;
}

.site-header .brand-logo {
  height: clamp(40px, 3.2vw, 52px) !important;
  max-height: clamp(40px, 3.2vw, 52px) !important;
  max-width: clamp(44px, 3.4vw, 58px) !important;
}

.site-header .brand-text,
.site-header .brand strong {
  align-items: flex-start !important;
}

.site-header .brand-title-main {
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: clamp(8px, 0.8vw, 13px) !important;
}

.site-header .candidate-title-lockup {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  height: auto !important;
  padding-top: 1px !important;
}

.site-header .candidate-wordmark {
  width: clamp(88px, 6.25vw, 116px) !important;
  max-height: clamp(24px, 1.75vw, 31px) !important;
  filter: contrast(1.08) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7)) !important;
}

.site-header .brand-title-divider {
  width: 1.5px !important;
  height: clamp(25px, 2.1vw, 34px) !important;
  margin: 0 clamp(1px, 0.2vw, 4px) !important;
  background: rgba(30, 28, 44, 0.44) !important;
}

.site-header .brand-title-platform {
  width: auto !important;
  min-width: clamp(250px, 20vw, 330px) !important;
  gap: 7px !important;
  justify-content: flex-start !important;
}

.site-header .platform-title-pill {
  width: auto !important;
  min-height: auto !important;
  padding: 0 !important;
  color: #1e1c2c !important;
  font-size: clamp(18px, 1.28vw, 23px) !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  line-height: 1.08 !important;
  text-align: left !important;
}

.site-header .candidate-title-line {
  width: auto !important;
  justify-content: flex-start !important;
  gap: clamp(6px, 0.55vw, 10px) !important;
  font-size: clamp(11px, 0.78vw, 14px) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  color: #1e1c2c !important;
}

.site-header .candidate-title-line > span:not(.candidate-title-separator) {
  min-height: 20px !important;
  padding: 3px 9px !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  border: 1px solid rgba(249, 201, 6, 0.54) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: 0 4px 12px rgba(30, 28, 44, 0.07) !important;
}

.site-header .candidate-title-role {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1e1c2c !important;
  font-size: clamp(11px, 0.76vw, 13px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

.site-header .candidate-title-separator {
  padding: 0 !important;
  color: rgba(30, 28, 44, 0.36) !important;
  font-size: clamp(12px, 0.8vw, 15px) !important;
  font-weight: 900 !important;
}

@media (min-width: 821px) {
  .site-header .candidate-wordmark {
    width: 106px !important;
    max-height: 29px !important;
  }

  .site-header .platform-title-pill {
    font-size: 21px !important;
  }

  .site-header .candidate-title-line,
  .site-header .candidate-title-line > span:not(.candidate-title-separator) {
    font-size: 13px !important;
  }
}

@media (max-width: 1520px) {
  .site-header .brand {
    flex: 1 1 calc(100% - 220px) !important;
    min-width: 0 !important;
  }
}

@media (max-width: 820px) {
  .site-header .brand {
    min-width: 0 !important;
    gap: 9px 11px !important;
  }

  .site-header .brand-logo {
    height: 42px !important;
    max-width: 47px !important;
    max-height: 42px !important;
  }

  .site-header .brand-title-main {
    flex-wrap: wrap !important;
    gap: 6px 9px !important;
  }

  .site-header .candidate-wordmark {
    width: 94px !important;
    max-height: 27px !important;
  }

  .site-header .brand-title-platform {
    min-width: min(100%, 310px) !important;
    gap: 5px !important;
  }

  .site-header .platform-title-pill {
    font-size: 18px !important;
  }

  .site-header .candidate-title-line {
    flex-wrap: wrap !important;
    gap: 5px 7px !important;
    font-size: 12px !important;
  }

  .site-header .candidate-title-line > span:not(.candidate-title-separator) {
    padding: 3px 7px !important;
  }
}

/* Final banner lockup: text-first version with one clear title line and one role line. */
.site-header .brand-text {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 4px !important;
}

.site-header .brand-title-main.brand-title-plain {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: clamp(7px, 0.58vw, 11px) !important;
  color: #1e1c2c !important;
  white-space: nowrap !important;
}

.site-header .candidate-name.is-text,
.site-header .brand-title-platform-text,
.site-header .brand-title-plain .brand-title-divider {
  display: inline-flex !important;
  align-items: baseline !important;
  font-size: clamp(20px, 1.38vw, 24px) !important;
  font-weight: 1000 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.site-header .brand-title-plain .brand-title-divider {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  color: rgba(30, 28, 44, 0.46) !important;
  background: transparent !important;
  transform: none !important;
}

.site-header .brand small#brandSubtitle {
  display: block !important;
  width: auto !important;
  min-height: 0 !important;
  margin-top: 5px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.site-header .brand-subtitle-line {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  color: rgba(30, 28, 44, 0.78) !important;
  font-size: clamp(12px, 0.78vw, 14px) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}

@media (max-width: 820px) {
  .site-header .brand-title-main.brand-title-plain {
    flex-wrap: wrap !important;
    gap: 3px 7px !important;
    white-space: normal !important;
  }

  .site-header .candidate-name.is-text,
  .site-header .brand-title-platform-text,
  .site-header .brand-title-plain .brand-title-divider {
    font-size: 20px !important;
  }

  .site-header .brand-subtitle-line {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: 12px !important;
  }
}
