/* ==========================================================================
   MCQsExam – Short Subjective Questions pages
   Loaded only on /short-questions/ pages (after app.css / dark.css).
   Uses the design tokens from app.css, so the dark theme works automatically.
   ========================================================================== */

.sq-ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.sq-main .panel-title .sq-ic { color: var(--brand-600); }
.sq-section { margin: 0 0 28px; }
.sq-h2 { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 14px; }
.sq-kicker { margin: 0 0 4px; color: var(--brand); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.sq-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }

/* ---------- Landing hero ---------- */
.sq-hero {
  position: relative; overflow: hidden; border-radius: 22px; margin: 0 0 28px; padding: 32px 20px;
  color: #fff; background: linear-gradient(135deg, #14532d 0%, #15803d 45%, #4d7c0f 100%);
  box-shadow: var(--shadow-lg);
}
.sq-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 85%); }
.sq-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.sq-hero .sq-eyebrow { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.sq-hero h1 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.9rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: 0 0 12px; }
.sq-lead { color: rgba(255,255,255,.88); font-size: clamp(1rem, .95rem + .3vw, 1.12rem); max-width: 60ch; margin: 0 0 20px; }
.sq-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 18px 0 0; }
.sq-stats li { display: flex; align-items: baseline; gap: 6px; }
.sq-stats strong { font-size: 1.45rem; font-weight: 800; }
.sq-stats span { color: rgba(255,255,255,.8); font-size: .9rem; }
@media (min-width: 768px) { .sq-hero { padding: 44px 40px; } }

/* ---------- Search with suggestions ---------- */
.sq-search { position: relative; display: flex; align-items: center; gap: 8px; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 5px 5px 5px 12px; }
.sq-search-lg { box-shadow: 0 12px 32px rgba(15, 23, 42, .22); border-color: transparent; }
.sq-search .sq-search-ic { color: var(--muted); }
.sq-search input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: 1rem; padding: 8px 4px; }
.sq-search input[type="search"]:focus { outline: 0; }
.sq-search .btn { border-radius: 10px; padding: .6rem 1.1rem; }
.sq-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 360px; overflow: auto; }
.sq-suggest a { display: block; padding: 9px 10px; border-radius: 10px; color: var(--ink); font-size: .93rem; line-height: 1.35; }
.sq-suggest a small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.sq-suggest a:hover, .sq-suggest a.is-active { background: var(--brand-50); text-decoration: none; }
.sq-suggest .sq-suggest-all a { color: var(--brand); font-weight: 600; }
.sq-subject-tools { display: grid; gap: 12px; margin: 0 0 22px; }
.sq-filter-note { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }

/* ---------- Subject cards ---------- */
.sq-subject-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.sq-subject-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.sq-subject-card:hover { border-color: #bbf7d0; box-shadow: var(--shadow); transform: translateY(-2px); }
.sq-subject-top { display: flex; gap: 12px; align-items: center; }
.sq-subject-name { font-size: 1.05rem; font-weight: 800; margin: 0; line-height: 1.3; }
.sq-subject-name a { color: var(--ink); }
.sq-subject-name a::after { content: ""; }
.sq-subject-desc { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0; }
.sq-subject-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--brand); background: var(--brand-50); }
.sq-subject-icon .sq-ic { width: 26px; height: 26px; }
.sq-ic-flask, .sq-ic-coins { color: #4d7c0f; background: #f7fee7; }
.sq-ic-dna, .sq-ic-leaf, .sq-ic-heart { color: #047857; background: #d1fae5; }
.sq-ic-calculator, .sq-ic-chart, .sq-ic-scale { color: #b45309; background: #fef3c7; }
.sq-ic-cpu, .sq-ic-bulb { color: #059669; background: #ede9fe; }
.sq-ic-language, .sq-ic-flag, .sq-ic-globe { color: #be123c; background: #ffe4e6; }
html[data-theme="dark"] .sq-subject-icon { background: rgba(255,255,255,.07); }
html[data-theme="dark"] .sq-ic-flask, html[data-theme="dark"] .sq-ic-coins { color: #bef264; }
html[data-theme="dark"] .sq-ic-dna, html[data-theme="dark"] .sq-ic-leaf, html[data-theme="dark"] .sq-ic-heart { color: #6ee7b7; }
html[data-theme="dark"] .sq-ic-calculator, html[data-theme="dark"] .sq-ic-chart, html[data-theme="dark"] .sq-ic-scale { color: #fcd34d; }
html[data-theme="dark"] .sq-ic-cpu, html[data-theme="dark"] .sq-ic-bulb { color: #c4b5fd; }
html[data-theme="dark"] .sq-ic-language, html[data-theme="dark"] .sq-ic-flag, html[data-theme="dark"] .sq-ic-globe { color: #fda4af; }
.sq-count { color: var(--muted); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.sq-topic-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.sq-topic-chips a { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: .8rem; font-weight: 500; }
.sq-topic-chips a:hover { background: var(--brand-50); color: var(--brand); text-decoration: none; }
.sq-explore { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .9rem; }
.sq-explore .sq-ic { width: 1em; height: 1em; }

/* ---------- Page heads ---------- */
.sq-head-row { display: flex; gap: 14px; align-items: flex-start; }
.sq-head-row h1 { margin-top: 2px; }
.sq-intro { margin: 0 0 20px; }
.sq-class-chips { margin: 0 0 22px; }
.sq-layout { margin-top: 4px; }
.sq-layout .layout-aside > * + * { margin-top: 16px; }

/* ---------- Chapter (topic) grid ---------- */
.sq-topic-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.sq-topic-card a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.sq-topic-card a:hover { border-color: #bbf7d0; box-shadow: var(--shadow); text-decoration: none; }
.sq-topic-card.active a { border-color: var(--brand-600); }
.sq-topic-no { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .9rem; }
.sq-topic-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sq-topic-body strong { font-size: .95rem; line-height: 1.3; }
.sq-topic-body small { color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Toolbar ---------- */
.sq-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.sq-total { margin: 0; color: var(--muted); font-size: .92rem; }
.sq-total strong { color: var(--ink); }
.sq-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sq-switch { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.sq-switch input { width: 2.2em; height: 1.2em; appearance: none; -webkit-appearance: none; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; transition: background .15s; flex: none; }
.sq-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.2em - 4px); height: calc(1.2em - 4px); border-radius: 50%; background: #fff; transition: transform .15s; }
.sq-switch input:checked { background: var(--brand-600); }
.sq-switch input:checked::after { transform: translateX(1em); }
.sq-switch input:focus-visible { outline: 3px solid rgba(22, 163, 74, .45); outline-offset: 2px; }

/* ---------- Question cards ---------- */
.sq-list { display: grid; gap: 14px; }
.sq-card, .sq-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .sq-card { padding: 20px 24px; } .sq-article { padding: 26px 30px; } }
.sq-card { content-visibility: auto; contain-intrinsic-size: auto 260px; }
.sq-card-head { display: flex; gap: 12px; align-items: flex-start; }
.sq-num { flex: none; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .85rem; margin-top: 1px; }
.sq-q { font-size: 1.06rem; font-weight: 700; line-height: 1.45; margin: 0; }
.sq-q a { color: var(--ink); }
.sq-q a:hover { color: var(--brand); }
.sq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; }
.sq-card .sq-meta { padding-left: 42px; }
.sq-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: .76rem; font-weight: 600; }
a.sq-badge:hover { background: var(--brand-50); color: var(--brand); text-decoration: none; }
.sq-badge-imp { background: #fef3c7; color: #92400e; }
html[data-theme="dark"] .sq-badge-imp { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.sq-badge-imp .sq-ic { width: .95em; height: .95em; }
.sq-badge-class { background: var(--brand-50); color: var(--brand); }
.sq-tag { font-size: .78rem; font-weight: 600; color: var(--muted); }
.sq-tag:hover { color: var(--brand); }
.sq-meta-text { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8rem; }
.sq-detail { margin: 12px 0 0; }
.sq-card .sq-detail, .sq-card .sq-answer { margin-left: 42px; }
@media (max-width: 575.98px) { .sq-card .sq-meta, .sq-card .sq-detail, .sq-card .sq-answer { margin-left: 0; padding-left: 0; } }
.sq-answer { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--ok-bg); border: 1px solid var(--ok-border); }
.sq-answer-label { margin: 0 0 6px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
h2.sq-answer-label { font-size: .8rem; }
.sq-answer .prose { color: var(--ink); }
.sq-answer .prose > :last-child { margin-bottom: 0; }
.sq-answer-full { padding: 18px 20px; margin-top: 18px; }
.sq-answer-full .prose { font-size: 1.02rem; line-height: 1.75; }
.sq-clamp { max-height: 15em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
.sq-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 600; font-size: .9rem; }
.sq-more .sq-ic { width: 1em; height: 1em; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: .94rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--line-2); }
.prose sub, .prose sup { font-size: .72em; }
.prose img { border-radius: 8px; }

/* Self-test mode: answers hidden until revealed */
.sq-reveal { display: none; }
.sq-selftest .sq-answer { background: transparent; border-style: dashed; padding: 10px 12px; }
.sq-selftest .sq-answer .sq-answer-body { display: none; }
.sq-selftest .sq-answer .sq-reveal { display: inline-flex; border: 0; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: .88rem; border-radius: 9px; padding: 6px 12px; cursor: pointer; }
.sq-selftest .sq-answer.is-open { background: var(--ok-bg); border-style: solid; padding: 14px 16px; }
.sq-selftest .sq-answer.is-open .sq-answer-body { display: block; }
.sq-selftest .sq-answer.is-open .sq-reveal { display: none; }

/* ---------- Actions ---------- */
.sq-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sq-card .sq-actions { margin-left: 42px; }
@media (max-width: 575.98px) { .sq-card .sq-actions { margin-left: 0; } }
.sq-act { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .82rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.sq-act:hover { border-color: #86efac; color: var(--brand); text-decoration: none; background: var(--brand-50); }
.sq-act .sq-ic { width: 1.05em; height: 1.05em; }
.sq-act.sq-wa .bi { color: #16a34a; }
.sq-act.sq-bm.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.sq-act.sq-bm.on .sq-ic { fill: currentColor; }
.sq-act.sq-open { margin-left: auto; border-color: transparent; color: var(--brand); }
.sq-act.is-done { border-color: var(--ok-border); color: var(--ok); background: var(--ok-bg); }
@media (max-width: 420px) { .sq-act span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .sq-act { padding: 0 10px; } .sq-act.sq-open span { position: static; width: auto; height: auto; clip: auto; } }

/* ---------- Single question page ---------- */
.sq-title { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; margin: 0; }
.sq-article .sq-meta { margin-top: 12px; }
.sq-preview-bar { border-radius: var(--radius-sm); }
.sq-related { margin-top: 26px; }
.sq-related h2 .sq-ic { color: var(--brand-600); }

/* ---------- Lists of links ---------- */
.sq-links { list-style: none; padding: 0; margin: 0; }
.sq-links li + li { border-top: 1px solid var(--line-2); }
.sq-links a { display: flex; flex-direction: column; gap: 2px; padding: 9px 2px; color: var(--ink); font-size: .93rem; line-height: 1.4; }
.sq-links a:hover { text-decoration: none; color: var(--brand); }
.sq-links small { color: var(--muted); font-size: .78rem; }
.sq-link-q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sq-panel-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-weight: 600; font-size: .9rem; }
.sq-panel-more .sq-ic { width: 1em; height: 1em; }
.sq-two { display: grid; gap: 16px; margin: 0 0 24px; }
.sq-two > .panel + .panel { margin-top: 0; }
@media (min-width: 992px) { .sq-two { grid-template-columns: 1fr 1fr; } }
.sq-recent { margin: 0 0 24px; }
.sq-layout .sq-recent { margin: 0; }
.sq-recent-clear { border: 0; background: none; color: var(--muted); font-size: .8rem; padding: 6px 0 0; cursor: pointer; }
.sq-recent-clear:hover { color: var(--bad); }
.sq-res-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sq-res-list a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--ink); }
.sq-res-list a:hover { border-color: #bbf7d0; background: var(--brand-50); text-decoration: none; }
.sq-res-list .bi { color: var(--brand-600); font-size: 1.15rem; }
.sq-res-list span { display: flex; flex-direction: column; line-height: 1.3; }
.sq-res-list strong { font-size: .92rem; }
.sq-res-list small { color: var(--muted); font-size: .78rem; }

/* ---------- Question of the day ---------- */
.sq-qotd { position: relative; padding: 22px; border-radius: var(--radius); color: #fff; background: linear-gradient(140deg, #0f766e, #15803d); box-shadow: var(--shadow); }
.sq-qotd .sq-eyebrow { color: rgba(255,255,255,.85); }
.sq-qotd-q { font-size: 1.2rem; font-weight: 800; line-height: 1.4; margin: 0 0 4px; }
.sq-qotd-q a { color: #fff; }
.sq-qotd-sub { color: rgba(255,255,255,.75); font-size: .88rem; margin: 0 0 12px; }
.sq-qotd-ans { background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 14px; }
.sq-qotd-ans summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.sq-qotd-ans .prose { color: #fff; margin-top: 10px; }
.sq-qotd-ans .prose a { color: #fff; text-decoration: underline; }
.sq-qotd-ans .prose th, .sq-qotd-ans .prose td { border-color: rgba(255,255,255,.3); }
.sq-qotd-ans .prose th { background: rgba(255,255,255,.1); }
.sq-qotd-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; color: #fff; font-weight: 600; font-size: .88rem; }
.sq-qotd-link:hover { color: #fff; }
.sq-qotd-link .sq-ic { width: 1em; height: 1em; }

/* ---------- Empty state, CTA ---------- */
.sq-empty { text-align: center; padding: 36px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); margin: 0 0 20px; }
.sq-empty h2 { font-size: 1.15rem; margin: 10px 0 4px; }
.sq-empty p { color: var(--muted); margin: 0 auto 14px; max-width: 46ch; }
.sq-empty-ic .sq-ic { width: 40px; height: 40px; color: var(--brand-600); }
.sq-cta { margin-top: 8px; }
.sq-chapter-nav { margin-top: 26px; }

/* ---------- Toast ---------- */
.sq-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 2000; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--surface); font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.sq-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Print: clean question sheets ---------- */
@media print {
  .sq-actions, .sq-toolbar, .sq-search, .share-bar, .mcq-nav, .sq-related, .sq-class-chips, .sq-subject-tools, .sq-hero .sq-search,
  .sq-recent, .sq-reveal, .crumbs, .pagging, .sq-cta, .sq-topic-grid, .sq-imp-panel, .sq-preview-bar, .sq-more { display: none !important; }
  .sq-card, .sq-article { box-shadow: none; border: 0; border-bottom: 1px solid #ccc; border-radius: 0; padding: 10px 0; break-inside: avoid; content-visibility: visible; }
  .sq-answer, .sq-selftest .sq-answer { display: block; background: none !important; border: 0 !important; padding: 4px 0 0 !important; margin-left: 0 !important; }
  .sq-answer .sq-answer-body { display: block !important; }
  .sq-clamp { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .sq-card .sq-meta, .sq-card .sq-detail { margin-left: 0; padding-left: 0; }
  .sq-badge, .sq-tag { background: none; padding: 0; color: #555; }
  .sq-q a, .sq-title { color: #000; }
  .layout { display: block; }
  body { background: #fff; }
  .sq-main::after { content: "Printed from MCQsExam.com – free short questions with answers"; display: block; margin-top: 16px; font-size: 10pt; color: #666; }
}
