/* ══════════════════════════════════════════════
   ARTICLE STYLES
══════════════════════════════════════════════ */
:root {
  --green-deep:  #1a3a2a;
  --green-mid:   #2d6a4f;
  --green-light: #52b788;
  --gold:        #c9a84c;
  --gold-light:  #f0d080;
  --cream:       #fdf6ec;
  --sand:        #f4e8d0;
  --text-dark:   #1c1c1c;
  --text-mid:    #3d3d3d;
  --text-soft:   #6b6b6b;
  --white:       #ffffff;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
.qeb-body {
  font-family: 'Nunito', sans-serif;
  background-color: #fdf6ec;
  color: var(--text-dark);
  line-height: 1.75;
  font-size: 17px;
}

/* HERO */
.qeb-hero {
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green-mid) 60%, #3a8a65 100%);
  color: var(--white);
  padding: 64px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.qeb-hero::before {
  content: "\FDFD";
  font-family: 'Amiri', serif;
  font-size: 4rem;
  opacity: 0.08;
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}
.qeb-hero-badge {
  display: inline-block;
  background: rgba(201,168,76,.25);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 16px; border-radius: 40px; margin-bottom: 20px;
}
.qeb-hero h1 {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.25;
  max-width: 680px; margin: 0 auto 18px; color: var(--white);
}
.qeb-hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.82);
  max-width: 520px; margin: 0 auto 0; font-weight: 300;
}

/* CALCULATOR SECTION */
.calc-section {
  background: linear-gradient(180deg, #1a3a2a 0%, #edf4f0 130px);
  padding: 0 16px 44px;
}
.calc-label {
  text-align: center;
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  color: var(--white);
  padding: 28px 0 18px;
}
.calc-label span {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  opacity: 0.6; font-weight: 400;
  margin-top: 4px;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* LAYOUT */
.qeb-container { max-width: 780px; margin: 0 auto; padding: 0 22px; }
.section { padding: 52px 0 16px; }

h2 {
  font-family: 'Amiri', serif;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--green-deep); margin-bottom: 14px; line-height: 1.3;
}
h2 .emoji { margin-right: 8px; }
h3 {
  font-family: 'Nunito', sans-serif; font-size: 1.1rem; font-weight: 700;
  color: var(--green-mid); margin: 28px 0 8px;
}
p { margin-bottom: 14px; color: var(--text-mid); }
.qeb-footer { margin-bottom: 14px; color: #fff; }
strong { color: var(--text-dark); font-weight: 700; }
.divider { border: none; border-top: 2px solid var(--sand); margin: 40px 0 0; }

.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
@media (max-width: 540px) { .rules-grid { grid-template-columns: 1fr; } }
.rule-card {
  background: var(--white); border-left: 4px solid var(--green-light);
  border-radius: 10px; padding: 18px 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.rule-card .rule-num {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--green-light); margin-bottom: 4px;
}
.rule-card .rule-title { font-weight: 700; color: var(--green-deep); font-size: 1.05rem; margin-bottom: 6px; }
.rule-card p { font-size: 0.93rem; margin-bottom: 0; }

.highlight-box {
  background: linear-gradient(135deg, #eaf7f0 0%, #f5fdf8 100%);
  border: 1.5px solid #a8dfc0; border-radius: 14px; padding: 24px 28px; margin: 24px 0;
}
.highlight-box p { margin-bottom: 0; }

.gold-box {
  background: linear-gradient(135deg, #fdf4dc 0%, #fffbf0 100%);
  border: 1.5px solid var(--gold); border-radius: 14px; padding: 24px 28px; margin: 24px 0;
}
.gold-box .box-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #a07830; margin-bottom: 8px;
}
.gold-box p { margin-bottom: 0; }

.styled-list { list-style: none; padding: 0; margin: 16px 0 20px; }
.styled-list li {
  position: relative; padding-left: 28px; margin-bottom: 10px;
  color: var(--text-mid); font-size: 0.97rem;
}
.styled-list li::before {
  content: "\2714"; position: absolute; left: 0;
  color: var(--green-light); font-size: 0.85rem; top: 3px;
}

.faq-section { padding: 52px 0 24px; }
.faq-section h2 { margin-bottom: 24px; }
.faq-item {
  background: var(--white); border-radius: 12px;
  margin-bottom: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); overflow: hidden;
}
.faq-q {
  width: 100%; background: none; border: none; padding: 18px 22px; text-align: left;
  font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700;
  color: var(--green-deep); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q .arrow { font-size: 1.2rem; transition: transform 0.25s; flex-shrink: 0; color: var(--green-light); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
  padding: 0 22px; font-size: 0.96rem; color: var(--text-mid);
}
.faq-item.open .faq-a { max-height: 320px; padding: 0 22px 18px; }

/* ══════════════════════════════════════════════
   QEB CALCULATOR STYLES (namespaced to .qeb-wrap)
══════════════════════════════════════════════ */
.qeb-wrap {
  max-width: 480px; margin: 0 auto;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 13px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; color: #0a1a0f;
}
.qeb-wrap * { box-sizing: border-box; }

.qeb-banner {
  background: linear-gradient(135deg,#004d26 0%,#006633 65%,#008040 100%);
  border-radius: 5px 5px 0 0; padding: 10px 14px 9px;
  display: flex; align-items: center; gap: 10px;
  overflow: hidden; position: relative;
}
.qeb-banner::after {
  content:''; position:absolute; right:-14px; top:-14px;
  width:70px; height:70px; border-radius:50%;
  background:rgba(255,255,255,.07);
}
.qeb-banner-icon { font-size:26px; line-height:1; flex-shrink:0; }
.qeb-banner-title {
  font-family:'Playfair Display',Georgia,serif;
  font-size:17px; font-weight:700; color:#fff;
  letter-spacing:.02em; line-height:1.15;
}
.qeb-banner-sub { font-size:9px; color:rgba(255,255,255,.55); letter-spacing:.12em; text-transform:uppercase; margin-top:2px; }

.qeb-alert {
  display:flex; align-items:center; gap:7px;
  padding:5px 12px; background:#e0f0e8;
  border-left:3px solid #006633;
  font-size:9.5px; color:#2e4a38; letter-spacing:.02em;
}
.qeb-alert.err { background:#fef4e8; border-color:#c87020; color:#c87020; }
.qeb-alert.ok  { background:#e8f5ee; border-color:#008040; color:#004d26; }
.qeb-alert-dot {
  width:7px; height:7px; border-radius:50%;
  background:#006633; flex-shrink:0;
  animation:qeb-blink 1.3s ease-in-out infinite;
}
.qeb-alert.err .qeb-alert-dot { background:#c87020; animation:none; }
.qeb-alert.ok  .qeb-alert-dot { background:#008040; animation:none; }
@keyframes qeb-blink {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.3; transform:scale(.65); }
}

.qeb-ticker {
  background:#004d26; padding:4px 12px;
  display:none; gap:16px; overflow-x:auto; scrollbar-width:none; flex-wrap:nowrap;
}
.qeb-ticker::-webkit-scrollbar { display:none; }
.qeb-ticker-item { font-size:9px; color:rgba(255,255,255,.6); white-space:nowrap; letter-spacing:.05em; display:flex; align-items:center; gap:5px; }
.qeb-ticker-item b { color:#74dba0; font-weight:500; }

.qeb-card {
  background:#ffffff; border:1px solid #b8d9c4; border-top:none;
  padding:11px 13px 13px; border-radius:0 0 5px 5px;
}
.qeb-section-lbl {
  font-size:8.5px; letter-spacing:.15em; text-transform:uppercase;
  color:#006633; font-weight:500; margin-bottom:7px; padding-bottom:4px;
  border-bottom:1px solid #f2faf5;
}
.qeb-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px 10px; margin-bottom:7px; }
.qeb-full { grid-column:1/-1; }
.qeb-lbl { display:block; font-size:9px; letter-spacing:.09em; text-transform:uppercase; color:#2e4a38; margin-bottom:3px; }

.qeb-input, .qeb-select {
  width:100%; padding:7px 9px; border:1px solid #b8d9c4; border-radius:4px;
  background:#f2faf5; color:#0a1a0f;
  font-family:'IBM Plex Mono','Courier New',monospace; font-size:12px; outline:none;
  appearance:none; -webkit-appearance:none;
  transition:border-color .15s,background .15s;
}
.qeb-input:focus,.qeb-select:focus { border-color:#006633; background:#fff; box-shadow:0 0 0 2px rgba(0,102,51,.1); }
.qeb-select {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23006633'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 9px center; padding-right:24px; cursor:pointer;
}
.qeb-input-wrap { position:relative; }
.qeb-input-pfx {
  position:absolute; left:9px; top:50%; transform:translateY(-50%);
  font-size:11px; color:#006633; font-weight:500; pointer-events:none; min-width:22px;
}
.qeb-input-wrap .qeb-input { padding-left:40px; }

.qeb-toggle-row {
  display:flex; align-items:center; gap:9px;
  background:#f2faf5; border:1px solid #b8d9c4; border-radius:4px; padding:6px 9px;
}
.qeb-toggle-copy { flex:1; }
.qeb-toggle-copy strong { display:block; font-size:10px; font-weight:500; color:#0a1a0f; line-height:1.25; }
.qeb-toggle-copy small { font-size:9px; color:#2e4a38; line-height:1.3; }

.qeb-sw { position:relative; width:36px; height:20px; flex-shrink:0; }
.qeb-sw input { position:absolute; opacity:0; width:0; height:0; }
.qeb-sw-track { position:absolute; inset:0; background:#c4d9cc; border-radius:10px; cursor:pointer; transition:background .2s; }
.qeb-sw-track::after {
  content:''; position:absolute; top:3px; left:3px;
  width:14px; height:14px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.22); transition:transform .2s;
}
.qeb-sw input:checked + .qeb-sw-track { background:#006633; }
.qeb-sw input:checked + .qeb-sw-track::after { transform:translateX(16px); }

.qeb-hr { border:none; border-top:1px dashed #b8d9c4; margin:8px 0; }

.qeb-cert { border:2px solid #006633; border-radius:5px; overflow:hidden; position:relative; }
.qeb-cert::before,.qeb-cert::after {
  content:''; position:absolute; width:13px; height:13px;
  border-style:solid; border-color:#c9a84c; z-index:3; pointer-events:none;
}
.qeb-cert::before { top:0; left:0; border-width:2px 0 0 2px; }
.qeb-cert::after  { bottom:0; right:0; border-width:0 2px 2px 0; }

.qeb-cert-hd { background:#004d26; padding:8px 14px 7px; text-align:center; }
.qeb-cert-ornament { font-size:10px; color:#c9a84c; letter-spacing:.35em; line-height:1; margin-bottom:2px; }
.qeb-cert-title { font-family:'Playfair Display',Georgia,serif; font-size:14px; font-weight:700; color:#fff; letter-spacing:.04em; }
.qeb-cert-years { font-size:9px; color:rgba(255,255,255,.5); letter-spacing:.08em; margin-top:2px; }

.qeb-cert-bd { background:linear-gradient(180deg,#f2faf5 0%,#fff 80%); padding:10px 13px 9px; position:relative; }
.qeb-cert-bd::before {
  content:'\263D'; position:absolute; right:10px; top:4px;
  font-size:48px; color:#e6f3eb; line-height:1; pointer-events:none; user-select:none;
}
.qeb-cert-dates { display:flex; flex-wrap:wrap; gap:3px 10px; font-size:9px; color:#2e4a38; margin-bottom:9px; letter-spacing:.03em; }
.qeb-cert-dates span { display:inline-flex; align-items:center; gap:3px; }
.qeb-cert-dates span::before { content:'\B7'; color:#008040; }
.qeb-cert-dates span:first-child::before { content:none; }

.qeb-verdict { border-radius:4px; padding:10px; text-align:center; margin-bottom:9px; transition:all .25s ease; position:relative; overflow:hidden; }
.qeb-verdict::after {
  content:''; position:absolute; inset:0;
  background:repeating-linear-gradient(45deg,transparent,transparent 8px,rgba(255,255,255,.03) 8px,rgba(255,255,255,.03) 16px);
  pointer-events:none;
}
.qeb-v--idle     { background:#f4f8f5; border:1.5px dashed #b8d9c4; }
.qeb-v--eligible { background:linear-gradient(135deg,#004d26 0%,#006633 100%); border:1.5px solid #004d26; box-shadow:0 4px 14px rgba(0,102,51,.25); }
.qeb-v--not      { background:#fff; border:1.5px solid #ccddd4; }
.qeb-v--musafir  { background:linear-gradient(135deg,#7a5500 0%,#b8960a 100%); border:1.5px solid #a07808; box-shadow:0 4px 14px rgba(180,150,10,.3); }

.qeb-v-icon  { font-size:26px; line-height:1; margin-bottom:2px; display:block; }
.qeb-v-main  { font-family:'Playfair Display',Georgia,serif; font-size:20px; font-weight:700; line-height:1.1; display:block; }
.qeb-v-sub   { font-size:9.5px; letter-spacing:.07em; text-transform:uppercase; margin-top:3px; display:block; }

.qeb-v--idle     .qeb-v-main { color:#9ab5a4; }
.qeb-v--idle     .qeb-v-sub  { color:#b0c8ba; }
.qeb-v--eligible .qeb-v-main { color:#fff; }
.qeb-v--eligible .qeb-v-sub  { color:rgba(255,255,255,.72); }
.qeb-v--not      .qeb-v-main { color:#2e4a38; }
.qeb-v--not      .qeb-v-sub  { color:#88a898; }
.qeb-v--musafir  .qeb-v-main { color:#fff; }
.qeb-v--musafir  .qeb-v-sub  { color:rgba(255,255,255,.75); }

.qeb-details { display:grid; grid-template-columns:1fr 1fr; gap:5px; margin-bottom:7px; }
.qeb-dbox { background:#fff; border:1px solid #b8d9c4; border-radius:4px; padding:5px 8px; }
.qeb-dbox-k { font-size:8px; letter-spacing:.1em; text-transform:uppercase; color:#2e4a38; margin-bottom:2px; }
.qeb-dbox-v { font-size:11.5px; font-weight:500; color:#0a1a0f; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qeb-ok  { color:#006633 !important; }
.qeb-bad { color:#b03030 !important; }

.qeb-diff {
  display:none; justify-content:space-between; align-items:center;
  background:#f2faf5; border:1px solid #b8d9c4; border-radius:4px;
  padding:5px 9px; margin-bottom:6px; font-size:9.5px; color:#2e4a38;
}
.qeb-diff-v { font-weight:500; font-size:11px; }

.qeb-cert-ft {
  background:#004d26; padding:5px 12px;
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:2px; font-size:8.5px; color:rgba(255,255,255,.5); letter-spacing:.03em;
}
.qeb-cert-ft strong { color:rgba(255,255,255,.8); }

.qeb-print-bar { text-align:right; margin-top:8px; }
.qeb-print-btn {
  font-family:'IBM Plex Mono','Courier New',monospace;
  font-size:9.5px; letter-spacing:.07em; text-transform:uppercase;
  color:#2e4a38; background:transparent; border:1px solid #b8d9c4;
  border-radius:4px; padding:5px 12px; cursor:pointer; transition:all .15s;
}
.qeb-print-btn:hover { background:#006633; color:#fff; border-color:#006633; }

.qeb-footnote { text-align:center; font-size:8.5px; color:#a8beb2; padding-top:8px; letter-spacing:.04em; line-height:1.7; }
.qeb-footnote a { color:#006633; text-decoration:none; }

@media print {
  .hero,.calc-section,.faq-section,.footer-note { display:none !important; }
  .qeb-card { border:none; padding:0; }
  .qeb-cert-hd,.qeb-v--eligible,.qeb-v--musafir,.qeb-cert-ft {
    -webkit-print-color-adjust:exact; print-color-adjust:exact;
  }
}
