/* MCQsExam newsletter page (newsletter.php). Uses the site's colour variables from app.css. */
.nl-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; margin: 4px 0 24px; padding: 30px 32px;
  border-radius: var(--radius, 14px); color: #fff; background: radial-gradient(1200px 300px at 0% 0%, #22c55e 0%, transparent 60%), linear-gradient(135deg, #14532d, #15803d 55%, #166534);
  box-shadow: 0 24px 60px rgba(20, 83, 45, .22); }
.nl-hero h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; margin: 10px 0 8px; color: #fff; }
.nl-hero .lead { color: #dcfce7; max-width: 620px; }
.nl-eyebrow { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: rgba(253, 224, 71, .16); border: 1px solid rgba(253, 224, 71, .35); color: #fef9c3; }
.nl-benefits { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.nl-benefits li { display: flex; gap: 8px; align-items: flex-start; color: #f0fdf4; font-size: .95rem; }
.nl-benefits .bi { color: #fde68a; margin-top: 2px; }
.nl-hero-card { display: flex; justify-content: center; }
.nl-mock { background: #fff; color: var(--ink, #0f172a); border-radius: 14px; padding: 18px; width: 100%; max-width: 320px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); transform: rotate(1.5deg); }
.nl-mock-q { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--brand, #15803d); padding: 2px 8px; border-radius: 999px; }
.nl-mock-t { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--ink-2, #334155); background: #f1f5f9; padding: 2px 8px; border-radius: 999px; }
.nl-mock p { font-weight: 700; margin: 10px 0; }
.nl-mock-opt { display: block; padding: 7px 10px; margin-top: 6px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; background: #f8fafc; font-size: .9rem; }
.nl-mock-opt.is-right { background: #ecfdf5; border-color: #34d399; color: #047857; font-weight: 700; }

.nl-card { position: relative; }
.nl-fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.nl-legend { font-size: 1rem; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; float: none; width: auto; }
.nl-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand, #15803d); color: #fff; font-size: .8rem; }
.nl-subject-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.nl-hint { margin: -4px 0 12px; color: var(--muted, #586274); font-size: .92rem; }
.nl-search-wrap { position: relative; flex: 1 1 240px; max-width: 380px; }
.nl-search-wrap .bi { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted, #586274); font-size: .85rem; }
.nl-subject-search { padding-left: 32px; border-radius: 999px; height: 36px; }
.nl-clear { color: var(--muted, #586274); text-decoration: none; padding: 0 4px; }
.nl-clear:hover { color: #b91c1c; }
/* "All subjects" switch */
.nl-switch { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; margin: 0; user-select: none; }
.nl-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nl-switch-ui { width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .2s; flex: none; }
.nl-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.nl-switch input:checked + .nl-switch-ui { background: var(--brand-600, #16a34a); }
.nl-switch input:checked + .nl-switch-ui::after { transform: translateX(18px); }
.nl-switch input:focus-visible + .nl-switch-ui { outline: 3px solid rgba(22, 163, 74, .35); outline-offset: 2px; }
/* Live summary */
.nl-summary { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--brand-50, #f0fdf4); color: var(--brand, #15803d); font-size: .9rem; }
.nl-summary.is-error { background: #fef2f2; color: #b91c1c; }
/* Subject cards */
.nl-subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-height: 560px; overflow: auto; padding: 2px 4px 2px 2px; align-items: start; }
.nl-scard { border: 1px solid var(--line, #e2e8f0); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s, background .15s; }
.nl-scard:hover { border-color: #86efac; box-shadow: 0 6px 16px rgba(15, 23, 42, .06); }
.nl-scard.is-on { border-color: var(--brand-600, #16a34a); background: linear-gradient(180deg, #f0fdf4, #fff 70%); box-shadow: 0 4px 14px rgba(22, 163, 74, .12); }
.nl-scard.is-hidden { display: none; }
.nl-scard-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.nl-scard-check { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; margin: 0; }
.nl-scard-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nl-tick { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #94a3b8; background: #fff; display: grid; place-items: center; transition: .15s; }
.nl-scard-check input:checked + .nl-tick { background: var(--brand-600, #16a34a); border-color: var(--brand-600, #16a34a); }
.nl-scard-check input:checked + .nl-tick::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.nl-scard.is-partial .nl-tick { background: #fff; }
.nl-scard.is-partial .nl-tick::after { content: ""; width: 10px; height: 2px; border: 0; background: var(--brand-600, #16a34a); transform: none; }
.nl-scard-check input:focus-visible + .nl-tick { outline: 3px solid rgba(22, 163, 74, .35); outline-offset: 2px; }
.nl-scard-title { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.nl-scard-count { flex: none; font-size: .72rem; font-weight: 700; color: var(--muted, #586274); background: #f1f5f9; border-radius: 999px; padding: 2px 8px; }
.nl-scard.is-on .nl-scard-count { background: #dcfce7; color: var(--brand, #15803d); }
.nl-topics { border-top: 1px dashed var(--line, #e2e8f0); }
.nl-topics > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; font-size: .84rem; font-weight: 600; color: var(--brand, #15803d); }
.nl-topics > summary::-webkit-details-marker { display: none; }
.nl-topics > summary .bi { transition: transform .2s; }
.nl-topics[open] > summary .bi { transform: rotate(180deg); }
.nl-topic-tools { display: flex; gap: 6px; padding: 0 12px 6px; }
.nl-mini { border: 1px solid var(--line, #e2e8f0); background: #fff; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 600; color: var(--ink-2, #334155); }
.nl-mini:hover { border-color: var(--brand-600, #16a34a); color: var(--brand, #15803d); }
.nl-topic-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; max-height: 220px; overflow: auto; }
.nl-topic { position: relative; cursor: pointer; margin: 0; }
.nl-topic input { position: absolute; opacity: 0; pointer-events: none; }
.nl-topic span { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, #e2e8f0); background: #fff; font-size: .82rem; transition: .15s; }
.nl-topic span small { color: var(--muted, #586274); font-size: .68rem; }
.nl-topic input:checked + span { background: var(--brand-600, #16a34a); border-color: var(--brand-600, #16a34a); color: #fff; }
.nl-topic input:checked + span small { color: #dcfce7; }
.nl-topic input:focus-visible + span { outline: 3px solid rgba(22, 163, 74, .35); outline-offset: 2px; }
.nl-topic.is-hidden { display: none; }
.nl-noresult { grid-column: 1 / -1; text-align: center; color: var(--muted, #586274); padding: 18px 0; margin: 0; }
.nl-chip { position: relative; cursor: pointer; }
.nl-chip input { position: absolute; opacity: 0; pointer-events: none; }
.nl-chip span { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line, #e2e8f0); background: #fff; font-size: .9rem; transition: .15s; }
.nl-chip span small { color: var(--muted, #586274); font-size: .72rem; }
.nl-chip input:checked + span { background: var(--brand-50, #f0fdf4); border-color: var(--brand-600, #16a34a); color: var(--brand, #15803d); font-weight: 700; }
.nl-chip input:checked + span::before { content: "✓"; }
.nl-chip input:focus-visible + span { outline: 3px solid rgba(22, 163, 74, .35); outline-offset: 2px; }
.nl-chip.is-hidden { display: none; }
.nl-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.nl-option:hover { border-color: var(--brand-600, #16a34a); }
.nl-option input { margin-top: 4px; accent-color: var(--brand, #15803d); }
.nl-option span { display: flex; flex-direction: column; }
.nl-option small { color: var(--muted, #586274); }
.nl-option:has(input:checked) { border-color: var(--brand-600, #16a34a); background: var(--brand-50, #f0fdf4); }
.nl-agree { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: .95rem; }
.nl-agree input { margin-top: 4px; accent-color: var(--brand, #15803d); }
.nl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.nl-submit[disabled] { opacity: .7; }
.nl-message { text-align: center; max-width: 720px; margin: 0 auto; }
.nl-message h1 { font-weight: 800; }
.nl-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; font-size: 1.8rem; background: var(--brand-50, #f0fdf4); color: var(--brand, #15803d); }
.nl-icon.is-warn { background: #fffbeb; color: #b45309; }
.nl-status { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.nl-status.is-ok { background: #ecfdf5; color: #047857; }
.nl-status.is-warn { background: #fffbeb; color: #92400e; }
.nl-status.is-off { background: #f1f5f9; color: #475569; }
@media (max-width: 860px) {
  .nl-hero { grid-template-columns: 1fr; padding: 24px 20px; }
  .nl-hero-card { display: none; }
  .nl-benefits { grid-template-columns: 1fr; }
}
[data-theme="dark"] .nl-chip span, [data-theme="dark"] .nl-option { background: transparent; }
[data-theme="dark"] .nl-scard, [data-theme="dark"] .nl-topic span, [data-theme="dark"] .nl-mini, [data-theme="dark"] .nl-tick { background: transparent; }
[data-theme="dark"] .nl-scard.is-on { background: rgba(22, 163, 74, .12); }
[data-theme="dark"] .nl-scard-count { background: rgba(148, 163, 184, .15); }
[data-theme="dark"] .nl-summary { background: rgba(22, 163, 74, .14); color: #86efac; }
