:root {
  --bg: #f3efe6;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --text: #152027;
  --muted: #4d5d65;
  --primary: #0f766e;
  --primary-deep: #0d5f58;
  --accent: #c2410c;
  --border: #d8e0df;
  --success: #166534;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow: 0 14px 38px rgba(15, 118, 110, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(15, 118, 110, 0.12), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(194, 65, 12, 0.11), transparent 32%),
    var(--bg);
  line-height: 1.65;
}

html[lang="ur"] body {
  font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", "Segoe UI", sans-serif;
  line-height: 1.9;
}

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

a:hover {
  color: var(--primary-deep);
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(92%, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--surface);
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(9px);
  background: rgba(243, 239, 230, 0.86);
  border-bottom: 1px solid rgba(77, 93, 101, 0.12);
}

.header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--primary), var(--accent));
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.25);
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, 0.88);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.site-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  background: rgba(15, 118, 110, 0.13);
  color: var(--primary-deep);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.3rem;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.lang-link.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

main {
  padding: 2.4rem 0 3.5rem;
}

.hero {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}

.hero h1,
h1 {
  margin-top: 0;
  line-height: 1.2;
  font-size: clamp(1.8rem, 5vw, 2.9rem);
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

h2,
h3 {
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 65ch;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-deep);
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.2);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.1rem 1rem;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.section {
  margin-top: 2.8rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}

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

.tool-shell {
  background: var(--surface);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.5rem);
  box-shadow: var(--shadow);
}

.field-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #c7d2d7;
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

input[type="file"] {
  padding: 0.5rem 0.55rem;
}

textarea {
  min-height: 190px;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  border-color: var(--primary);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.upload-row {
  margin-top: 0.75rem;
  border: 1px dashed #b9d7d3;
  border-radius: 12px;
  background: #f4faf9;
  padding: 0.65rem 0.75rem;
}

.loading-state {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #cde1de;
  background: #eef7f5;
  color: var(--primary-deep);
  font-weight: 600;
}

.loading-state[hidden] {
  display: none !important;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(15, 118, 110, 0.25);
  border-top-color: var(--primary);
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-panel {
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.completeness-card {
  margin: 0.85rem 0 1rem;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid #cde1de;
  background: #ffffff;
}

.completeness-score {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.check-pill {
  border-radius: 999px;
  border: 1px solid #d2dce3;
  background: #f5f7fa;
  color: #25343c;
  padding: 0.28rem 0.65rem;
  font-size: 0.86rem;
}

.check-pill.ok {
  border-color: #b6ddd8;
  background: #e8f4f2;
  color: var(--primary-deep);
}

.check-pill.miss {
  border-color: #f3d6bf;
  background: #fff4ea;
  color: #9a3412;
}

.score {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0.2rem 0;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.score.good {
  color: var(--success);
}

.score.mid {
  color: var(--warning);
}

.score.bad {
  color: var(--danger);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.keyword {
  background: #e8f4f2;
  border: 1px solid #b9d7d3;
  color: var(--primary-deep);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.9rem;
}

.keyword.missing {
  background: #fff4ea;
  border-color: #f9d8c2;
  color: #9a3412;
}

.faq-item {
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

.faq-item + .faq-item {
  margin-top: 0.75rem;
}

.post-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.post-card h3 {
  margin-top: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.article {
  background: var(--surface);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.4vw, 2rem);
  box-shadow: var(--shadow);
}

.article h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.article h2 {
  margin-top: 1.8rem;
}

.article ul,
.article ol {
  padding-left: 1.2rem;
}

.article blockquote {
  margin: 1rem 0;
  border-left: 4px solid var(--primary);
  padding: 0.7rem 0.9rem;
  background: #f4faf9;
}

.breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.site-footer {
  border-top: 1px solid rgba(77, 93, 101, 0.2);
  background: #f7f3ea;
  padding: 1.8rem 0 2.4rem;
}

.footer-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 2fr 1fr 1fr;
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.notice {
  border-left: 4px solid var(--accent);
  background: #fff6ef;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  border: 1px solid var(--border);
  text-align: left;
  padding: 0.65rem 0.75rem;
}

th {
  background: #edf6f4;
}

.tag {
  display: inline-block;
  background: #e9f4f2;
  border: 1px solid #cde1de;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  color: var(--primary-deep);
}

.text-center {
  text-align: center;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 74px;
    background: rgba(247, 243, 234, 0.98);
    border-bottom: 1px solid rgba(77, 93, 101, 0.18);
    padding: 0.8rem 1rem;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: 0.18s ease;
  }

  .site-nav.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-switch {
    margin-left: auto;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
