:root{
  --bg:#0b1020;
  --card:#111a33;
  --card2:#0f1730;
  --text:#e9eefc;
  --muted:#aab6da;
  --border:#22305d;
  --accent:#4cc9f0;
  --ok:#42f59b;
  --bad:#ff4d6d;
  --warn:#ffd166;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color:var(--text);
  position: relative;
  min-height: 100vh;
}

/* gradient fix pe viewport */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;

  background: radial-gradient(
    1200px 700px at 20% 0%,
    #182552 0%,
    var(--bg) 50%,
    #070b16 100%
  );

  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all .15s ease;
}

a:hover {
  color: #7ddfff;
  text-decoration: underline;
}

a:active {
  opacity: 0.8;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell{max-width:1100px;margin:0 auto;padding:18px}
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;margin-bottom:14px;
  border:1px solid var(--border);
  background:rgba(17,26,51,.65);
  border-radius:14px;
  backdrop-filter: blur(10px);
}
.brand{font-weight:800;letter-spacing:.3px}
.link{color:var(--text);text-decoration:none}
.badge{font-size:12px;color:var(--muted);border:1px solid var(--border);padding:4px 8px;border-radius:999px}

.nav{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.nav a{
  font-size:13px;color:var(--muted);text-decoration:none;
  border:1px solid var(--border);
  padding:6px 10px;border-radius:999px;
  background:rgba(9,13,27,.25);
}
.nav a.active{color:#fff;border-color:rgba(76,201,240,.55);background:rgba(76,201,240,.10)}
.nav a:hover{color:#fff}

.topbar-right{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pill{
  font-size:13px;color:var(--muted);
  border:1px solid var(--border);
  padding:6px 10px;border-radius:999px;
}
.pill.danger{color:#fff;border-color:#3a2a2f;background:rgba(255,77,109,.12)}

.card{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(17,26,51,.92), rgba(15,23,48,.92));
  border-radius:18px;
  padding:18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

h1{margin:0 0 10px;font-size:24px}
h2{margin:14px 0 10px;font-size:18px}
.muted{color:var(--muted)}
code{background:rgba(76,201,240,.08);border:1px solid rgba(76,201,240,.18);padding:2px 6px;border-radius:8px}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.panel{
  border:1px solid var(--border);
  background:rgba(9,13,27,.35);
  border-radius:14px;padding:14px;
}

.field{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.field input,.field select{
  background:#0a0f22;color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;padding:10px 12px;
  min-width: 0;
}
.checkbox{display:flex;gap:10px;align-items:center;margin:10px 0;color:var(--muted)}
.checkbox input{transform: translateY(1px);}

.btn{
  border:1px solid var(--border);
  background:rgba(9,13,27,.35);
  color:var(--text);
  padding:10px 12px;border-radius:12px;
  cursor:pointer;
}
.btn:hover{
  filter: brightness(1.15);
}

.btn.primary{border-color:rgba(76,201,240,.55);background:rgba(76,201,240,.12)}
.btn.danger{border-color:rgba(255,77,109,.55);background:rgba(255,77,109,.10)}

.btn.success{
  border-color: rgba(66,245,155,.55);
  background: rgba(66,245,155,.12);
}

.btn.warn{
  border-color: rgba(255,209,102,.55);
  background: rgba(255,209,102,.12);
}

.btn.orange{
  border-color: rgba(255,140,0,.55);
  background: rgba(255,140,0,.12);
}

.btn.purple{
  border-color: rgba(170,120,255,.55);
  background: rgba(170,120,255,.12);
}

.btn.cyan{
  border-color: rgba(0,200,255,.55);
  background: rgba(0,200,255,.12);
}

.btn.teal{
  border-color: rgba(0,200,170,.55);
  background: rgba(0,200,170,.12);
}

.btn.pink{
  border-color: rgba(255,90,180,.55);
  background: rgba(255,90,180,.12);
}

.btn.wrong{
  padding: 1px 15px;
  border-radius: 0;
  font-weight: bold;
  width: auto;
}

.btn.small{padding:6px 10px;border-radius:10px;font-size:12px}
.btn:active{transform:translateY(1px)}
.list{margin:0;padding-left:18px;color:var(--muted)}
.hint{margin-top:10px;color:var(--muted);border-left:3px solid rgba(76,201,240,.55);padding-left:10px;margin-bottom: 10px;}

.quiz-layout {
  display:grid;
  grid-template-columns:280px 1fr;
  gap:14px
}

/* Mobile / tablet */
@media (max-width: 768px) {
    .quiz-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2; /* moves below */
    }

    .question {
        order: 1;
    }
}

.sidebar{
  border:1px solid var(--border);
  background:rgba(9,13,27,.35);
  border-radius:14px;padding:12px;
  position:sticky;top:14px;height:fit-content;
}
.sidebar-title{font-weight:700;margin-bottom:10px;color:var(--muted)}
.nav-grid{display:grid;grid-template-columns:repeat(6, 1fr);gap:8px}
.nav-item{
  padding:8px 0;border-radius:10px;
  border:1px solid var(--border);
  background:rgba(17,26,51,.55);
  color:var(--muted);
  cursor:pointer;
  text-align:center;
  font-size:12px;
}
.nav-item.answered{color:var(--text);border-color:rgba(76,201,240,.35)}
.nav-item.current{outline:2px solid rgba(76,201,240,.55);color:#fff}
.nav-item.wrong{border-color:rgba(255,77,109,.55);color:#fff}
.nav-item.correct{border-color:rgba(66,245,155,.45);color:#fff}

.sidebar-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}

.question{
  border:1px solid var(--border);
  background:rgba(9,13,27,.25);
  border-radius:14px;padding:14px;
}
.q-meta{display:flex;gap:10px;align-items:center;margin-bottom:10px;flex-wrap:wrap}
.tag{font-size:12px;border:1px solid rgba(76,201,240,.35);background:rgba(76,201,240,.10);padding:4px 8px;border-radius:999px}
.tag.primary {background: rgba(33,150,243,0.12);color: #2196f3;font-weight: 600;}
.q-title{font-size:20px;margin:0 0 10px; text-align: center;}
.choices{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.choice{
  display:flex;gap:10px;align-items:flex-start;
  border:1px solid var(--border);
  background:rgba(17,26,51,.55);
  border-radius:14px;padding:12px;
}
.choice input{margin-top:2px}
.choice.correct{border-color:rgba(66,245,155,.55);background:rgba(66,245,155,.10)}
.choice.incorrect{border-color:rgba(255,77,109,.55);background:rgba(255,77,109,.10)}
.q-footer{margin-top:10px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.sep{border:0;border-top:1px solid var(--border);margin:16px 0}

/* Chapter grid */
.chapter-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.chapter-card{
  border:1px solid var(--border);
  background:rgba(9,13,27,.35);
  border-radius:16px;padding:14px;
  cursor:pointer;
  min-height:132px;
  display:flex;flex-direction:column;justify-content:space-between;
}
.chapter-card:hover{background:rgba(9,13,27,.48)}
.chapter-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.chapter-name{
  font-weight:800;
  font-size: smaller;
  line-height: 1.2;
  min-height:2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chapter-metrics{color:var(--muted);font-size:12px;width: max-content;}
.progressbar{height:10px;border-radius:999px;background:rgba(170,182,218,.12);border:1px solid rgba(170,182,218,.18);overflow:hidden}
.progressbar>div{height:100%;background:rgba(76,201,240,.55);width:0%}
.chapter-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.kpi{font-size:12px;color:var(--muted)}
.small{font-size:12px}

/* Results */
.results{display:flex;gap:14px;align-items:stretch;flex-wrap:wrap}
.scorebox{flex:1;min-width:220px;border:1px solid var(--border);border-radius:14px;padding:14px;background:rgba(9,13,27,.35);}
.score{font-size:34px;font-weight:900}
.summary{
  flex:2;min-width:260px;
  border:1px solid var(--border);border-radius:14px;padding:14px;background:rgba(9,13,27,.35);
  display:grid;grid-template-columns:1fr 1fr;gap:10px;color:var(--muted)
}
.review{display:flex;flex-direction:column;gap:10px}
.review-item{border:1px solid var(--border);border-radius:14px;padding:12px;background:rgba(9,13,27,.35);}
.review-item .row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

.badge {
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.result {
  padding: 10px;
  border-radius: 6px;
  font-size: 16px;
}

.badge-ok{color:var(--ok)}
.badge-bad{color:var(--bad)}
.badge-warn{color:var(--warn)}
.badge-accent{color:var(--accent)}
.badge-text{color:var(--text)}

.badge-blue{
  background: rgba(0,200,255,0.15);
  color:#4dd0ff;
}

.badge-green{
  background: rgba(0,220,130,0.15);
  color:#4dffb8;
}

.badge-yellow{
  background: rgba(255,210,0,0.15);
  color:#ffd84d;
}

.badge-orange{
  background: rgba(255,120,0,0.15);
  color:#ff944d;
}

.badge-red{
  background: rgba(255,0,0,0.15);
  color:#ff5c5c;
}

.badge-purple{
  background: rgba(170,120,255,0.15);
  color:#c49dff;
}

.badge-purple-white{
  background: rgba(170,120,255,0.15);
  color:#e9eefc;
}

/* @media (max-width: 1000px){
  .chapter-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width: 900px){
  .grid2{grid-template-columns:1fr}
  .quiz-layout{grid-template-columns:1fr}
  .sidebar{position:static}
  .nav-grid{grid-template-columns:repeat(8,1fr)}
} */

/* ===== Report Page ===== */

.page-title {
  text-align:center;
  margin-bottom:30px;
}

.stats-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:20px;
  margin-bottom:35px;
}

.stat-box {
  background: var(--card-bg);
  border-radius:14px;
  padding:25px 20px;
  text-align:center;
  border:1px solid rgba(255,255,255,0.05);
}

.stat-value {
  font-size:30px;
  font-weight:700;
}

.stat-label {
  margin-top:6px;
  opacity:.7;
}

/* .success { color:#4caf50; }
.danger  { color:#e53935; }
.info    { color:#2196f3; } */

.section-title {
  font-size:18px;
  font-weight:600;
  margin-bottom:15px;
}

.stack > .card {
  margin-bottom:15px;
}

.question-image {
  margin: 16px 0;
  text-align: center;
}

.question-image img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ===== ARTICLES CLEAN VERSION ===== */

.article-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.article-image {
  height: 130px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-card h3 {
  font-size: 18px;
  margin: 0;
}

.article-card p {
  font-size: 14px;
  line-height: 1.5;
}

.article-actions {
  margin-top: auto;
}

/* ===== PENALTY PAGE ===== */

.penalty-section {
  margin-top: 30px;
}

.penalty-section h3 {
  margin-bottom: 15px;
}

.penalty-section h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #9fb4ff;
}

.penalty-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.03);
}

.penalty-text {
  flex: 1;
  font-size: 14px;
}

.penalty-points {
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.penalty-points.minor {
  background: rgba(0, 200, 255, 0.15);
  color: #4dd0ff;
}

.penalty-points.medium {
  background: rgba(255, 180, 0, 0.15);
  color: #ffb84d;
}

.penalty-points.high {
  background: rgba(255, 120, 0, 0.15);
  color: #ff944d;
}

.penalty-points.critical {
  background: rgba(255, 0, 0, 0.15);
  color: #ff5c5c;
}

.danger-zone {
  border-top: 1px solid rgba(255,0,0,0.3);
  padding-top: 20px;
}

/* ===== HOME ===== */

.home-hero{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 22px;
}

.home-hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.home-hero__badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.home-hero__right{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}

.home-stat{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
}

.home-stat__num{
  font-size: 18px;
  font-weight: 700;
}

.home-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 0 6px;
}

.home-feature{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px;
}

.home-feature h4{
  margin: 0 0 10px;
}

.home-feature ul{
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.home-steps{
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.home-step{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px;
}

/* Responsive */
@media (max-width: 900px){
  .home-hero{
    grid-template-columns: 1fr;
  }
  .home-hero__right{
    grid-template-columns: 1fr 1fr;
  }
  .home-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px){
  .home-hero__right{
    grid-template-columns: 1fr;
  }
}

/* ===== CONTACT ===== */

.contact-card{
  padding: 22px;
}

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
  margin-top: 12px;
}

.contact-panel{
  padding: 18px;
}

.field{
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.input{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  padding: 12px 12px;
  outline: none;
}

.input:focus{
  border-color: rgba(120,160,255,0.6);
  box-shadow: 0 0 0 3px rgba(120,160,255,0.15);
}

.textarea{
  resize: vertical;
  min-height: 130px;
}

.contact-lines{
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.contact-line{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.contact-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 900px){
  .contact-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== FOOTER ===== */

.site-footer{
  margin-top: auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.25);
}

.footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link{
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-link:hover{
  opacity: 1;
}

/* ===== BUILDER ===== */

.builder-grid{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap:14px;
  margin-top: 12px;
}

.builder-panel{
  padding: 18px;
}

.builder-choices{
  margin-top: 14px;
}

.choice-row{
  display:grid;
  grid-template-columns: 44px 1fr auto;
  gap:10px;
  align-items:center;
  margin-bottom: 10px;
}

.check{
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.builder-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 14px;
}

.builder-list{
  margin-top: 12px;
  display:grid;
  gap: 12px;

  max-height: 1300px;
  overflow-y: auto;
  padding-right: 6px;
}

.builder-item{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px;
}

.builder-item__top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.builder-item__actions{
  display:flex;
  gap:10px;
  margin-top: 12px;
}

@media (max-width: 900px){
  .builder-grid{
    grid-template-columns: 1fr;
  }
}

.builder-list::-webkit-scrollbar{
  width:8px;
}

.builder-list::-webkit-scrollbar-track{
  background:transparent;
}

.builder-list::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.15);
  border-radius:10px;
}

.builder-list::-webkit-scrollbar-thumb:hover{
  background:rgba(255,255,255,0.25);
}

/* ===== Image Upload Builder ===== */

.image-upload{
  border:2px dashed rgba(255,255,255,0.15);
  border-radius:14px;
  padding:20px;
  text-align:center;
  cursor:pointer;
  transition:all .2s ease;
  margin-bottom:10px;
}

.image-upload:hover{
  background:rgba(255,255,255,0.03);
  border-color:rgba(255,255,255,0.25);
}

.image-upload.dragover{
  background:rgba(76,201,240,0.08);
  border-color:rgba(76,201,240,0.6);
}

.image-preview{
  margin-top:12px;
  text-align:center;
}

.image-preview img{
  max-width:100%;
  max-height:220px;
  border-radius:12px;
  object-fit:contain;
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
}

/* JSON Upload */

.json-upload{
  border:2px dashed rgba(255,255,255,0.15);
  border-radius:14px;
  padding:18px;
  text-align:center;
  cursor:pointer;
  transition:all .2s ease;
}

.json-upload:hover{
  background:rgba(255,255,255,0.03);
}

.json-upload.dragover{
  background:rgba(76,201,240,0.08);
  border-color:rgba(76,201,240,0.6);
}

/* ============================= */
/* Button-style ONLY for checkbox */
/* ============================= */

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 14px 16px;
  border-radius: 14px;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);

  cursor: pointer;
  transition: all .15s ease;
}

/* Hide native checkbox only */
.choice input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Add letter badge only if checkbox */
.choice:has(input[type="checkbox"])::before {
  content: attr(data-letter);
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  border-radius: 10px;
  font-weight: 700;

  background: rgba(255,255,255,0.08);
  color: var(--text);
  flex-shrink: 0;
  transition: all .15s ease;
}

/* Hover effect only for checkbox mode */
/* .choice:has(input[type="checkbox"]):hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
} */

.choice:has(input[type="checkbox"]:not(:disabled)):hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
}

.choice:has(input:disabled)::before {
  background: rgba(255,255,255,0.05);
}

/* Selected checkbox style */
/* .choice:has(input[type="checkbox"]:checked) {
  background: rgba(76,201,240,0.12);
  border-color: rgba(76,201,240,0.5);
} */

.choice:has(input[type="checkbox"]:checked)::before {
  background: rgba(76,201,240,0.8);
  color: #000;
}

/* ===== Mobile fixes: exam start page ===== */
@media (max-width: 900px){
  .grid2{
    grid-template-columns: 1fr;
  }

  .topbar{
    align-items: flex-start;
  }

  .topbar > div:first-child{
    width: 100%;
  }

  .nav{
    width: 100%;
  }
}

@media (max-width: 600px){
  .shell{
    padding: 12px;
  }

  .card{
    padding: 14px;
  }

  h1{
    font-size: 22px;
  }

  h2{
    font-size: 17px;
  }

  .btn{
    width: 100%;
  }

  .topbar{
    padding: 10px 12px;
  }

  .badge{
    font-size: 11px;
    padding: 3px 7px;
  }

  .nav a{
    font-size: 12px;
    padding: 6px 8px;
  }

  .pill{
    font-size: 12px;
    padding: 5px 8px;
  }
}

/* ===== Mobile fixes: quiz page ===== */
@media (max-width: 900px){
  .quiz-layout{
    grid-template-columns: 1fr;
  }

  .sidebar{
    position: static;
    width: 100%;
  }

  .question{
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 600px){
  .nav-grid{
    grid-template-columns: repeat(4, 1fr);
  }

  .sidebar-actions{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sidebar-actions .btn{
    width: 100%;
  }

  .q-title{
    font-size: 18px;
    line-height: 1.35;
  }

  .choice{
    padding: 12px;
    gap: 10px;
  }

  .choice:has(input[type="checkbox"])::before{
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .q-meta{
    gap: 8px;
  }

  .pill,
  .tag{
    font-size: 12px;
  }
}

/* fix action buttons wong page */

.wrong-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.wrong-actions .btn{
  flex: 1 1 180px;
}

@media (max-width: 600px){
  .wrong-actions{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .wrong-actions .btn{
    width: 100%;
  }
}

/* wrong page layout fix mobile */

.grid2{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.grid2 > *{
  min-width: 0;
}

@media (max-width: 900px){
  .grid2{
    grid-template-columns: 1fr;
  }
}
/* ===== ARTICLE BODY (single post content) ===== */

.article-single-image {
  margin: -18px -18px 20px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  max-height: 340px;
}

.article-single-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body {
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 24px 0 10px;
  color: var(--text);
}

.article-body h2 { font-size: 20px; }
.article-body h3 { font-size: 17px; }
.article-body h4 { font-size: 15px; color: var(--muted); }

.article-body p {
  margin: 0 0 14px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--muted);
}

.article-body li {
  margin-bottom: 6px;
  line-height: 1.55;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
}

.article-body a:hover {
  color: #7ddfff;
}

.article-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid rgba(76,201,240,.55);
  background: rgba(76,201,240,.06);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-style: italic;
}

.article-body img {
  max-width: 100%;
  border-radius: 10px;
  margin: 12px 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.article-body th,
.article-body td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background: rgba(76,201,240,.08);
  font-weight: 600;
}

.article-body code {
  background: rgba(76,201,240,.08);
  border: 1px solid rgba(76,201,240,.18);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}

.article-body pre {
  background: rgba(0,0,0,.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  margin: 14px 0;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ===== Gutenberg alignment classes ===== */

.article-body .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.article-body .alignright {
  float: right;
  margin: 0 0 12px 16px;
}

.article-body .alignleft {
  float: left;
  margin: 0 16px 12px 0;
}

@media (max-width: 600px) {
  .article-body .alignright,
  .article-body .alignleft {
    float: none;
    margin: 12px 0;
  }
}

.article-content h3 {
    font-weight: 800;
    line-height: 1.2;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Contact Form 7 — quiz theme integration ===== */

.wpcf7 .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpcf7 p {
    margin: 0;
}

.wpcf7 label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease;
    box-sizing: border-box;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 textarea:focus {
    border-color: rgba(76, 201, 240, 0.6);
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.1);
}

.wpcf7 textarea {
    resize: vertical;
    min-height: 130px;
}

.wpcf7 input[type="submit"] {
    border: 1px solid rgba(76, 201, 240, .55);
    background: rgba(76, 201, 240, .12);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: filter .15s ease;
    align-self: flex-start;
}

.wpcf7 input[type="submit"]:hover {
    filter: brightness(1.15);
}

.wpcf7 input[type="submit"]:active {
    transform: translateY(1px);
}

/* Validation messages */
.wpcf7 .wpcf7-not-valid-tip {
    color: var(--bad);
    font-size: 12px;
    margin-top: 4px;
}

.wpcf7 .wpcf7-response-output {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid var(--border);
}

.wpcf7 .wpcf7-mail-sent-ok {
    background: rgba(66, 245, 155, 0.08);
    border-color: rgba(66, 245, 155, 0.3);
    color: var(--ok);
}

.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-aborted {
    background: rgba(255, 77, 109, 0.08);
    border-color: rgba(255, 77, 109, 0.3);
    color: var(--bad);
}

.wpcf7 .wpcf7-spam-blocked {
    background: rgba(255, 209, 102, 0.08);
    border-color: rgba(255, 209, 102, 0.3);
    color: var(--warn);
}

.wpcf7 .wpcf7-not-valid {
    border-color: rgba(255, 77, 109, 0.5) !important;
}