:root {
  --ink: #251f21;
  --ink-2: #585254;
  --hairline: #eae9ea;
  --teal: #5d8a7d;
  --sand: #f4efec;
  --navy: #1b2a4a;
  --gold: #e8c66a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #faf7f2;
  color: var(--ink);
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.7;
}
.page { max-width: 720px; margin: 0 auto; padding: 24px 20px 48px; }



.top { position: relative; border-radius: 20px; overflow: hidden; min-height: 250px; background: var(--navy); margin-bottom: 16px; }
.top-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .9; }
.top-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,34,61,.55) 0%, rgba(27,42,74,.15) 45%, rgba(22,34,61,.85) 100%); }
.top-content { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 16px 22px; min-height: 250px; }
.basmala { color: #e9d9a6; font-size: 15px; font-weight: 600; margin: 0 0 14px; opacity: .9; }
.wordmark { font-size: 32px; letter-spacing: .32em; font-weight: 800; color: var(--gold); line-height: 1.1; padding-inline-start: .32em; }
.tagline { font-size: 13px; color: #cdd6ea; margin-top: 4px; }
.hero-text { margin: auto 0 0; padding-top: 28px; color: #fff; font-size: 26px; font-weight: 800; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.hero-text::after { content: ""; display: block; width: 44px; height: 3px; background: var(--gold); border-radius: 2px; margin: 8px auto 0; }

.notice { background: transparent; border-inline-start: 3px solid var(--gold); padding: 4px 12px; margin: 0 4px 16px; font-size: 13.5px; color: var(--ink-2); }
.notice strong { display: block; color: var(--ink); font-size: 14px; }

.search-box { background: #fff; border-radius: 18px; padding: 20px 18px 14px; box-shadow: 0 6px 24px rgba(27,42,74,.10); border: 1px solid #efe9df; margin-bottom: 8px; }
h1 { font-size: 21px; font-weight: 800; margin: 0 0 2px; color: var(--navy); }
.intro { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; line-height: 1.6; }
h2 { font-size: 20px; margin: 0 0 12px; }
.search-row { display: flex; gap: 10px; }
.search-row input {
  flex: 1 1 auto; min-width: 0; font: inherit; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 8px; padding: 12px 14px; min-height: 48px;
}
.search-row input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.search-row button {
  box-shadow: 0 0 0 2px var(--gold) inset;
  flex: 0 0 auto; font: inherit; font-weight: 600; min-height: 48px; padding: 0 28px;
  border: 0; border-radius: 8px; background: var(--navy); color: #fff; cursor: pointer;
}
.search-row button:hover { background: #25355c; }
.hint { color: var(--ink-2); font-size: 12.5px; margin: 10px 0 0; }


.candidates { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.candidate {
  display: flex; flex-direction: column; gap: 2px; text-align: start; font: inherit;
  background: #fff; border: 1px solid var(--hairline); border-radius: 12px;
  padding: 12px 16px; min-height: 56px; cursor: pointer;
}
.candidate:hover { border-color: var(--teal); }
.candidate-name { font-weight: 600; }
.candidate-seat { color: var(--ink-2); font-size: 13px; }

.result { margin-top: 20px; }
.result h3 { font-size: 22px; margin: 0 0 12px; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: 16px; }
.fact { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.fact .k { color: var(--ink-2); }
.fact .v { font-weight: 600; }
.actions { display: flex; gap: 10px; margin: 4px 0 16px; }
.btn {
  flex: 1 1 0; text-align: center; font-weight: 600; text-decoration: none;
  padding: 12px 16px; border-radius: 8px; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: #25355c; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--hairline); }
.btn.secondary:hover { border-color: var(--teal); }
.pdf { width: 100%; height: 70vh; border: 1px solid var(--hairline); border-radius: 12px; }

.closing { margin-top: 32px; color: var(--ink-2); font-size: 13px; text-align: center; }

@media (max-width: 420px) {
  .search-row { flex-direction: column; }
  .search-row button { width: 100%; }
  .actions { flex-direction: column; }
  .pdf { height: 60vh; }
}

.top, .top-content { min-height: 280px; }
.top-content { justify-content: flex-start; }
.glass { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -58%); padding: 12px 22px 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.glass .wordmark { display: block; font-size: 30px; text-shadow: 0 2px 10px rgba(0,0,0,.45); padding-inline-start: 0; }
.basmala { margin-bottom: 0; }
.glass { top: 33%; transform: translate(-50%, -50%); padding: 8px 16px 8px 8px; border-radius: 12px; }
.glass .wordmark { font-size: 23px; }
.glass { top: 44%; padding: 12px 16px 12px 8px; }
