:root {
  --green: #1b7a4a;
  --green-dark: #125a35;
  --green-light: #e8f4ee;
  --gold: #c8952b;
  --text: #1f2328;
  --muted: #667085;
  --border: #e5e8e6;
  --bg: #ffffff;
  --bg-alt: #f6f8f7;
  --shadow: 0 2px 10px rgba(18, 40, 30, 0.06);
  --shadow-lg: 0 10px 30px rgba(18, 40, 30, 0.12);
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: #16281f;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; flex-wrap: wrap; gap: 10px; }
.brand { display: flex; align-items: center; }
.brand img { height: 56px; width: auto; display: block; }
.brand:hover { text-decoration: none; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); display: block; border-radius: 2px; }

.main-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.main-nav > ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; gap: 2px; }
.main-nav ul ul {
  display: none; position: absolute; background: #fff; border: 1px solid var(--border);
  min-width: 240px; box-shadow: var(--shadow-lg); z-index: 10; padding: 8px 0; border-radius: 8px;
  margin-top: 4px;
}
.main-nav li { position: relative; }
.main-nav > ul > li > a, .main-nav > ul > li > span {
  display: block; padding: 10px 13px; color: var(--text); font-size: .92rem; font-weight: 500;
  border-radius: 6px; cursor: default;
}
.main-nav > ul > li > a { cursor: pointer; }
.main-nav > ul > li:hover > a, .main-nav > ul > li:hover > span { background: var(--green-light); color: var(--green-dark); text-decoration: none; }
.main-nav li:hover > ul { display: block; }
.main-nav ul ul li a, .main-nav ul ul li span { display: block; padding: 9px 16px; color: var(--text); white-space: nowrap; font-size: .9rem; }
.main-nav ul ul li a:hover { background: var(--bg-alt); text-decoration: none; color: var(--green-dark); }
.main-nav .no-link { cursor: default; }

/* ---------- layout ---------- */
.content { padding: 34px 20px 60px; min-height: 60vh; max-width: 900px; margin: 0 auto; }
.home-main .content { max-width: 1140px; }
.breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.meta-line { color: var(--muted); font-size: .88rem; }
.tags { margin: 12px 0; }
.tag { display: inline-block; background: var(--green-light); color: var(--green-dark); border-radius: 20px; padding: 4px 12px; font-size: .78rem; margin-right: 6px; font-weight: 500; }

.article h1, .profile h1 { font-size: 2rem; margin-bottom: 6px; }
.article-body { margin-top: 20px; font-size: 1.02rem; }
.article-body :first-child { margin-top: 0; }
.article-body img { border-radius: var(--radius); margin: 14px 0; box-shadow: var(--shadow); }
.article-body table { border-collapse: collapse; max-width: 100%; overflow-x: auto; display: block; margin: 16px 0; }
.article-body td, .article-body th { border: 1px solid var(--border); padding: 8px 12px; }
.article-body h2, .article-body h3 { margin-top: 1.6em; }
.pdf-download {
  display: inline-flex; align-items: center; gap: 8px; background: var(--green); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-weight: 600; margin-top: 8px;
}
.pdf-download:hover { background: var(--green-dark); text-decoration: none; }

.video-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); margin: 10px 0 20px; }

.field-list { display: grid; grid-template-columns: 200px 1fr; gap: 10px 16px; margin: 20px 0; padding: 18px 20px; background: var(--bg-alt); border-radius: var(--radius); }
.field-list dt { font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.field-list dd { margin: 0; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin: 20px 0; }
.card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  color: var(--text); background: #fff; transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-lg); text-decoration: none; transform: translateY(-3px); }
.card-thumb { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--bg-alt); }
.card-body { padding: 14px 16px; }
.card-body h3 { margin: 0 0 6px; font-size: 1.02rem; font-family: "Inter", sans-serif; font-weight: 600; }
.card-subtitle { color: var(--green-dark); font-size: .85rem; margin: 0 0 4px; font-weight: 500; }
.card-excerpt { color: var(--muted); font-size: .85rem; margin: 0; }

.quick-card {
  text-align: left; padding: 22px 20px; border-top: 3px solid var(--green);
}
.quick-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: var(--green-light); color: var(--green-dark); border-radius: 10px; margin-bottom: 12px;
}
.quick-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick-card h3 { margin: 0 0 4px; color: #16281f; font-size: 1.05rem; }
.quick-card p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--green-dark), var(--green) 65%);
  padding: 70px 0 90px;
  text-align: center;
  color: #fff;
}
.hero-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: .5;
}
.hero-inner { position: relative; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 14px; }
.hero p { color: rgba(255,255,255,0.92); max-width: 720px; margin: 0 auto; font-size: 1.05rem; }

.home-main .content {
  margin-top: -50px; position: relative; z-index: 2;
  background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 30px rgba(18, 40, 30, 0.05);
  padding-top: 44px;
}
.quick-links h2, .featured h2, .recent-news h2 {
  font-size: 1.35rem; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 3px solid var(--green-light);
  display: inline-block;
}
.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
@media (max-width: 700px) { .home-columns { grid-template-columns: 1fr; } }

.plain-list { list-style: none; padding: 0; margin: 10px 0; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.more-link { font-weight: 600; }

.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border); }
.pagination a { font-weight: 600; }
.page-info { color: var(--muted); font-size: .88rem; }

/* ---------- video filters ---------- */
.video-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin: 20px 0 6px;
}
.video-filters input[type="search"],
.video-filters select {
  font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text);
}
.video-filters input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.video-filters select { flex: 1 1 160px; min-width: 140px; }
.filter-reset {
  font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--green);
  background: #fff; color: var(--green-dark); cursor: pointer; white-space: nowrap;
}
.filter-reset:hover { background: var(--green-light); }
.video-count { margin: 4px 2px 0; }

/* ---------- footer ---------- */
.site-footer { background: #14261d; color: #cfe0d6; padding: 44px 0 0; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding-bottom: 30px; }
.footer-logo { height: 42px; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: .9; }
.footer-about p { max-width: 480px; font-size: .9rem; color: #a9c2b3; }
.footer-links h4 { color: #fff; margin: 0 0 14px; font-size: .95rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: #cfe0d6; font-size: .88rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 16px 0; }
.fine-print { font-size: .8rem; color: #8ba798; margin: 0; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; width: 100%; order: 3; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; }
  .main-nav ul ul { position: static; box-shadow: none; border: none; padding-left: 14px; margin-top: 0; }
  .field-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links ul { columns: 1; }
  .hero { padding: 50px 0 70px; }
}

/* ---------- quizzes ---------- */
.quiz-card {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-top: 20px;
}
.quiz-meta { color: var(--green-dark); font-weight: 600; margin: 0 0 10px; }

.quiz-btn {
  font: inherit; font-weight: 600; padding: 11px 22px; border-radius: 8px; cursor: pointer;
  border: 2px solid var(--green); display: inline-block;
}
.quiz-btn-primary { background: var(--green); color: #fff; }
.quiz-btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.quiz-btn-primary:disabled { background: #a9c9b8; border-color: #a9c9b8; cursor: not-allowed; }
.quiz-btn-outline { background: #fff; color: var(--green-dark); }
.quiz-btn-outline:hover { background: var(--green-light); text-decoration: none; }
.quiz-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.quiz-progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width .25s ease; width: 0; }

.quiz-step { color: var(--muted); font-size: .85rem; margin: 14px 0 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.quiz-question { margin: 4px 0 18px; font-size: 1.3rem; }

.quiz-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  width: 100%; text-align: left; font: inherit; padding: 13px 16px; border-radius: 8px;
  border: 1.5px solid var(--border); background: #fff; cursor: pointer; transition: border-color .15s, background .15s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--green); background: var(--green-light); }
.quiz-option:disabled { cursor: default; }
.quiz-option.quiz-correct { border-color: var(--green); background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.quiz-option.quiz-incorrect { border-color: #c0392b; background: #fdecea; color: #a83226; }

.quiz-explanation {
  margin-top: 16px; padding: 12px 14px; background: #fff; border-left: 3px solid var(--green);
  border-radius: 4px; font-size: .92rem; color: var(--muted);
}

.quiz-score { font-size: 1.3rem; font-weight: 700; color: #16281f; margin: 10px 0; }
.quiz-score-message { color: var(--muted); margin-top: 10px; }

.quiz-certificate-box {
  margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--border);
}
.quiz-certificate-box h3 { margin: 0 0 6px; font-size: 1.1rem; }
.quiz-cert-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.quiz-cert-form input {
  flex: 1 1 240px; font: inherit; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff;
}
.quiz-cert-error { color: #a83226; font-size: .85rem; margin-top: 8px; }

@media (max-width: 600px) {
  .quiz-card { padding: 20px; }
  .quiz-question { font-size: 1.1rem; }
}

/* ---------- intro splash (shown once per session, 2.5s) ---------- */
#splash { display: none; }
html.splash-on #splash {
  position: fixed; inset: 0; z-index: 10000; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  cursor: pointer;
  animation: splash-out .4s ease 2.1s forwards;
}
.splash-logo {
  width: min(440px, 72vw); height: auto; will-change: clip-path, transform, opacity;
  animation: splash-reveal 1s cubic-bezier(.2, .7, .2, 1) .1s both;
}
.splash-bar {
  width: min(280px, 56vw); height: 4px; border-radius: 2px; background: var(--border); overflow: hidden;
  opacity: 0; animation: splash-fade-in .3s ease .4s forwards;
}
.splash-bar::after {
  content: ""; display: block; height: 100%; background: var(--green);
  transform: scaleX(0); transform-origin: left;
  animation: splash-progress 1.7s cubic-bezier(.3, .1, .3, 1) .4s forwards;
}
.splash-label {
  margin: -8px 0 0; font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); opacity: 0; animation: splash-fade-in .3s ease .5s forwards;
}
.splash-label span { animation: splash-dot 1s ease-in-out infinite; }
.splash-label span:nth-child(2) { animation-delay: .15s; }
.splash-label span:nth-child(3) { animation-delay: .3s; }
@keyframes splash-reveal {
  from { clip-path: inset(0 100% 0 0); opacity: .15; transform: scale(.93); }
  to   { clip-path: inset(0 0 0 0);    opacity: 1;   transform: scale(1); }
}
@keyframes splash-fade-in { to { opacity: 1; } }
@keyframes splash-progress { to { transform: scaleX(1); } }
@keyframes splash-dot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* ---------- hero branding ---------- */
.hero .hero-logo { margin: 0 0 22px; }
.hero-logo img { display: block; margin: 0 auto; width: min(360px, 76vw); height: auto; filter: brightness(0) invert(1); }
.hero-watermark {
  position: absolute; top: 50%; right: -170px; width: 560px; height: 306px; transform: translateY(-50%);
  background: url("/wp-content/uploads/2018/06/pkvtr-logo.png?v=2") center / contain no-repeat;
  filter: brightness(0) invert(1); opacity: .06; pointer-events: none;
}
@media (max-width: 900px) { .hero-watermark { display: none; } }
@media (max-width: 820px) { .brand img { height: 44px; } }

/* ---------- notices ---------- */
.site-notice {
  margin: 0 0 26px; padding: 14px 18px; border-radius: 8px; font-size: .88rem; line-height: 1.55;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); border-left: 4px solid var(--gold);
  color: #dbe8e0;
}
.site-notice strong { color: #fff; }
.site-notice a { color: #fff; text-decoration: underline; }
.data-notice {
  margin: 16px 0; padding: 12px 16px; border-radius: 8px; font-size: .9rem; line-height: 1.55;
  background: #fff8e6; border: 1px solid #f0d58a; border-left: 4px solid var(--gold); color: #5c4a12;
}
.data-notice a { color: #7a5a00; text-decoration: underline; }

/* keep the menu on one row on smaller desktops now that the logo is larger */
@media (max-width: 1180px) and (min-width: 821px) {
  .main-nav > ul > li > a, .main-nav > ul > li > span { padding: 10px 8px; font-size: .88rem; }
}

/* ---------- homepage: resources + latest updates ---------- */
.resources-panel h2, .updates-panel h2 {
  font-size: 1.35rem; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 3px solid var(--green-light); display: inline-block;
}
.section-note { color: var(--muted); font-size: .85rem; margin: 0 0 10px; }
.resource-list { list-style: none; margin: 0; padding: 0; }
.resource-list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.resource-list a { font-weight: 600; }
.resource-list span { color: var(--muted); font-size: .88rem; }
.update-list { list-style: none; margin: 0; padding: 0; }
.update-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.update-list h3 { font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 600; margin: 4px 0 4px; }
.update-list p { margin: 0 0 6px; font-size: .9rem; color: var(--text); }
.update-meta { display: flex; align-items: center; gap: 8px; }
.update-meta .muted { white-space: normal; }
.chip { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 20px; background: var(--green-light); color: var(--green-dark); }
.chip-upcoming { background: #fff3d6; color: #7a5a00; }
.update-source { font-size: .82rem; font-weight: 600; }
