:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6f6f6f;
  --line: #e5e5e2;
  --black: #111111;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Söhne", "Soehne", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.58;
}

main.content {
  max-width: 1240px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  letter-spacing: -0.02em;
  font-weight: 560;
}

h1 {
  font-size: clamp(2.3rem, 4.3vw, 4.6rem);
  line-height: 1.03;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 2.4rem);
  margin-top: 4.2rem;
  margin-bottom: 0.85rem;
}

p,
li,
a,
span,
button,
input,
select,
label,
summary,
div {
  font-family: "Söhne", "Soehne", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

p,
li {
  color: var(--text);
  font-size: 1.03rem;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: #000000;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.2rem 0;
}

.navbar {
  background: #ffffff !important;
  border-bottom: 0;
  box-shadow: none;
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
}

#quarto-header {
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.navbar .navbar-brand {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text) !important;
}

.navbar .navbar-nav {
  gap: 0.08rem;
}

.navbar .navbar-collapse {
  justify-content: flex-end;
}

.navbar-toggler {
  border: 0 !important;
  border-radius: 10px;
  padding: 0.28rem 0.42rem;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler:focus {
  box-shadow: none !important;
}

.navbar-toggler-icon {
  width: 1.25rem;
  height: 1.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23111111' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

.navbar .nav-link {
  color: #5c5c5c !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.2rem 0.58rem !important;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0;
}

.navbar .nav-link:hover {
  color: var(--text) !important;
  background: transparent;
}

.navbar .nav-link.active {
  color: var(--text) !important;
  background: transparent;
}

.navbar .dropdown-menu {
  border: 0;
  border-radius: 12px;
  padding: 0.36rem;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.08);
}

.navbar .dropdown-item {
  border-radius: 8px;
  font-size: 0.88rem;
  color: #5c5c5c;
  padding: 0.44rem 0.62rem;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  color: var(--text);
  background: #f7f7f7;
}

.navbar .dropdown-toggle::after {
  display: none !important;
}

@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

#title-block-header {
  display: none;
}

.intro {
  padding-top: 1.2rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 1.35rem;
  font-size: 0.95rem;
  font-weight: 420;
}

.lead {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.55;
}

.kpi-inline {
  display: grid;
  width: 100%;
  max-width: 1160px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  column-gap: 2.1rem;
  row-gap: 1.25rem;
  margin: 1.8rem 0 1.8rem;
}

.kpi-item {
  border-top: 0;
  padding-top: 0;
  text-align: center;
}

.kpi-label {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.kpi-value {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 560;
  text-align: center;
}

.kpi-desc {
  margin-top: 0.32rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  font-weight: 400;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.72rem;
  margin: 1.1rem 0 1.1rem;
}

.hero-stage {
  min-height: auto;
  max-width: 980px;
  margin: 0 auto;
  padding-top: clamp(2rem, 5vh, 3.8rem);
  padding-bottom: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-main-title {
  max-width: 13.5ch;
  margin: 0 auto 1.15rem;
  text-align: center;
  text-wrap: balance;
  font-size: clamp(2.05rem, 4.2vw, 3.45rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 440;
}

section#panorama.level2 {
  margin-top: 0.15rem;
}

section#panorama.level2 > h2 {
  margin-top: 0.75rem;
}

.btn-pill {
  border-radius: 999px;
  padding: 0.44rem 0.96rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--black);
}

.btn-dark {
  background: var(--black);
  color: #ffffff !important;
}

.btn-dark:hover {
  background: #000000;
  color: #ffffff !important;
}

.btn-light {
  background: #ffffff;
  color: var(--black) !important;
}

.btn-light:hover {
  background: var(--black);
  color: #ffffff !important;
}

.section-note {
  color: var(--muted);
  max-width: 980px;
}

.chart-title {
  margin: 0.78rem 0 0.16rem;
  font-size: 0.96rem;
  line-height: 1.25;
  font-weight: 600;
  color: #5b5b5b;
  text-align: center;
}

.chart-analysis {
  margin: 0.62rem 0 2.05rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.58;
}

.chart-scale-note {
  margin: -0.85rem 0 0.72rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.inline-viz {
  margin: 0.34rem 0 1.48rem;
}

.viz-clean-frame {
  width: 100%;
  height: 560px;
  border: 0;
  background: #ffffff;
  border-radius: 14px;
}

.small-muted {
  color: var(--muted);
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin: 1.2rem 0;
}

.methods-overview {
  color: var(--muted);
  max-width: 920px;
  margin: 0 0 1.1rem;
}

.method-box {
  border: none;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.method-title {
  font-size: 1.03rem;
  font-weight: 560;
  margin-bottom: 0.42rem;
}

.method-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 1rem;
  font-size: 1rem;
  font-weight: 560;
  color: var(--text);
}

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

.method-summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-size: 1.05rem;
}

.method-box[open] .method-summary::after {
  content: "−";
}

.method-content {
  padding: 0 1rem 1rem;
  color: var(--muted);
}

.method-content p {
  margin: 0 0 0.7rem;
}

.method-content a,
.methods-overview a {
  color: #0b7f62;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  font-weight: 500;
}

.method-content a:hover,
.methods-overview a:hover {
  color: #10A37F;
}

.method-content code {
  font-size: 0.92em;
}

.method-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.method-list li {
  margin: 0 0 0.42rem;
}

.contact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.66rem;
  margin: 1rem 0 1.2rem;
}

.icon-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  color: var(--text);
  background: #ffffff;
}

.icon-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  font-size: 1.09rem;
}

.icon-link:hover {
  color: #ffffff;
  background: var(--black);
  border-color: var(--black);
}

@media (max-width: 1120px) {
  .kpi-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .method-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .navbar {
    position: relative;
  }
  main.content {
    max-width: 100%;
    padding-left: 0.92rem;
    padding-right: 0.92rem;
  }
  .navbar .container-fluid,
  .navbar .navbar-container {
    align-items: center;
    justify-content: flex-start;
  }
  #quarto-search {
    display: none !important;
  }
  .navbar-toggler {
    position: absolute;
    left: 0.92rem;
    top: 0.78rem;
    margin: 0 !important;
    z-index: 1100;
  }
  .navbar .collapse:not(.show) {
    display: none !important;
  }
  .navbar .navbar-nav {
    width: 100%;
    gap: 0;
  }
  .navbar .navbar-collapse {
    border-top: 1px solid var(--line);
    margin-top: 2.2rem;
    padding-top: 0.55rem;
    width: 100%;
  }
  .navbar .nav-link {
    font-size: 0.97rem;
    padding: 0.38rem 0 !important;
    border-radius: 0;
    border: 0;
  }
  .hero-stage {
    min-height: auto;
    padding-top: 2rem;
    max-width: 100%;
  }
  .hero-main-title {
    font-size: clamp(2.3rem, 13vw, 3.4rem);
    line-height: 1;
  }
  .lead {
    max-width: 100%;
    font-size: 1.02rem;
    line-height: 1.52;
  }
  .meta-line {
    margin-bottom: 1.05rem;
  }
  .kpi-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1rem;
    margin: 1.45rem 0 1.3rem;
  }
  .kpi-value {
    font-size: clamp(1.6rem, 8vw, 2.25rem);
  }
  .kpi-desc {
    font-size: 0.83rem;
  }
  .chart-title {
    margin-top: 0.82rem;
    margin-bottom: 0.16rem;
    font-size: 0.92rem;
  }
  .chart-analysis {
    font-size: 0.97rem;
    margin-bottom: 1.75rem;
  }
  .viz-clean-frame {
    height: 440px;
  }
}

@media (max-width: 520px) {
  .kpi-inline {
    grid-template-columns: 1fr;
  }
  .action-row {
    width: 100%;
    gap: 0.6rem;
  }
  .btn-pill {
    min-width: 128px;
  }
  .hero-main-title {
    max-width: 10.5ch;
  }
}

.ai-explorer {
  border: none;
  border-radius: 18px;
  padding: 1rem;
  background: #ffffff;
  margin: 0.32rem 0 0.9rem;
}

.ai-helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.ai-prompt-chip {
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  padding: 0.38rem 0.72rem;
  font-size: 0.84rem;
  line-height: 1.2;
  cursor: pointer;
}

.ai-prompt-chip:hover {
  border-color: #d2d6dc;
  background: #fafafa;
}

.ai-controls {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: 0.72rem;
  align-items: end;
}

.ai-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.ai-field label {
  font-size: 0.86rem;
  color: var(--muted);
}

.ai-field input,
.ai-field select {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 0.68rem 0.8rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #ffffff;
}

.ai-field-query {
  min-width: 0;
}

.ai-mode-note,
.ai-meta {
  margin-top: 0.75rem;
}

.ai-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.ai-result-card {
  border: none;
  border-radius: 18px;
  padding: 0.95rem;
  background: #ffffff;
}

.ai-result-head {
  margin-bottom: 0.5rem;
}

.ai-result-party {
  font-size: 1rem;
  font-weight: 560;
  margin-bottom: 0.45rem;
}

.ai-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ai-result-chip {
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  padding: 0.24rem 0.55rem;
  font-size: 0.76rem;
}

.ai-result-text,
.ai-result-snippet {
  font-size: 0.95rem;
  line-height: 1.56;
}

.ai-result-details {
  margin-top: 0.35rem;
}

.ai-result-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.86rem;
}

.ai-result-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.ai-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 1rem;
  color: var(--muted);
}

.ai-local-box {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.ai-local-title {
  font-size: 0.95rem;
  font-weight: 560;
  margin-bottom: 0.42rem;
}

.ai-command {
  margin: 0.5rem 0 0;
  border: none;
  border-radius: 14px;
  padding: 0.82rem 0.92rem;
  background: #fafafa;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .ai-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .ai-controls {
    grid-template-columns: 1fr;
  }
}

.hero-page-simple {
  padding-top: 5.6rem;
  padding-bottom: 1.25rem;
  text-align: center;
}

.hero-page-title {
  margin: 0 auto 1rem;
  max-width: 18ch;
}

.hero-line {
  display: block;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 1.25rem 0 2.4rem;
}

.plan-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 0.35rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 154px;
}

.plan-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-card-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.06);
}

.plan-card-body {
  min-width: 0;
}

.plan-card-party {
  font-size: 1.02rem;
  font-weight: 560;
  line-height: 1.22;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.plan-card-party-link {
  display: inline-block;
  text-decoration: none;
}

.plan-card-party-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.plan-card-candidate {
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.plan-card-link {
  min-width: 0;
  padding-inline: 0.9rem;
}

.lead-page-simple {
  margin: 0.35rem auto 0;
  max-width: 760px;
}

.plans-source {
  margin: 0 auto 3rem;
  max-width: 760px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero-page-simple {
    padding-top: 4.7rem;
  }

  .plans-grid {
    grid-template-columns: 1fr;
    gap: 0.95rem;
  }

  .plan-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.9rem 0;
    min-height: 136px;
  }

  .plan-card-logo {
    width: 74px;
    height: 74px;
  }
}
