/* Merit and aggregate calculators (v1) + question bank page. Uses the emerald theme colours. */
.page-calc, .page-qbank { --c-brand: var(--brand, #047857); --c-brand-6: var(--brand-600, #059669); --c-50: var(--brand-50, #ecfdf5); --c-100: var(--brand-100, #d1fae5);
  --c-ink: var(--ink, #111c18); --c-muted: var(--muted, #5b6763); --c-line: var(--line, #dfe7e3); --c-card: #fff; --c-soft: #e8f3ee; --c-hot: #fff7e6; --c-hot-ink: #9a5b00; }
html[data-theme="dark"] .page-calc, html[data-theme="dark"] .page-qbank { --c-50: rgba(16, 185, 129, .12); --c-100: rgba(16, 185, 129, .28); --c-ink: #e5efe9; --c-muted: #9fb0a8;
  --c-line: #2a3832; --c-card: #16201c; --c-soft: #13211b; --c-hot: rgba(245, 158, 11, .15); --c-hot-ink: #fbbf24; --c-brand: #34d399; }

.calc-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; background: var(--c-soft); border: 1px solid var(--c-100); border-radius: 16px; padding: 26px; margin-bottom: 22px; }
.calc-hero h1 { margin: 0 0 6px; }
.calc-eyebrow { display: inline-block; background: var(--c-card); border: 1px solid var(--c-100); color: var(--c-brand); font-weight: 600; font-size: .82rem; padding: 4px 12px; border-radius: 99px; margin-bottom: 10px; }
.calc-stats { display: flex; gap: 10px; }
.calc-stat { text-align: center; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 12px; padding: 10px 18px; min-width: 96px; }
.calc-stat b { display: block; font-size: 1.4rem; color: var(--c-brand); }
.calc-stat span { font-size: .78rem; color: var(--c-muted); }

.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.calc-grid.is-small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.calc-card { display: flex; flex-direction: column; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 14px; padding: 18px; color: var(--c-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.calc-card:hover, .calc-card:focus-visible { border-color: var(--c-brand-6); box-shadow: 0 6px 20px rgba(17, 28, 24, .06); color: var(--c-ink); text-decoration: none; }
.calc-card h2, .calc-card h3 { font-size: 1.05rem; margin: 10px 0 4px; }
.calc-card p { color: var(--c-muted); font-size: .9rem; line-height: 1.45; margin: 0 0 10px; flex: 1; }
.calc-ico { width: 42px; height: 42px; border-radius: 10px; background: var(--c-50); color: var(--c-brand); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.calc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.calc-tag { font-size: .75rem; background: var(--c-50); color: var(--c-brand); border: 1px solid var(--c-100); border-radius: 99px; padding: 2px 10px; }
.calc-tag.is-hot { background: var(--c-hot); color: var(--c-hot-ink); border-color: transparent; }
.calc-go { font-weight: 600; font-size: .9rem; color: var(--c-brand); }
.calc-note { font-size: .8rem; color: var(--c-muted); margin-top: 10px; }

.calc-two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
@media (max-width: 860px) { .calc-two { grid-template-columns: 1fr; } }
.calc-panel { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 14px; padding: 20px; }
.calc-panel h2 { font-size: 1.05rem; margin: 0 0 12px; }
.calc-panel label { display: block; font-weight: 600; font-size: .88rem; margin: 0 0 5px; }
.calc-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.calc-inp { width: 100%; border: 1px solid var(--c-line); border-radius: 9px; padding: 10px 12px; font-size: 1rem; background: var(--c-card); color: var(--c-ink); }
.calc-inp:focus { outline: 2px solid rgba(5, 150, 105, .35); border-color: var(--c-brand-6); }
.calc-pair { display: flex; align-items: center; gap: 6px; }
.calc-pair .calc-inp { flex: 1 1 60%; }
.calc-pair .calc-tot { flex: 0 1 34%; color: var(--c-muted); }
.calc-of { color: var(--c-muted); font-size: .85rem; }
.calc-seg { display: flex; flex-wrap: wrap; border: 1px solid var(--c-line); border-radius: 9px; overflow: hidden; margin-bottom: 16px; }
.calc-seg button { flex: 1 1 auto; border: 0; background: transparent; color: var(--c-muted); padding: 9px 10px; font: inherit; font-size: .9rem; cursor: pointer; }
.calc-seg button.on { background: var(--c-brand-6); color: #fff; font-weight: 600; }
.calc-weights { margin: 0 0 14px; }
.calc-weights summary { cursor: pointer; color: var(--c-brand); font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.calc-btn { width: 100%; padding: 11px; font-weight: 600; border-radius: 9px; }
.calc-empty { color: var(--c-muted); background: var(--c-50); border: 1px dashed var(--c-100); border-radius: 10px; padding: 18px; }
.calc-big { font-size: 3rem; font-weight: 800; color: var(--c-brand); letter-spacing: -.03em; line-height: 1; }
.calc-sub { color: var(--c-muted); font-size: .85rem; margin-top: 4px; }
.calc-bar { height: 10px; background: var(--c-50); border-radius: 99px; overflow: hidden; margin: 8px 0 12px; }
.calc-bar i { display: block; height: 100%; width: 0; background: var(--c-brand-6); border-radius: 99px; transition: width .35s; }
.calc-brk { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 7px 0; border-bottom: 1px dashed var(--c-line); }
.calc-brk span { color: var(--c-muted); }
.calc-chance { background: var(--c-50); border: 1px solid var(--c-100); border-radius: 10px; padding: 12px; font-size: .9rem; margin: 14px 0 0; line-height: 1.45; }
.calc-chance.is-bad { background: var(--c-hot); border-color: transparent; }
.calc-chance ul { margin: 6px 0 0; padding-left: 18px; }
.calc-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.calc-share .btn { flex: 1 1 140px; }
.calc-wa { background: #25d366; border-color: #25d366; color: #fff; }
.calc-wa:hover { background: #1fb457; color: #fff; }
.calc-out { background: var(--c-card); border: 1px solid var(--c-brand-6); color: var(--c-brand); }
.calc-out:hover { background: var(--c-50); color: var(--c-brand); }
.calc-list { list-style: none; margin: 0; padding: 0; }
.calc-list a { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--c-line); text-decoration: none; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-q { font-size: .98rem; margin: 14px 0 4px; }

/* Question bank page */
.qb-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.qb-total { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 12px; padding: 12px 14px; }
.qb-total b { display: block; font-size: 1.5rem; color: var(--c-brand); line-height: 1.1; }
.qb-total span { font-size: .8rem; color: var(--c-muted); }
.qb-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.qb-tools .calc-inp { max-width: 340px; }
.qb-subject { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.qb-subject > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; }
.qb-subject > summary::-webkit-details-marker { display: none; }
.qb-subject > summary h2 { font-size: 1.02rem; margin: 0; }
.qb-subject > summary .qb-meta { color: var(--c-muted); font-size: .85rem; }
.qb-subject[open] > summary { border-bottom: 1px solid var(--c-line); }
.qb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.qb-table th, .qb-table td { padding: 8px 18px; border-bottom: 1px solid var(--c-line); text-align: left; }
.qb-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--c-muted); font-weight: 600; }
.qb-table td.n, .qb-table th.n { text-align: right; white-space: nowrap; }
.qb-table tr:last-child td { border-bottom: 0; }
.qb-exp { display: inline-block; min-width: 3.2em; text-align: right; }
.qb-new { color: var(--c-brand); font-weight: 600; }
@media (max-width: 600px) { .qb-table th, .qb-table td { padding: 8px 12px; } .qb-hide-sm { display: none; } }
.calc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
