@font-face {
  font-family: "Noto Nastaliq Urdu";
  src: url("/assets/NotoNastaliqUrdu-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #14312b;
  --green: #0b3f35;
  --green-deep: #062d26;
  --green-soft: #dfece5;
  --ivory: #f7f4ec;
  --paper: #fffdf8;
  --gold: #d4a334;
  --gold-soft: #f8e5b5;
  --line: #d7ddd4;
  --muted: #64726c;
  --danger: #b7412e;
  --shadow: 0 24px 60px rgba(6, 45, 38, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.urdu, html[lang="ur"] body { font-family: "Noto Nastaliq Urdu", serif; }
.urdu { line-height: 2; }
.shell { min-height: 100svh; overflow: hidden; }
.topbar {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 92px;
  padding: 0 max(24px, calc((100% - 1180px) / 2));
  color: white;
  background: rgba(6, 45, 38, 0.92);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 760; letter-spacing: -0.02em; }
.brand img { width: 54px; height: 54px; object-fit: contain; border-radius: 50%; background: white; }
.brand span { max-width: 235px; font-size: 0.86rem; line-height: 1.15; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 0.88rem; font-weight: 650; }
.nav a { opacity: 0.94; transition: opacity 180ms ease; }
.nav a:hover { opacity: 0.7; }
.nav .nav-lookup { padding: 8px 0 7px; color: #f6d981; border-bottom: 1px solid currentColor; }
.language-toggle {
  min-width: 46px;
  padding: 8px 11px;
  color: white;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 750;
}

.hero {
  position: relative;
  min-height: clamp(720px, 56.25vw, 900px);
  overflow: hidden;
  color: white;
  background: var(--green-deep);
}
.hero-media { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #062d26 0%, rgba(6, 45, 38, .98) 34%, rgba(6, 45, 38, .72) 45%, rgba(6, 45, 38, .18) 63%, rgba(6, 45, 38, .03) 100%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(630px, calc(100% - 96px));
  margin-left: max(48px, calc((100vw - 1180px) / 2));
  padding: clamp(178px, 15vw, 228px) 0 82px;
  animation: lift-in 700ms ease-out both;
}
.eyebrow { margin: 0 0 13px; color: #f6d981; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.hero h1 { max-width: 700px; margin: 0; font-size: clamp(2.6rem, 6vw, 5.45rem); line-height: 0.98; letter-spacing: -0.065em; }
.hero .urdu.hero-title { max-width: 790px; font-size: clamp(2.3rem, 4.7vw, 4.6rem); line-height: 1.4; letter-spacing: 0; }
.hero-summary { max-width: 570px; margin: 26px 0 0; color: rgba(255,255,255,.88); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 49px;
  padding: 13px 19px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--green-deep); background: var(--gold-soft); }
.button-quiet { color: white; border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.05); }

.section { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 112px 0; }
.section-label { display: block; margin-bottom: 12px; color: #8c6715; font-size: .75rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.section h2 { max-width: 720px; margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.03; letter-spacing: -.055em; }
.section h2.urdu { line-height: 1.55; letter-spacing: 0; }
.section-intro { max-width: 630px; margin: 20px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }

.pledge { background: var(--green-soft); }
.pledge-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(350px, 1.1fr); gap: 72px; align-items: center; }
.pledge-copy { padding-left: 18px; border-left: 2px solid var(--gold); }
.pledge-copy p { margin: 18px 0 0; color: var(--muted); line-height: 1.75; }
.pledge-points { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.pledge-points li { padding: 0 0 20px; border-bottom: 1px solid rgba(20,49,43,.18); font-size: 1.04rem; font-weight: 670; }
.pledge-points li:last-child { padding-bottom: 0; border-bottom: 0; }
.pledge-points span { display: block; margin-top: 5px; color: var(--muted); font-size: .92rem; font-weight: 400; line-height: 1.55; }

.panel-section { background: var(--paper); }
.panel-lead { display: block; }
.panel-image { overflow: hidden; background: #e7ebe4; border: 1px solid #d2c59f; }
.panel-image img { width: 100%; height: auto; transition: transform 600ms ease; }
.panel-image:hover img { transform: scale(1.018); }
.panel-aside { max-width: 690px; margin: 46px auto 0; text-align: center; }
.panel-aside p { margin: 20px 0 0; color: var(--muted); line-height: 1.75; }
.candidate-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; margin-top: 82px; border-top: 1px solid var(--line); }
.candidate { display: grid; grid-template-columns: minmax(135px, .7fr) minmax(0, 1.3fr); gap: 22px; padding: 28px 0 30px; border-bottom: 1px solid var(--line); }
.candidate-role { margin: 0; color: #8c6715; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.candidate-name { margin: 5px 0 0; font-size: 1.2rem; line-height: 1.15; letter-spacing: -.025em; }
.candidate-description { max-width: 620px; margin: 0; color: #46554e; font-size: .94rem; line-height: 1.7; }

.lookup-section { position: relative; color: white; background: var(--green-deep); scroll-margin-top: 16px; }
.lookup-section::before { position: absolute; inset: 0 0 auto; height: 4px; content: ""; background: var(--gold); }
.lookup-layout { display: grid; grid-template-columns: minmax(0, .74fr) minmax(440px, 1.26fr); gap: 88px; align-items: center; }
.lookup-section .section { padding: 90px 0 96px; }
.lookup-section .section-label { color: #f6d981; }
.lookup-section h2 { max-width: 560px; font-size: clamp(2.3rem, 4.7vw, 4.35rem); }
.lookup-section p { max-width: 520px; color: rgba(255,255,255,.75); line-height: 1.75; }
.lookup-form { display: grid; gap: 12px; padding: 10px 0 10px 34px; border-left: 1px solid rgba(246,217,129,.65); }
.lookup-form label { color: rgba(255,255,255,.8); font-size: .84rem; font-weight: 700; }
.lookup-control { display: flex; gap: 0; border-bottom: 2px solid var(--gold); background: var(--paper); }
.lookup-control input { min-width: 0; flex: 1; padding: 18px 18px; color: var(--ink); border: 0; outline: 0; background: transparent; }
.lookup-control input::placeholder { color: #89958f; }
.lookup-control button { min-width: 114px; padding: 11px 17px; color: var(--green-deep); border: 0; background: var(--gold-soft); font-weight: 850; }
.search-hint { margin: 1px 0 0; color: rgba(255,255,255,.65); font-size: .78rem; line-height: 1.55; }
.form-message { min-height: 24px; margin: 0; color: #f6d981; font-size: .85rem; line-height: 1.55; }
.form-message.error { color: #ffd0c7; }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; }
.contact h2 { max-width: 540px; }
.contact-links { display: grid; min-width: 288px; gap: 0; }
.contact-line { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); transition: color 160ms ease, border-color 160ms ease; }
.contact-line:first-child { border-top: 1px solid var(--line); }
.contact-line span { color: var(--muted); font-size: .72rem; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.contact-line strong { color: var(--green); font-size: 1.05rem; letter-spacing: -.02em; text-align: right; }
.contact-line:hover { color: #8c6715; border-color: var(--gold); }
.footer { display: flex; justify-content: space-between; gap: 28px; width: min(1180px, calc(100% - 48px)); margin: auto; padding: 27px 0 34px; color: #6e7a74; border-top: 1px solid var(--line); font-size: .8rem; }

.results-page { min-height: 100svh; background: var(--ivory); }
.results-header { display: flex; justify-content: space-between; align-items: center; width: min(1080px, calc(100% - 48px)); margin: auto; min-height: 92px; }
.results-header .brand { color: var(--green); }
.results-header .language-toggle { color: var(--green); border-color: var(--green); }
.results-wrap { width: min(1080px, calc(100% - 48px)); margin: auto; padding: 62px 0 96px; }
.back-link { display: inline-flex; gap: 9px; align-items: center; color: #6c514f; font-size: .88rem; font-weight: 760; }
.results-title { margin: 18px 0 0; font-size: clamp(2rem, 4.4vw, 3.8rem); letter-spacing: -.06em; line-height: 1; }
.results-title.urdu { line-height: 1.5; letter-spacing: 0; }
.results-subtitle { max-width: 690px; margin: 16px 0 0; color: var(--muted); line-height: 1.7; }
.results-warning { margin: 32px 0 0; padding: 15px 18px; color: #6b4f08; border-left: 3px solid var(--gold); background: var(--gold-soft); font-size: .9rem; line-height: 1.6; }
.results-list { margin-top: 36px; border-top: 1px solid var(--line); }
.result { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.result-serial { color: #8c6715; font-size: .8rem; font-weight: 800; padding-top: 7px; }
.identity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.result-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .72rem; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; }
.result-name { margin: 0; font-size: clamp(1.2rem, 2.5vw, 1.5rem); letter-spacing: -.03em; line-height: 1.25; }
mark { padding: 0 .11em; color: inherit; background: var(--gold-soft); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.profile-link { display: inline-block; margin-top: 22px; padding-bottom: 4px; color: var(--green); border-bottom: 1px solid var(--gold); font-size: .84rem; font-weight: 800; transition: color 160ms ease, border-color 160ms ease; }
.profile-link:hover { color: #8c6715; border-color: currentColor; }
.profile-record { margin-top: 40px; border-top: 1px solid var(--line); }
.profile-identity { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .48fr); gap: 36px 52px; padding: 34px 0 38px; }
.profile-entry { display: flex; grid-column: 1 / -1; justify-content: space-between; align-items: baseline; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.profile-entry span, .profile-name-field > span, .profile-cnic > span, .profile-field dt { color: var(--muted); font-size: .7rem; font-weight: 820; letter-spacing: .1em; text-transform: uppercase; }
.profile-entry strong { color: #8c6715; font-size: .84rem; letter-spacing: .08em; }
.profile-name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.profile-name-field h2 { margin: 7px 0 0; color: var(--ink); font-size: clamp(1.3rem, 2.35vw, 1.85rem); letter-spacing: -.035em; line-height: 1.15; text-align: left; }
.profile-cnic { align-self: end; padding: 20px 0 2px 26px; border-left: 2px solid var(--gold); }
.profile-cnic > span, .profile-cnic small { display: block; }
.profile-cnic strong { display: block; margin-top: 7px; color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1.2rem, 2vw, 1.55rem); font-variant-numeric: tabular-nums; letter-spacing: .035em; line-height: 1.2; white-space: nowrap; }
.profile-cnic small { margin-top: 9px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.profile-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.profile-group { min-width: 0; padding: 29px 28px 36px 0; }
.profile-group + .profile-group { padding-left: 28px; border-left: 1px solid var(--line); }
.profile-group h2 { margin: 0; color: #8c6715; font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.profile-group h2.urdu { font-size: 1rem; letter-spacing: 0; }
.profile-fields { display: grid; gap: 19px; margin: 24px 0 0; }
.profile-field { min-width: 0; }
.profile-field dd { margin: 6px 0 0; color: var(--ink); font-size: .98rem; font-weight: 620; line-height: 1.55; overflow-wrap: anywhere; }
.empty-state { margin-top: 34px; padding: 28px 0; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); line-height: 1.7; }
.loading { display: flex; align-items: center; min-height: 55svh; color: var(--muted); }

html[dir="rtl"] .topbar, html[dir="rtl"] .hero-copy, html[dir="rtl"] .section, html[dir="rtl"] .results-wrap, html[dir="rtl"] .results-header, html[dir="rtl"] .footer { text-align: right; }
html[dir="rtl"] .pledge-copy { padding-right: 18px; padding-left: 0; border-right: 2px solid var(--gold); border-left: 0; }
html[dir="rtl"] .results-warning { border-right: 3px solid var(--gold); border-left: 0; }
html[dir="rtl"] .lookup-form { padding-right: 34px; padding-left: 0; border-right: 1px solid rgba(246,217,129,.65); border-left: 0; }
html[dir="rtl"] .contact-line strong { text-align: left; }
html[dir="rtl"] .profile-cnic { padding-right: 26px; padding-left: 0; border-right: 2px solid var(--gold); border-left: 0; text-align: left; }
html[dir="rtl"] .profile-group { padding-right: 0; padding-left: 28px; }
html[dir="rtl"] .profile-group + .profile-group { padding-right: 28px; padding-left: 0; border-right: 1px solid var(--line); border-left: 0; }
html[dir="rtl"] .lookup-control input { direction: ltr; text-align: left; }

@keyframes lift-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 780px) {
  .topbar, .section, .footer, .results-wrap, .results-header { width: min(100% - 32px, 1180px); }
  .topbar { position: relative; width: 100%; height: 75px; padding: 0 16px; background: var(--green-deep); }
  .brand img { width: 45px; height: 45px; }
  .brand span { max-width: 150px; font-size: .7rem; }
  .nav { display: none; }
  .hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-media { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; object-position: center; }
  .hero::after { display: none; }
  .hero-copy { width: 100%; margin: 0; padding: 45px 16px 58px; background: var(--green-deep); }
  .hero h1 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .hero .urdu.hero-title { font-size: clamp(2.1rem, 9vw, 3.2rem); }
  .section { padding: 76px 0; }
  .pledge-grid, .lookup-layout { grid-template-columns: 1fr; gap: 42px; }
  .panel-aside { margin-top: 34px; text-align: left; }
  html[dir="rtl"] .panel-aside { text-align: right; }
  .candidate-list { grid-template-columns: 1fr; margin-top: 56px; }
  .candidate { grid-template-columns: minmax(116px, .65fr) minmax(0, 1.35fr); gap: 16px; }
  .lookup-section .section { padding: 72px 0 76px; }
  .lookup-form { padding: 0; border-left: 0; }
  html[dir="rtl"] .lookup-form { border-right: 0; }
  .lookup-control { flex-direction: column; }
  .lookup-control button { min-height: 46px; }
  .contact { grid-template-columns: 1fr; align-items: start; }
  .contact-links { width: 100%; }
  .identity { grid-template-columns: 1fr; gap: 16px; }
  .profile-identity { grid-template-columns: 1fr; gap: 26px; padding: 28px 0 32px; }
  .profile-entry { padding-bottom: 14px; }
  .profile-name-grid { grid-template-columns: 1fr; gap: 22px; }
  .profile-cnic { padding: 18px 0 0 18px; }
  .profile-groups { grid-template-columns: 1fr; }
  .profile-group { padding: 27px 0 30px; }
  .profile-group + .profile-group { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .profile-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px 22px; }
  html[dir="rtl"] .profile-cnic { padding-right: 18px; padding-left: 0; }
  html[dir="rtl"] .profile-group { padding-right: 0; padding-left: 0; }
  html[dir="rtl"] .profile-group + .profile-group { padding-right: 0; border-right: 0; }
  .footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 430px) {
  .hero-copy { padding-bottom: 42px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .section h2 { font-size: 2.15rem; }
  .profile-cnic strong { font-size: 1.12rem; }
}

@media (max-width: 560px) {
  .profile-fields { grid-template-columns: 1fr; }
}
