/*
Theme Name: KruNop Vocabulary Quiz
Theme URI: https://xn--12cl9ca5a0ai1ad0bea0clb11a0e.com/
Author: KruNop
Description: A fast, friendly WordPress theme for English vocabulary quizzes and learning articles.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kru-nop-vocabulary-quiz
Tags: education, blog, custom-logo, custom-menu, featured-images, one-column, two-columns, threaded-comments, translation-ready
*/

:root {
  --knvqt-green: #20a96b;
  --knvqt-green-bright: #2bc482;
  --knvqt-green-dark: #11794b;
  --knvqt-green-deep: #0b5c39;
  --knvqt-green-soft: #eaf8f0;
  --knvqt-cream: #fffaf0;
  --knvqt-paper: #fffefb;
  --knvqt-ink: #243229;
  --knvqt-muted: #6f7972;
  --knvqt-line: #e9e4d8;
  --knvqt-amber: #f0ae35;
  --knvqt-red: #dc5353;
  --knvqt-shadow: 0 16px 42px rgba(53, 65, 57, .1);
  --knvqt-shadow-soft: 0 9px 26px rgba(53, 65, 57, .08);
  --knvqt-radius: 24px;
  --knvqt-wrap: 1180px;
  --knvqt-reading: 820px;
}

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

html {
  background: var(--knvqt-cream);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--knvqt-ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(240, 174, 53, .1), transparent 23rem),
    radial-gradient(circle at 94% 7%, rgba(32, 169, 107, .09), transparent 25rem),
    var(--knvqt-cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header { top: 32px; }
a { color: var(--knvqt-green-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover, a:focus { color: var(--knvqt-green-deep); }
img { max-width: 100%; height: auto; vertical-align: middle; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .65em;
  color: var(--knvqt-ink);
  font-weight: 850;
  line-height: 1.25;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw, 3.7rem); }
h2 { font-size: clamp(1.55rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.18rem, 3vw, 1.45rem); }
p { margin: 0 0 1.15em; }
ul, ol { padding-inline-start: 1.3em; }
blockquote {
  margin: 1.7em 0;
  padding: 1.1em 1.4em;
  border-left: 5px solid var(--knvqt-green);
  border-radius: 0 16px 16px 0;
  color: #405247;
  background: var(--knvqt-green-soft);
}
code, pre { font-family: Consolas, Monaco, monospace; }
pre { max-width: 100%; padding: 18px; overflow: auto; border-radius: 14px; background: #17251d; color: #ecfff4; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--knvqt-line); text-align: left; }
th { color: var(--knvqt-green-dark); background: var(--knvqt-green-soft); }

::selection { color: #fff; background: var(--knvqt-green); }
:focus-visible { outline: 3px solid rgba(240,174,53,.85); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus, .skip-link:focus {
  z-index: 100000;
  top: 10px; left: 10px;
  width: auto; height: auto;
  padding: 11px 16px; margin: 0;
  clip: auto;
  color: #fff; background: var(--knvqt-green-deep);
  border-radius: 10px;
}

/* Header */
.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid rgba(255,255,255,.22);
  background: rgba(24, 166, 104, .96);
  box-shadow: 0 7px 25px rgba(12, 102, 62, .16);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(var(--knvqt-wrap), calc(100% - 36px));
  min-height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}
.site-branding { min-width: 215px; display: flex; align-items: center; gap: 12px; }
.custom-logo-link { flex: 0 0 auto; line-height: 0; }
.custom-logo { width: 48px; max-height: 48px; object-fit: contain; }
.brand-mark, .footer-mark {
  width: 46px; height: 46px;
  flex: 0 0 46px;
  display: grid; place-items: center;
  border: 3px solid rgba(255,255,255,.88);
  border-radius: 15px;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transform: rotate(-4deg);
}
.site-title { margin: 0; font-size: 1.13rem; font-weight: 900; line-height: 1.25; }
.site-title a { color: #fff; text-decoration: none; }
.site-description { margin: 2px 0 0; color: rgba(255,255,255,.76); font-size: .76rem; line-height: 1.3; }
.main-navigation { margin-left: auto; }
.primary-menu, .footer-menu { margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; list-style: none; }
.primary-menu a {
  padding: 9px 12px;
  display: block;
  border-radius: 10px;
  color: rgba(255,255,255,.9);
  font-size: .93rem;
  font-weight: 750;
  text-decoration: none;
}
.primary-menu a:hover, .primary-menu a:focus, .primary-menu .current-menu-item > a { color: #fff; background: rgba(255,255,255,.14); }
.header-quiz-button {
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  color: var(--knvqt-green-dark);
  background: #fff;
  box-shadow: 0 7px 18px rgba(5, 85, 48, .13);
  font-size: .9rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.header-quiz-button:hover { color: var(--knvqt-green-deep); transform: translateY(-1px); }
.menu-toggle { display: none; }

/* Common layout */
.site-main { display: block; }
.content-shell, .latest-section, .front-page-content {
  width: min(var(--knvqt-wrap), calc(100% - 36px));
  margin-inline: auto;
}
.content-shell { padding-block: 30px 70px; }
.narrow-shell { max-width: var(--knvqt-reading); }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; align-items: start; }
.no-sidebar .content-layout { grid-template-columns: 1fr; }
.button {
  min-height: 49px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button-primary { color: #fff; background: linear-gradient(135deg, var(--knvqt-green), var(--knvqt-green-bright)); box-shadow: 0 10px 22px rgba(32,169,107,.23); }
.button-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 13px 27px rgba(32,169,107,.3); }
.button-quiet { color: var(--knvqt-green-dark); border-color: #cce8d8; background: rgba(255,255,255,.78); }
.button-quiet:hover { background: #fff; transform: translateY(-2px); }
.section-kicker, .hero-eyebrow { margin: 0 0 7px; color: var(--knvqt-green-dark); font-size: .78rem; font-weight: 900; letter-spacing: .1em; }
.section-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading p:not(.section-kicker) { max-width: 620px; margin: 8px 0 0; color: var(--knvqt-muted); }
.centered-heading { display: block; text-align: center; }
.centered-heading p { margin-inline: auto !important; }
.text-link { flex: 0 0 auto; font-weight: 850; text-decoration: none; }

/* Hero */
.home-hero {
  width: min(var(--knvqt-wrap), calc(100% - 36px));
  min-height: 590px;
  margin: 26px auto 20px;
  padding: clamp(34px, 6vw, 74px);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  align-items: center;
  gap: 60px;
  border: 1px solid rgba(32,169,107,.18);
  border-radius: 36px;
  background:
    radial-gradient(circle at 85% 25%, rgba(32,169,107,.15), transparent 20rem),
    linear-gradient(135deg, #fbfff9, #fff9ea 67%);
  box-shadow: var(--knvqt-shadow);
}
.home-hero::before, .home-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.home-hero::before { width: 260px; height: 260px; right: -115px; bottom: -120px; border: 38px solid rgba(240,174,53,.11); }
.home-hero::after { width: 140px; height: 140px; left: -75px; top: -70px; background: rgba(32,169,107,.08); }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { max-width: 720px; margin-bottom: 18px; font-size: clamp(2.55rem, 6vw, 4.55rem); letter-spacing: -.045em; line-height: 1.08; }
.hero-copy h1::after { content: ""; width: .72em; height: .15em; margin-left: .08em; display: inline-block; border-radius: 999px; background: var(--knvqt-amber); transform: rotate(-5deg); }
.hero-lead { max-width: 650px; color: #57645c; font-size: clamp(1rem, 2vw, 1.16rem); line-height: 1.8; }
.hero-actions { margin: 26px 0 30px; display: flex; flex-wrap: wrap; gap: 11px; }
.hero-stats { margin: 0; padding: 0; display: flex; gap: clamp(19px, 4vw, 42px); list-style: none; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { color: var(--knvqt-green-dark); font-size: 1.35rem; line-height: 1.2; }
.hero-stats span { color: var(--knvqt-muted); font-size: .8rem; }
.hero-word-stack { min-height: 390px; position: relative; z-index: 2; }
.hero-word-card {
  width: min(300px, 76%);
  min-height: 142px;
  padding: 25px;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #e7e4d8;
  border-radius: 25px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 20px 42px rgba(44,65,52,.14);
  text-align: center;
}
.hero-word-card span { font-family: Arial, sans-serif; font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 900; letter-spacing: -.03em; }
.hero-word-card strong { margin-top: 3px; color: var(--knvqt-muted); font-size: 1rem; }
.word-card-one { z-index: 3; top: 93px; left: 8%; border-color: rgba(32,169,107,.55); box-shadow: 0 0 0 6px rgba(32,169,107,.07), 0 22px 45px rgba(24,126,77,.16); transform: rotate(-4deg); }
.word-card-two { z-index: 2; top: 6px; right: -2%; transform: rotate(6deg); }
.word-card-three { z-index: 1; right: 5%; bottom: 6px; transform: rotate(3deg); }
.hero-check { width: 58px; height: 58px; z-index: 5; right: 8%; top: 43%; position: absolute; display: grid; place-items: center; border: 6px solid #fff; border-radius: 50%; color: #fff; background: var(--knvqt-green); box-shadow: 0 10px 24px rgba(32,169,107,.28); font-size: 1.65rem; font-weight: 900; }

/* Feature and quiz */
.feature-strip {
  width: min(var(--knvqt-wrap), calc(100% - 36px));
  margin: 0 auto 84px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border: 1px solid var(--knvqt-line);
  border-radius: 24px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--knvqt-shadow-soft);
}
.feature-strip article { padding: 15px; display: flex; gap: 13px; align-items: center; border-radius: 17px; }
.feature-strip article + article { border-left: 1px solid var(--knvqt-line); border-radius: 0; }
.feature-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; color: var(--knvqt-green-dark); background: var(--knvqt-green-soft); font-family: Arial, sans-serif; font-size: .78rem; font-weight: 900; }
.feature-strip h2 { margin: 0 0 2px; font-size: 1rem; }
.feature-strip p { margin: 0; color: var(--knvqt-muted); font-size: .78rem; line-height: 1.45; }
.home-quiz-section { padding: 0 max(18px, calc((100% - var(--knvqt-wrap)) / 2)) 92px; scroll-margin-top: 105px; }
.quiz-stage { margin-top: 28px; padding: clamp(10px, 3vw, 30px); border-radius: 32px; background: linear-gradient(145deg, rgba(32,169,107,.1), rgba(240,174,53,.09)); }
.quiz-stage > .kngvq-app { margin-block: 0; }
.plugin-notice { max-width: 680px; margin: auto; padding: 30px; border: 2px dashed #a9d7bd; border-radius: 22px; background: #fff; text-align: center; }
.plugin-notice strong { color: var(--knvqt-green-dark); font-size: 1.2rem; }
.plugin-notice p { margin: 7px 0 0; color: var(--knvqt-muted); }
.front-page-content { margin-bottom: 82px; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--knvqt-line); border-radius: var(--knvqt-radius); background: #fff; box-shadow: var(--knvqt-shadow-soft); }

/* Posts */
.latest-section { padding-bottom: 92px; scroll-margin-top: 100px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.content-column .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--knvqt-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--knvqt-shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--knvqt-shadow); }
.post-card-media { min-height: 182px; display: block; overflow: hidden; color: inherit; background: linear-gradient(135deg, #dff5e9, #fff3d5); text-decoration: none; }
.post-card-media img { width: 100%; height: 210px; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-media img { transform: scale(1.035); }
.post-card-placeholder { min-height: 182px; display: grid; place-items: center; align-content: center; gap: 1px; }
.post-card-placeholder b { color: var(--knvqt-green-dark); font-family: Arial, sans-serif; font-size: 2.6rem; letter-spacing: -.06em; }
.post-card-placeholder i { color: var(--knvqt-muted); font-style: normal; font-size: .8rem; font-weight: 800; }
.post-card-body { padding: 21px; display: flex; flex: 1; flex-direction: column; }
.post-card-meta { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--knvqt-muted); font-size: .73rem; }
.post-card-meta a { padding: 3px 8px; border-radius: 999px; background: var(--knvqt-green-soft); font-weight: 800; text-decoration: none; }
.post-card-title { margin-bottom: 9px; font-size: 1.14rem; }
.post-card-title a { color: var(--knvqt-ink); text-decoration: none; }
.post-card-excerpt { color: var(--knvqt-muted); font-size: .88rem; }
.post-card-excerpt p { margin-bottom: 13px; }
.post-card-link { margin-top: auto; font-size: .84rem; font-weight: 900; text-decoration: none; }

/* Content */
.breadcrumb { margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 7px; color: var(--knvqt-muted); font-size: .8rem; }
.breadcrumb a { font-weight: 800; text-decoration: none; }
.archive-header { margin-bottom: 28px; padding: clamp(24px, 4vw, 40px); border: 1px solid rgba(32,169,107,.18); border-radius: 24px; background: linear-gradient(135deg, #f4fcf7, #fff9e9); }
.archive-header h1 { margin-bottom: 8px; font-size: clamp(2rem, 5vw, 3.1rem); }
.archive-header p, .archive-description { margin-bottom: 0; color: var(--knvqt-muted); }
.entry-card, .comments-area, .no-results, .not-found-page {
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--knvqt-line);
  border-radius: var(--knvqt-radius);
  background: #fff;
  box-shadow: var(--knvqt-shadow-soft);
}
.entry-title { font-size: clamp(2rem, 5vw, 3.35rem); }
.entry-meta { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 14px; color: var(--knvqt-muted); font-size: .78rem; }
.entry-thumbnail { margin: 24px 0; overflow: hidden; border-radius: 19px; }
.entry-thumbnail img { width: 100%; }
.entry-content { overflow-wrap: anywhere; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.7em; }
.entry-content a { font-weight: 700; }
.entry-content .alignwide { width: min(1080px, calc(100vw - 36px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-footer { margin-top: 32px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--knvqt-line); font-size: .82rem; }
.tag-links a { padding: 5px 9px; display: inline-block; border-radius: 999px; background: var(--knvqt-green-soft); text-decoration: none; }
.quiz-page-shell { width: min(980px, calc(100% - 36px)); }
.quiz-page-header { margin-bottom: 22px; text-align: center; }
.quiz-page-entry .entry-content > .kngvq-app { margin-inline: auto; }

/* Sidebar and widgets */
.sidebar { display: grid; gap: 18px; }
.widget { padding: 20px; border: 1px solid var(--knvqt-line); border-radius: 19px; background: #fff; box-shadow: var(--knvqt-shadow-soft); }
.widget-title { margin-bottom: 13px; font-size: 1.05rem; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--knvqt-line); font-size: .87rem; }
.widget li:last-child { border-bottom: 0; }
.widget a { text-decoration: none; }
.search-form { display: flex; gap: 8px; }
.search-form label { min-width: 0; flex: 1; }
.search-field, input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%; min-height: 48px; padding: 9px 13px; border: 2px solid var(--knvqt-line); border-radius: 13px; color: var(--knvqt-ink); background: #fff; outline: 0;
}
.search-field:focus, input:focus, textarea:focus { border-color: var(--knvqt-green); box-shadow: 0 0 0 4px rgba(32,169,107,.09); }
.search-submit, input[type="submit"] { min-height: 48px; padding: 9px 16px; border: 0; border-radius: 13px; color: #fff; background: var(--knvqt-green); cursor: pointer; font-weight: 850; }

/* Navigation, comments and empty states */
.pagination { margin-top: 30px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { min-width: 42px; min-height: 42px; padding: 7px 11px; display: grid; place-items: center; border: 1px solid var(--knvqt-line); border-radius: 12px; background: #fff; text-decoration: none; }
.page-numbers.current { color: #fff; border-color: var(--knvqt-green); background: var(--knvqt-green); }
.post-navigation { margin: 22px 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; }
.post-navigation a { min-height: 84px; padding: 15px; display: flex; flex-direction: column; border: 1px solid var(--knvqt-line); border-radius: 16px; background: #fff; font-weight: 800; text-decoration: none; }
.post-navigation .nav-next { text-align: right; }
.post-navigation span { color: var(--knvqt-muted); font-size: .72rem; font-weight: 600; }
.comments-area { margin-top: 22px; }
.comment-list { padding: 0; list-style: none; }
.comment-body { margin: 16px 0; padding: 17px; border: 1px solid var(--knvqt-line); border-radius: 15px; }
.comment-meta { font-size: .8rem; }
.comment-content { margin-top: 10px; }
.comment-respond { margin-top: 28px; }
.no-results { text-align: center; }
.no-results > span { width: 75px; height: 75px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 22px; color: var(--knvqt-green-dark); background: var(--knvqt-green-soft); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 900; transform: rotate(-4deg); }
.not-found-page { text-align: center; }
.not-found-code { display: block; color: rgba(32,169,107,.15); font-family: Arial, sans-serif; font-size: clamp(5rem, 20vw, 11rem); font-weight: 900; letter-spacing: -.08em; line-height: .9; }
.not-found-page .search-form { max-width: 520px; margin: 24px auto; }

/* Footer */
.site-footer { color: rgba(255,255,255,.84); background: #0e5335; }
.footer-inner { width: min(var(--knvqt-wrap), calc(100% - 36px)); margin: auto; padding: 52px 0 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { color: #fff; font-size: 1.2rem; }
.footer-brand p { margin: 2px 0 0; font-size: .82rem; }
.footer-mark { width: 44px; height: 44px; flex-basis: 44px; }
.footer-widgets { margin: 35px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.footer-widget-title { color: #fff; font-size: 1rem; }
.footer-widget ul { margin: 0; padding: 0; list-style: none; }
.footer-widget a, .footer-menu a { color: rgba(255,255,255,.82); text-decoration: none; }
.footer-menu { margin-top: 30px; flex-wrap: wrap; gap: 18px; }
.site-info { margin-top: 25px; padding-top: 20px; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(255,255,255,.13); font-size: .75rem; }

/* WordPress alignment helpers */
.alignleft { float: left; margin: .5em 1.5em 1em 0; }
.alignright { float: right; margin: .5em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { color: var(--knvqt-muted); font-size: .78rem; }
.sticky { position: relative; }
.bypostauthor { outline: 2px solid rgba(32,169,107,.22); }

@media (max-width: 1040px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) 360px; gap: 25px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; }
  .header-quiz-button { display: none; }
}

@media (max-width: 920px) {
  body.admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 70px; }
  .menu-toggle {
    width: 45px; height: 45px;
    margin-left: auto;
    display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 13px;
    color: #fff; background: rgba(255,255,255,.1);
    cursor: pointer;
  }
  .menu-toggle-icon { width: 20px; display: grid; gap: 4px; }
  .menu-toggle-icon i { height: 2px; display: block; border-radius: 2px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
  .menu-is-open .menu-toggle-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-is-open .menu-toggle-icon i:nth-child(2) { opacity: 0; }
  .menu-is-open .menu-toggle-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .main-navigation { position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: none; background: #11794b; box-shadow: 0 14px 28px rgba(10,80,49,.22); }
  .menu-is-open .main-navigation { display: block; }
  .primary-menu { width: min(var(--knvqt-wrap), calc(100% - 36px)); margin: auto; padding: 13px 0 18px; display: block; }
  .primary-menu a { padding: 11px 12px; }
  .home-hero { min-height: auto; padding-bottom: 30px; grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy h1, .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-word-stack { width: min(520px, 100%); min-height: 310px; margin: 0 auto; }
  .hero-word-card { min-height: 115px; }
  .word-card-one { top: 70px; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-description { display: none; }
  .site-branding { min-width: 0; }
  .home-hero { width: min(100% - 24px, var(--knvqt-wrap)); margin-top: 12px; padding: 32px 22px 25px; border-radius: 27px; }
  .hero-copy h1 { font-size: clamp(2.35rem, 12vw, 3.3rem); }
  .hero-word-stack { min-height: 260px; }
  .hero-word-card { width: 68%; min-height: 100px; padding: 17px; border-radius: 19px; }
  .word-card-one { top: 62px; left: 4%; }
  .word-card-two { right: 1%; }
  .word-card-three { right: 3%; }
  .hero-check { width: 48px; height: 48px; right: 9%; border-width: 5px; }
  .feature-strip { margin-bottom: 62px; grid-template-columns: 1fr; }
  .feature-strip article + article { border-top: 1px solid var(--knvqt-line); border-left: 0; }
  .home-quiz-section { padding-bottom: 68px; }
  .quiz-stage { padding: 7px; border-radius: 24px; }
  .post-grid, .content-column .post-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; }
  .sidebar, .footer-widgets { grid-template-columns: 1fr; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .site-info { flex-direction: column; }
}

@media (max-width: 480px) {
  .header-inner, .content-shell, .latest-section, .front-page-content, .footer-inner { width: calc(100% - 24px); }
  .brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .site-title { font-size: 1rem; }
  .hero-actions { display: grid; }
  .hero-stats { gap: 17px; }
  .hero-stats strong { font-size: 1.15rem; }
  .hero-stats span { font-size: .7rem; }
  .hero-word-stack { min-height: 225px; }
  .hero-word-card { min-height: 88px; }
  .hero-word-card span { font-size: 1.55rem; }
  .word-card-one { top: 52px; }
  .section-heading { display: block; }
  .section-heading .text-link { display: inline-block; margin-top: 10px; }
  .search-form { display: grid; }
}

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

@media print {
  .site-header, .site-footer, .sidebar, .post-navigation, .comments-area, .hero-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .content-layout { display: block; }
  .entry-card { padding: 0; border: 0; box-shadow: none; }
}

/* Home app shell --------------------------------------------------------- */
body.app-home-body {
  min-width: 320px;
  overflow: hidden;
  background: #f7f3e8;
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 193, 73, .14), transparent 25rem),
    #f7f3e8;
}

body.admin-bar.app-home-body .app-shell {
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
}

.app-topbar {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
  color: #fff;
  background: linear-gradient(135deg, #18a963 0%, #0d8f53 100%);
  box-shadow: 0 5px 18px rgba(5, 86, 49, .2);
}

.app-topbar-inner {
  width: min(680px, calc(100% - 24px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
}

.app-brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  color: #0b8750;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 75, 42, .2);
  font-size: 1.18rem;
  font-weight: 900;
}

.app-brand-mark img,
.app-brand-mark .custom-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-brand-copy {
  min-width: 0;
  line-height: 1.15;
}

.app-brand-title {
  display: block;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-brand-subtitle {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .78);
  font-size: .72rem;
}

.app-level-badge {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .13);
  font-size: .78rem;
  font-weight: 800;
}

.app-main {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.app-scroll-area {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.app-screen {
  width: min(680px, calc(100% - 24px));
  min-height: 100%;
  margin: 0 auto;
  padding: 16px 0 calc(18px + env(safe-area-inset-bottom, 0px));
}

.app-context {
  margin: 0 3px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-context-copy span {
  display: block;
  margin-bottom: 2px;
  color: #827b6f;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .04em;
}

.app-context-copy h1 {
  margin: 0;
  color: #282c29;
  font-size: clamp(1.04rem, 4vw, 1.3rem);
  line-height: 1.25;
}

.app-context-stats {
  display: flex;
  gap: 6px;
}

.app-stat-chip {
  min-width: 47px;
  padding: 6px 8px;
  border: 1px solid rgba(17, 134, 79, .16);
  border-radius: 11px;
  color: #137b4d;
  background: rgba(255, 255, 255, .75);
  box-shadow: 0 3px 10px rgba(45, 54, 48, .05);
  text-align: center;
  font-size: .7rem;
  font-weight: 850;
  white-space: nowrap;
}

.app-quiz-stage .kngvq-app {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.app-home-body .app-quiz-stage .kngvq-start-card,
body.app-home-body .app-quiz-stage .kngvq-result-card {
  padding: clamp(18px, 5vw, 28px);
  border-radius: 24px;
}

body.app-home-body .app-quiz-stage .kngvq-quiz-card {
  border-radius: 24px;
}

body.app-home-body .app-quiz-stage .kngvq-word-card {
  min-height: 220px;
  padding: 24px 18px;
  border-radius: 22px;
}

body.app-home-body .app-quiz-stage .kngvq-answers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.app-home-body .app-quiz-stage .kngvq-answer {
  min-width: 0;
  min-height: 66px;
  padding: 9px 10px;
  gap: 8px;
  border-radius: 16px;
  line-height: 1.3;
}

body.app-home-body .app-quiz-stage .kngvq-answer-number {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

body.app-home-body .app-quiz-stage .kngvq-answer-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-extra-content,
.app-plugin-notice {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(25, 129, 81, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
}

.app-plugin-notice {
  color: #7a2f2f;
  border-color: rgba(190, 51, 51, .2);
  background: #fff5f3;
}

.app-domain-note {
  margin: 15px 0 0;
  color: #9a9387;
  text-align: center;
  font-size: .65rem;
}

@media (max-width: 782px) {
  body.admin-bar.app-home-body .app-shell {
    height: calc(100vh - 46px);
    height: calc(100dvh - 46px);
  }
}

@media (max-width: 480px) {
  .app-topbar-inner,
  .app-screen {
    width: calc(100% - 20px);
  }

  .app-topbar-inner { min-height: 60px; }
  .app-brand-mark { width: 39px; height: 39px; flex-basis: 39px; border-radius: 13px; }
  .app-brand-subtitle { display: none; }
  .app-screen { padding-top: 12px; }
  .app-context { margin-bottom: 10px; }
  .app-context-copy span { font-size: .65rem; }
  .app-stat-chip { min-width: 43px; padding-inline: 6px; }

  body.app-home-body .app-quiz-stage .kngvq-word-card {
    min-height: 195px;
    padding: 20px 14px;
  }

  body.app-home-body .app-quiz-stage .kngvq-answer {
    min-height: 62px;
    padding: 8px;
    font-size: .92rem;
  }
}

@media (max-width: 360px) {
  .app-context-stats { display: none; }

  body.app-home-body .app-quiz-stage .kngvq-answers {
    grid-template-columns: 1fr;
  }
}

/* Desktop compact quiz -------------------------------------------------- */
@supports selector(html:has(body)) {
  html:has(body.app-home-body) {
    overflow: hidden;
    background: #1d2327;
  }

  body.app-home-body .app-screen:has(.kngvq-screen:nth-child(2):not(.is-hidden)) .app-context,
  body.app-home-body .app-screen:has(.kngvq-screen:nth-child(2):not(.is-hidden)) .app-domain-note {
    display: none;
  }
}

@media (min-width: 783px) {
  .app-topbar-inner,
  .app-screen {
    width: min(860px, calc(100% - 40px));
  }

  .app-topbar-inner { min-height: 58px; }

  .app-brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 13px;
  }

  .app-screen {
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .app-context { margin-bottom: 8px; }
  .app-context-copy span { margin-bottom: 1px; font-size: .66rem; }
  .app-context-copy h1 { font-size: 1.15rem; }

  body.app-home-body .app-quiz-stage .kngvq-start-card,
  body.app-home-body .app-quiz-stage .kngvq-result-card {
    width: min(680px, 100%);
    margin-inline: auto;
  }

  body.app-home-body .app-quiz-stage .kngvq-meta {
    margin-bottom: 7px;
    font-size: .86rem;
  }

  body.app-home-body .app-quiz-stage .kngvq-live-score { padding: 3px 9px; }

  body.app-home-body .app-quiz-stage .kngvq-progress {
    height: 8px;
    margin-bottom: 10px;
  }

  body.app-home-body .app-quiz-stage .kngvq-word-card {
    min-height: 188px;
    padding: 18px;
    border-radius: 22px;
  }

  body.app-home-body .app-quiz-stage .kngvq-word {
    font-size: clamp(2.7rem, 5vw, 3.75rem);
  }

  body.app-home-body .app-quiz-stage .kngvq-feedback-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    font-size: 1.35rem;
  }

  body.app-home-body .app-quiz-stage .kngvq-feedback-label {
    min-height: 22px;
    font-size: 1rem;
  }

  body.app-home-body .app-quiz-stage .kngvq-translation {
    min-height: 27px;
    margin-top: 5px;
    font-size: 1.12rem;
  }

  body.app-home-body .app-quiz-stage .kngvq-prompt {
    margin: 10px 0 7px;
    font-size: .84rem;
  }

  body.app-home-body .app-quiz-stage .kngvq-answers {
    gap: 8px 10px;
  }

  body.app-home-body .app-quiz-stage .kngvq-answer {
    min-height: 58px;
    padding: 7px 11px;
    border-radius: 15px;
    box-shadow: 0 4px 0 #e9e4d7;
  }

  body.app-home-body .app-quiz-stage .kngvq-answer-number {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
  }

  .app-domain-note { margin-top: 9px; }
}

@media (min-width: 783px) and (max-height: 720px) {
  .app-topbar-inner { min-height: 52px; }
  .app-brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .app-brand-subtitle { display: none; }
  .app-screen { padding-top: 7px; }
  .app-context { margin-bottom: 5px; }

  body.app-home-body .app-quiz-stage .kngvq-word-card {
    min-height: 155px;
    padding: 12px;
  }

  body.app-home-body .app-quiz-stage .kngvq-prompt { margin-top: 7px; }
  body.app-home-body .app-quiz-stage .kngvq-answer { min-height: 52px; }
}
