/* Written-Exam learning module — layered on top of styles.css (reuses its
   :root tokens, .card, .primary-btn, .topbar, .lang-btn, .bn/.en, footer).
   All module-specific selectors are .w-prefixed so nothing collides with the
   MCQ app's classes. */

.w-wrap { max-width: 960px; margin: 0 auto; padding: 1.2rem; }

.w-backlink {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font: inherit; padding: 0.2rem 0; margin-bottom: 0.6rem; display: inline-flex;
  gap: 0.3rem; align-items: center;
}
.w-backlink:hover { text-decoration: underline; }

.w-topbar-link {
  color: var(--accent); border: 1px solid var(--accent-light); border-radius: 6px;
  padding: 0.25rem 0.6rem; text-decoration: none; font-size: 0.85rem; white-space: nowrap;
}
.w-topbar-link:hover { background: var(--accent); color: #fff; }

/* ---- gate (non-paid users) ---- */
.w-gate { text-align: center; padding: 2.2rem 1.4rem; }
.w-gate h2 { margin-top: 0.3rem; }
.w-gate .w-gate-list { text-align: left; max-width: 460px; margin: 1rem auto; line-height: 1.7; }
.w-gate .w-gate-cta { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }

/* ---- hero ---- */
.w-hero { background: linear-gradient(135deg, var(--accent-deep), var(--accent)); color: #fff; }
.w-hero h2 { color: #fff; margin: 0 0 0.2rem; }
.w-hero .w-hero-sub { color: var(--accent-gold-soft); margin: 0; font-size: 0.95rem; }
.w-hero-slim { padding-top: 1rem; padding-bottom: 1rem; }

/* ---- search ---- */
.w-search-wrap { margin: 0 0 0.6rem; }
.w-search-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.95rem;
  padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: inherit;
}
.w-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-gold-soft); }
#w-search-results:not(:empty) { margin-bottom: 1rem; }

/* ---- mode grid (front door) ---- */
.w-mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.7rem; }
.w-mode-card {
  display: flex; align-items: center; gap: 0.75rem; text-align: left; width: 100%;
  border: 1px solid var(--border); border-radius: 10px; padding: 0.85rem 0.95rem;
  background: #fff; cursor: pointer; font: inherit; color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.w-mode-card:hover { border-color: var(--accent); box-shadow: 0 3px 14px rgba(92,47,16,0.12); transform: translateY(-2px); }
.w-mode-icon { font-size: 1.6rem; line-height: 1; flex: none; }
.w-mode-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.w-mode-title { font-weight: 700; color: var(--accent); }
.w-mode-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.w-mode-cta { flex: none; font-size: 0.8rem; font-weight: 700; color: var(--accent-gold); white-space: nowrap; }

.w-home-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px dashed var(--border); }
.w-home-links .w-backlink { margin-bottom: 0; }

/* law cards */
.w-law-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.55rem; }
.w-law-card {
  text-align: left; border: 1px solid var(--border); border-radius: 10px; padding: 0.65rem 0.8rem;
  background: #fff; cursor: pointer; font: inherit; color: inherit; transition: box-shadow 0.15s, border-color 0.15s;
}
.w-law-card:hover { border-color: var(--accent); box-shadow: 0 3px 14px rgba(92,47,16,0.12); }
.w-law-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.w-law-name { font-weight: 700; color: var(--accent); }
.w-badge { font-size: 0.68rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 5px; background: var(--accent-gold-soft); color: var(--accent-deep); white-space: nowrap; }
.w-law-tip { font-size: 0.82rem; color: var(--muted); margin: 0.3rem 0 0.35rem; font-style: italic; }
.w-law-counts { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

/* ---- topic / search / saved list ---- */
.w-topic-list { display: flex; flex-direction: column; gap: 0.4rem; }
.w-topic-row {
  display: flex; align-items: center; gap: 0.6rem; text-align: left; width: 100%;
  border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.8rem; background: #fff;
  cursor: pointer; font: inherit; color: inherit; transition: border-color 0.12s, background 0.12s;
}
.w-topic-row:hover { border-color: var(--accent); background: #fdf7ee; }
.w-topic-star { color: var(--accent-gold); font-size: 1rem; width: 1.1rem; flex: none; }
.w-topic-main { flex: 1; min-width: 0; }
.w-topic-title { font-weight: 600; }
.w-topic-years { font-size: 0.75rem; color: var(--muted); }
.w-freq-badge { flex: none; font-size: 0.68rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 10px; background: var(--accent-gold-soft); color: var(--accent-deep); white-space: nowrap; }

/* ---- topic / question view ---- */
.w-qbox { border-left: 4px solid var(--accent-gold); background: #fbf4e9; padding: 0.8rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.w-qbox .w-qlabel { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-gold); }
.w-qbox .w-qtext { font-weight: 500; margin-top: 0.25rem; }

/* ---- bilingual content blocks (model answers, questions, drafts, skeleton) ----
   Bangla is the canonical text; the English rendering is a secondary gloss in
   Bangla / Both modes (muted, divided off), and becomes the primary text in
   English-only mode. */
.w-bil > .bn, .w-bil > .en { display: block; }
.w-bil > .bn p, .w-bil > .en p { margin: 0 0 0.7rem; }
.w-bil > .bn p:last-child, .w-bil > .en p:last-child { margin-bottom: 0; }
.w-bil > .en {
  color: var(--muted); border-top: 1px dashed var(--border);
  margin-top: 0.8rem; padding-top: 0.8rem;
}
body.lang-en-only .w-bil > .en {
  color: inherit; border-top: 0; margin-top: 0; padding-top: 0;
}
body:not(.lang-en-only):not(.lang-bn-only) .w-bil > .en::before {
  content: "English"; display: block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-gold);
  margin-bottom: 0.35rem;
}

.w-answer { line-height: 1.65; }
.w-answer h4 { color: var(--accent); margin: 1rem 0 0.3rem; }
.w-answer table { border-collapse: collapse; width: 100%; margin: 0.7rem 0; font-size: 0.92rem; }
.w-answer th { background: var(--accent); color: #fff; text-align: left; padding: 0.4rem 0.55rem; }
.w-answer td { border: 1px solid var(--border); padding: 0.4rem 0.55rem; vertical-align: top; }
.w-answer ul { padding-left: 1.3rem; }
.w-answer li { margin: 0.25rem 0; }

.w-reveal-btn { margin: 0.4rem 0 0.2rem; cursor: pointer; }
.w-hide-btn { font-size: 0.85rem; padding: 0.35rem 0.85rem; margin: 0 0 0.6rem; }
.w-recall-hint { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 0.9rem; background: #fbf4e9; border-left: 4px solid var(--accent-gold); padding: 0.7rem 0.9rem; border-radius: 4px; }
.w-topic-nav { display: flex; justify-content: space-between; gap: 0.6rem; margin-top: 1.4rem; }

/* ---- save (bookmark) ---- */
.w-act-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.2rem; padding-top: 0.9rem; border-top: 1px dashed var(--border); }
.w-save-btn { border: 1px solid var(--accent-light); background: #fff; color: var(--accent); border-radius: 7px; padding: 0.45rem 0.9rem; cursor: pointer; font: inherit; }
.w-save-btn:hover { background: #fdf7ee; border-color: var(--accent); }
.w-save-btn.is-set { background: var(--accent-gold-soft); border-color: var(--accent-gold); color: var(--accent-deep); font-weight: 700; }

/* ---- decks (flashcards / drafting drill / section drill) ---- */
.w-deck-h { margin: 0 0 0.6rem; }
.w-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 1rem; }
.w-chip { border: 1px solid var(--accent-light); background: #fff; color: var(--accent); border-radius: 20px; padding: 0.3rem 0.8rem; cursor: pointer; font: inherit; font-size: 0.85rem; }
.w-chip:hover { background: #fdf7ee; }
.w-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.w-deck-card { min-height: 90px; }
.w-deck-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1.4rem; }
.w-deck-count { font-size: 0.85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.w-deck-tools { text-align: center; margin-top: 0.5rem; }
.w-deck-tools .w-backlink { margin: 0; }
.w-srs-rate { display: inline-flex; gap: 0.5rem; }
/* spaced-review "due" count on a home mode card — a queue length, not a score */
.w-due-badge { display: inline-block; font-size: 0.62rem; font-weight: 700; padding: 0.05rem 0.4rem; border-radius: 10px; background: var(--accent-gold-soft); color: var(--accent-deep); vertical-align: middle; white-space: nowrap; }

.w-checklist { list-style: none; padding-left: 0; line-height: 1.7; }
.w-checklist li { margin: 0.2rem 0; }

/* ---- provision drill ---- */
.w-sd-card { text-align: center; padding: 1.2rem 0.5rem; }
.w-sd-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-gold); }
.w-sd-big { font-size: 1.35rem; font-weight: 700; color: var(--accent); margin: 0.6rem 0 1.1rem; line-height: 1.3; }
.w-pd-cite { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin: 0.2rem 0 0.6rem; }
.w-pd-reveal { text-align: left; max-width: 640px; margin: 0.6rem auto 0; }
.w-pd-sec { margin: 0.7rem 0; }
.w-pd-lbl { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-gold); margin-bottom: 0.2rem; }
.w-pd-sec > div, .w-pd-answer > div { line-height: 1.55; }
.w-pd-answer { margin: 0.85rem 0; padding: 0.7rem 0.9rem; background: #fbf4e9; border-left: 4px solid var(--accent-gold); border-radius: 4px; }
.w-pd-answer > div { font-style: italic; }
.w-pd-note { font-size: 0.85rem; margin-top: 0.5rem; }
.w-pd-link { display: inline-block; margin-top: 0.9rem; background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; font-weight: 600; padding: 0; }
.w-pd-link:hover { text-decoration: underline; }
.w-chip.is-soon { opacity: 0.5; cursor: default; border-style: dashed; }

/* ---- strategy ---- */
.w-strat-facts { background: var(--accent-gold-soft); border-radius: 6px; padding: 0.55rem 0.8rem; margin: 0.2rem 0 0.6rem; font-size: 0.92rem; }
.w-strat table { border-collapse: collapse; width: 100%; margin: 0.6rem 0 1.1rem; font-size: 0.92rem; }
.w-strat th { background: var(--accent); color: #fff; text-align: left; padding: 0.45rem 0.6rem; }
.w-strat td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; vertical-align: top; }
.w-strat h3 { color: var(--accent); margin: 1.3rem 0 0.4rem; }
.w-callout { background: #f3e9dd; border-left: 5px solid var(--accent-gold); padding: 0.7rem 0.95rem; border-radius: 4px; margin: 0.8rem 0; }

.w-section-h { margin: 1.4rem 0 0.6rem; color: var(--accent); }
.w-eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-gold); }

/* a model draft, rendered like a court document: centred cause-title/headings,
   right-aligned designations & signatures, left-aligned body */
.w-draft {
  background: #fffdf9; border: 1px solid #e2d6c2; border-radius: 6px;
  padding: 1.3rem 1.5rem; margin: 0.7rem 0; overflow-x: auto;
  font-family: Georgia, "Times New Roman", serif; line-height: 1.55; font-size: 0.95rem;
  box-shadow: 0 1px 5px rgba(92, 47, 16, 0.07);
}
.w-draft .dc { text-align: center; }
.w-draft .dr { text-align: right; }
.w-draft .dl { text-align: left; }
.w-draft .db { height: 0.55rem; }
.w-draft .dp { padding-left: 40%; }
.w-draft .dmatter { font-weight: 700; text-decoration: underline; }
.w-draft .dsheweth { font-weight: 700; letter-spacing: 0.22em; text-decoration: underline; }
.w-draft .dbold { font-weight: 700; }
.w-draft .daffidavit { font-weight: 700; text-decoration: underline; }
.w-draft .dsig { text-decoration: underline; }
.w-draft .djurat { padding-left: 26%; text-align: center; }
.w-draft .daffnum { padding-left: 2.5rem; text-indent: -1.3rem; }
.w-draft-variant { font-size: 0.82rem; color: var(--muted); margin: 0.5rem 0 0; padding: 0.6rem 0.85rem; background: #f3ece0; border-radius: 6px; line-height: 1.5; }

/* the universal skeletons in Drafting basics: monospace so the cause-title aligns. */
.w-skel {
  white-space: pre; font-family: "Consolas", "Menlo", "Courier New", monospace;
  font-size: 0.78rem; line-height: 1.45; color: #f3e9dd; background: #3d1d08;
  padding: 0.9rem 1.1rem; border-radius: 8px; overflow-x: auto; margin: 0.8rem auto;
  width: max-content; max-width: 100%;
}
.w-patterns h2 { font-size: 1.35rem; }
.w-patterns table { font-size: 0.9rem; }
.w-patterns .callout, .w-strat .callout { background: #f3e9dd; border-left: 5px solid var(--accent-gold); padding: 0.7rem 0.95rem; border-radius: 4px; margin: 0.8rem 0; }

/* ---- Bare Acts reader ---- */
.w-act-cta {
  display: block; width: 100%; text-align: left; margin: 0.6rem 0 0.4rem;
  padding: 0.6rem 0.85rem; border: 1px solid var(--accent-gold); border-radius: 8px;
  background: #fbf4e9; color: var(--accent); font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
.w-act-cta:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.w-act-filter { position: sticky; top: var(--topbar-h, 0px); z-index: 2; background: var(--bg); padding: 0.5rem 0; margin: 0.3rem 0 0.6rem; }
.w-act-body { display: flex; flex-direction: column; gap: 1.1rem; }
.w-sec { border-top: 1px solid var(--accent-gold-soft); padding-top: 0.9rem; scroll-margin-top: 64px; }
.w-sec-h { color: var(--accent); font-size: 1rem; margin: 0 0 0.4rem; }
.w-sec .w-bil, .w-sec > p { line-height: 1.65; }
.w-sec-repealed { opacity: 0.6; }
.w-sec-notes { margin-top: 0.5rem; font-size: 0.85rem; }
.w-sec-notes summary { cursor: pointer; color: var(--accent-gold); font-weight: 700; }
.w-sec-notes > div { margin-top: 0.35rem; color: #6b5a45; padding-left: 0.6rem; border-left: 2px solid var(--accent-gold-soft); }
.w-sec-flash { animation: wSecFlash 1.6s ease-out 1; }
@keyframes wSecFlash { 0% { background: var(--accent-gold-soft); } 100% { background: transparent; } }
.w-sec-link { color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent-gold); cursor: pointer; }
.w-sec-link:hover { color: var(--accent-gold); }

/* Desktop navigation rail — lives in the page's otherwise-empty side margin */
.w-rail { display: none; }
@media (min-width: 1240px) {
  .w-wrap { max-width: 1230px; }
  #w-view { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 1.4rem; }
  .w-rail { display: block; }
}
.w-rail-inner { position: sticky; top: calc(var(--topbar-h, 64px) + 12px); display: flex; flex-direction: column; gap: 2px; padding: 0.6rem; background: #fbf6ee; border: 1px solid var(--accent-gold-soft); border-radius: 10px; max-height: calc(100vh - var(--topbar-h, 64px) - 24px); overflow-y: auto; }
.w-rail-h { margin: 0.6rem 0.4rem 0.15rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-gold); }
.w-rail-law { display: flex; gap: 2px; align-items: stretch; }
.w-rail-item { flex: 1; min-width: 0; text-align: left; border: 0; background: none; border-radius: 6px; padding: 0.42rem 0.5rem; font: inherit; font-size: 0.86rem; color: #4a3a28; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-rail-item:hover { background: #f3e9dd; }
.w-rail-act { border: 0; background: none; border-radius: 6px; padding: 0.2rem 0.4rem; cursor: pointer; font-size: 0.9rem; opacity: 0.7; }
.w-rail-act:hover { background: #f3e9dd; opacity: 1; }
.w-rail-law.w-rail-on .w-rail-item, .w-rail-item.w-rail-on { background: var(--accent); color: #fff; font-weight: 700; }
.w-rail-act.w-rail-on { background: var(--accent-gold); opacity: 1; }

/* Back chip + search box share the reader's pinned row */
.w-act-filterrow { display: flex; gap: 0.5rem; align-items: stretch; }
.w-act-filterrow .w-search-input { flex: 1; min-width: 0; }
.w-backchip { border: 1px solid var(--accent-gold); background: #fbf4e9; border-radius: 8px; padding: 0 0.85rem; font: inherit; font-size: 1.05rem; font-weight: 800; color: var(--accent); cursor: pointer; }
.w-backchip:hover { background: var(--accent); color: #fff; }

/* Contents (TOC) — grouped, scrollable list of every provision */
.w-toc { margin: 0.5rem 0 0.2rem; border: 1px solid var(--accent-gold-soft); border-radius: 8px; background: #fbf6ee; }
.w-toc > summary { cursor: pointer; padding: 0.55rem 0.85rem; font-weight: 700; color: var(--accent); list-style: none; }
.w-toc > summary::-webkit-details-marker { display: none; }
.w-toc > summary::before { content: "▸"; display: inline-block; margin-right: 0.4rem; transition: transform 0.15s; }
.w-toc[open] > summary::before { transform: rotate(90deg); }
.w-toc-count { float: right; font-weight: 400; color: #8a7358; font-size: 0.85rem; }
.w-toc-scroll { max-height: min(56vh, 430px); overflow-y: auto; padding: 0.2rem 0.7rem 0.7rem; border-top: 1px solid var(--accent-gold-soft); }
.w-toc-kind { margin: 0.75rem 0 0.25rem; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-gold); }
.w-toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.w-toc-row { display: flex; gap: 0.5rem; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-top: 1px dotted var(--accent-gold-soft); padding: 0.34rem 0.15rem; font: inherit; font-size: 0.85rem; color: inherit; cursor: pointer; }
.w-toc-row:hover { background: #f3e9dd; }
.w-toc-num { font-weight: 700; color: var(--accent); white-space: nowrap; }
.w-toc-head { color: #4a3a28; }
.w-toc-repealed { opacity: 0.5; }
.w-toc-sched .w-toc-head { font-weight: 700; color: var(--accent); }

/* Jump chip — appears under the filter when the query is a provision number */
#w-act-jump:empty { display: none; }
.w-jumpchip { display: flex; align-items: baseline; gap: 0.5rem; width: 100%; text-align: left; margin-top: 0.45rem; padding: 0.55rem 0.85rem; border: 1px solid var(--accent-gold); border-radius: 8px; background: #fbf4e9; cursor: pointer; font: inherit; font-size: 0.92rem; color: inherit; }
.w-jumpchip:hover { background: var(--accent); }
.w-jumpchip:hover .w-jumpchip-tag, .w-jumpchip:hover .w-jumpchip-head, .w-jumpchip:hover .w-jumpchip-go { color: #fff; }
.w-jumpchip-tag { font-weight: 800; color: var(--accent); white-space: nowrap; }
.w-jumpchip-head { color: #4a3a28; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-jumpchip-go { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: var(--accent-gold); white-space: nowrap; }

/* "Read the Law" panel — the provisions a model answer / draft is built on */
.w-readlaw { margin: 1.1rem 0 0.4rem; border: 1px solid var(--accent-gold); border-radius: 10px; background: #fbf4e9; }
.w-readlaw > summary { cursor: pointer; padding: 0.65rem 0.95rem; color: var(--accent); list-style: none; display: flex; align-items: baseline; gap: 0.45rem; }
.w-readlaw > summary::-webkit-details-marker { display: none; }
.w-readlaw > summary::after { content: "▾"; margin-left: auto; color: var(--accent-gold); }
.w-readlaw[open] > summary::after { content: "▴"; }
.w-readlaw-n { font-size: 0.82rem; color: #8a7358; }
.w-readlaw-body { padding: 0.6rem 0.7rem 0.7rem; border-top: 1px solid var(--accent-gold-soft); display: flex; flex-direction: column; gap: 0.5rem; }

/* One provision as a collapsible card (panel, drill reveal) */
.w-lawcard { border: 1px solid var(--accent-gold-soft); border-radius: 8px; background: #fff; scroll-margin-top: 64px; }
.w-lawcard > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.5rem; padding: 0.5rem 0.75rem; cursor: pointer; list-style: none; }
.w-lawcard > summary::-webkit-details-marker { display: none; }
.w-lawcard > summary::after { content: "▸"; color: var(--accent-gold); margin-left: 0.15rem; }
.w-lawcard[open] > summary::after { content: "▾"; }
.w-lawcard-tag { font-weight: 800; color: var(--accent); white-space: nowrap; }
.w-lawcard-head { color: #4a3a28; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-lawcard-act { margin-left: auto; font-size: 0.74rem; color: #8a7358; white-space: nowrap; }
.w-lawcard-body { padding: 0.55rem 0.85rem 0.75rem; border-top: 1px dashed var(--accent-gold-soft); line-height: 1.65; font-size: 0.94rem; }
.w-lawcard-body .w-pd-link { margin-top: 0.55rem; }
.w-lawcard.w-sec-flash { animation: wSecFlash 1.6s ease-out 1; }

/* Key-provisions bar — always pinned with the search box: ←/→ steps through the
   provisions the model Q&A uses, from wherever you are; ⭐ toggles key-only view */
.w-tourbar { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border: 1px solid var(--accent-gold); border-radius: 8px; background: #fbf4e9; }
.w-keybar { margin-top: 0.45rem; }
.w-tourbar-count { font-weight: 800; color: var(--accent); white-space: nowrap; font-size: 0.85rem; }
.w-tourbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; color: #4a3a28; }
.w-tourbtn { border: 1px solid var(--accent-gold); background: #fff; border-radius: 6px; padding: 0.25rem 0.6rem; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; }
.w-tourbtn:disabled { opacity: 0.4; cursor: default; }
.w-tourbtn:not(:disabled):hover { background: var(--accent); color: #fff; }
.w-keytoggle.w-on { background: var(--accent); border-color: var(--accent); }
.w-toc-star { color: var(--accent-gold); font-size: 0.7rem; margin-left: 0.2rem; vertical-align: 0.1em; }
.w-backlink-trunc { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Reverse links under a reader section — the study material built on it */
.w-sec-rel { margin-top: 0.55rem; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.w-sec-rel-lbl { font-size: 0.78rem; font-weight: 700; color: var(--accent-gold); }
.w-relchip { border: 1px solid var(--accent-gold-soft); background: #fbf6ee; border-radius: 999px; padding: 0.18rem 0.6rem; font: inherit; font-size: 0.78rem; color: var(--accent); cursor: pointer; }
.w-relchip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.w-relchip-more { font-size: 0.75rem; color: #8a7358; }

/* First Schedule (Limitation periods) table */
.w-sch-wrap { overflow-x: auto; }
.w-sch-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.w-sch-table th { position: sticky; top: 0; background: var(--accent); color: #fff; text-align: left; padding: 0.45rem 0.6rem; font-size: 0.8rem; vertical-align: top; }
.w-sch-table td { padding: 0.5rem 0.6rem; border-top: 1px solid var(--accent-gold-soft); vertical-align: top; line-height: 1.5; }
.w-sch-row:nth-child(even) td { background: #fbf6ee; }
.w-sch-art { font-weight: 700; color: var(--accent); white-space: nowrap; }
.w-sch-period { font-weight: 700; color: var(--accent-deep); white-space: nowrap; }
.w-sch-table .w-bil > .en { margin-top: 0.15rem; }

/* ---- Answer Practice (AI-evaluated diagnostic feedback) ---- */
/* .w-eval-disclosure was removed 2026-07-15 with the grader disclosure it
   styled (founder's call). .w-eval-micnote below is the dictation notice and
   is unrelated — it stays. */

/* Practise invitation on a topic page — sits between the exam question and the
   model answer, so it reads as "try this first" rather than "now check". */
.w-eval-cta { margin: 0.9rem 0 1.1rem; }
.w-eval-cta-pitch {
  background: #fbf4e9; border-left: 4px solid var(--accent-gold); border-radius: 4px;
  padding: 0.6rem 0.8rem; font-size: 0.88rem; line-height: 1.55;
}
.w-eval-cta-btn { margin-top: 0.5rem; }
.w-eval-cta-spent .w-eval-cta-pitch { opacity: 0.75; }
.w-eval-cta-note { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* Row tag on the law page: advertises that a topic is practisable. Not a button —
   the whole row already navigates to the topic. */
.w-practise-tag {
  flex: none; font-size: 0.68rem; font-weight: 700; white-space: nowrap;
  padding: 0.1rem 0.45rem; border-radius: 10px;
  background: var(--accent-gold-soft); color: var(--accent-deep);
}
.w-practise-tag-done { background: transparent; color: var(--muted); font-weight: 600; }

/* One-time home introduction. Dismissible; disappears for good once practised. */
.w-eval-intro { position: relative; border-left: 5px solid var(--accent-gold); }
.w-eval-intro-p { margin: 0.2rem 0 0.7rem; font-size: 0.9rem; line-height: 1.6; }
.w-eval-intro-x {
  position: absolute; top: 0.5rem; right: 0.6rem; border: none; background: none;
  font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0.1rem 0.3rem;
}
.w-eval-intro-x:hover { color: var(--accent); }

.w-eval-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em;
  padding: 0.1rem 0.55rem; border-radius: 10px; background: var(--accent-gold); color: #fff; margin-bottom: 0.35rem;
}
.w-eval-langrow { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0.9rem 0 0.3rem; }
.w-eval-lang { display: inline-flex; gap: 0.35rem; }
.w-mic-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--accent-gold); background: #fff; color: var(--accent, #5c2f10);
  border-radius: 999px; padding: 0.34rem 0.85rem;
  font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; flex: none;
}
.w-mic-svg { width: 1rem; height: 1rem; fill: currentColor; flex: none; }
.w-mic-label { display: inline-flex; align-items: center; gap: 0.35rem; }
.w-mic-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #e53935;
  display: inline-block; flex: none; animation: wMicBlink 1s ease-in-out infinite;
}
@keyframes wMicBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.w-mic-btn:disabled { opacity: 0.4; cursor: default; }
.w-mic-btn.w-mic-on {
  background: var(--accent, #5c2f10); color: #fff; border-color: var(--accent, #5c2f10);
  animation: wMicPulse 1.4s ease-in-out infinite;
}
@keyframes wMicPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(176,133,80,0.5); } 50% { box-shadow: 0 0 0 8px rgba(176,133,80,0); } }
.w-eval-interim { display: block; min-height: 1.2em; font-style: italic; color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0; }
.w-eval-micnote { background: #fbf4e9; border-left: 4px solid var(--accent-gold); border-radius: 4px; padding: 0.6rem 0.8rem; margin: 0.4rem 0; font-size: 0.85rem; }
.w-eval-micnote p { margin: 0 0 0.5rem; }
.w-eval-textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.95rem; line-height: 1.55;
  min-height: 260px; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: inherit; resize: vertical;
}
.w-eval-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-gold-soft); }
.w-eval-textarea:disabled { background: #f3ece0; color: var(--muted); }
.w-eval-countrow { display: flex; justify-content: flex-end; margin: 0.3rem 0 0.6rem; }
.w-eval-count { font-size: 0.78rem; color: var(--muted); }
.w-eval-error { background: #fbeaea; border-left: 4px solid #c0392b; color: #7a2418; border-radius: 4px; padding: 0.55rem 0.8rem; margin: 0.4rem 0; font-size: 0.87rem; }
.w-eval-submitrow { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.6rem; }
.w-eval-spinner { font-size: 0.82rem; color: var(--muted); }
.w-eval-quota { font-size: 0.82rem; color: var(--muted); margin: 0.3rem 0 0.6rem; min-height: 1em; }

/* result screen */
.w-eval-offtopic { background: #fbeaea; border-left: 4px solid #c0392b; border-radius: 4px; padding: 0.6rem 0.9rem; margin: 0.5rem 0 0.8rem; font-size: 0.9rem; }
.w-eval-range { font-size: 1.7rem; font-weight: 800; color: var(--accent); text-align: center; margin: 0.4rem 0 0.9rem; }
.w-eval-range-max { font-size: 1rem; font-weight: 600; color: var(--muted); }
/* Feedback-language mismatch note: the AI feedback is stored in one language
   (the submission chip), so surface an explanation ONLY when the UI is locked
   to the other language. -bn = feedback in Bangla (note shows in English-only
   UI); -en = feedback in English (note shows in Bangla-only UI). In "Both"
   mode nothing is hidden, so no note. */
.w-eval-langnote { display: none; font-size: 0.83rem; margin: -0.3rem 0 0.8rem; text-align: center; }
body.lang-en-only .w-eval-langnote-bn { display: block; }
body.lang-bn-only .w-eval-langnote-en { display: block; }
.w-eval-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.6rem; margin-bottom: 0.9rem; }
.w-eval-dim { border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.75rem; background: #fff; }
.w-eval-dim-h { font-size: 0.78rem; font-weight: 700; color: var(--accent-gold); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.3rem; }
.w-eval-dots { display: flex; gap: 3px; margin-bottom: 0.3rem; }
.w-band-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--border); display: inline-block; }
.w-band-dot-on { background: var(--accent-gold); }
.w-eval-rationale { font-size: 0.83rem; color: var(--muted); margin: 0; line-height: 1.45; }
.w-eval-cov-list { list-style: none; padding: 0; margin: 0.4rem 0 1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.w-eval-cov { display: flex; gap: 0.55rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 7px; padding: 0.5rem 0.7rem; }
.w-eval-cov-icon { font-weight: 800; flex: none; width: 1.1rem; text-align: center; }
.w-eval-cov-covered .w-eval-cov-icon { color: #2f7d32; }
.w-eval-cov-partial .w-eval-cov-icon { color: var(--accent-gold); }
.w-eval-cov-missed .w-eval-cov-icon { color: #c0392b; }
.w-eval-cov-main { flex: 1; min-width: 0; }
.w-eval-quote { display: block; font-style: italic; color: var(--muted); font-size: 0.83rem; margin-top: 0.2rem; }
.w-eval-list { padding-left: 1.2rem; line-height: 1.6; }
.w-eval-improve { background: #fbf4e9; border-left: 4px solid var(--accent-gold); border-radius: 4px; padding: 0.7rem 0.9rem; margin: 0.4rem 0 0.8rem; }
.w-eval-improve-point { font-weight: 700; margin-bottom: 0.35rem; }
.w-eval-pointer { margin: 0.25rem 0; font-size: 0.9rem; }
.w-eval-statement { margin: 0.4rem 0 0; font-size: 0.9rem; }
.w-eval-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.w-eval-hist-chip { flex: none; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 10px; background: var(--accent-gold-soft); color: var(--accent-deep); white-space: nowrap; }
.w-eval-hist-chip-fail { background: #eee; color: var(--muted); }
.w-topic-row-static { cursor: default; }
.w-topic-row-static:hover { border-color: var(--border); background: #fff; }

/* ---- Mock Exam (timed full-paper sitting) ---- */
/* The sitting (mockPaper) is deliberately austere: a clock bar, the paper,
   the finish control. The review (mockDebrief) reuses the Answer Practice
   editor styles; only its mock-specific chrome lives here. */
.w-mock-clockbar {
  position: sticky; top: var(--topbar-h, 64px); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
  background: var(--bg, #faf6ed); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.5rem 0.9rem; margin-bottom: 0.9rem;
  box-shadow: 0 2px 8px rgba(60, 35, 12, 0.07);
}
.w-mock-clock { font-size: 1.35rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.w-mock-clockwrap.warn .w-mock-clock, .w-mock-clockwrap.warn .w-mock-clock-el { color: var(--accent-gold); }
.w-mock-clockwrap.danger .w-mock-clock, .w-mock-clockwrap.danger .w-mock-clock-el { color: #c0392b; }
.w-mock-clockbar.danger { border-color: #c0392b; }

/* Floating countdown pill — the running mock follows the candidate everywhere. */
.w-mock-pill {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 30;
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--accent); background: var(--accent, #5c2f10); color: #fff;
  border-radius: 999px; padding: 0.45rem 0.95rem;
  font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 10px rgba(60, 35, 12, 0.3);
  font-variant-numeric: tabular-nums;
}
.w-mock-pill.warn { background: var(--accent-gold); border-color: var(--accent-gold); }
.w-mock-pill.danger, .w-mock-pill-done { background: #a83226; border-color: #a83226; }
.w-mock-pill .w-mock-clock-el { color: inherit; }

/* Paper + review question cards */
.w-mock-gh { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 0.15rem; }
.w-mock-gcode { font-size: 1.05rem; font-weight: 800; color: var(--accent); }
.w-mock-glabel { font-weight: 700; }
.w-mock-ginstr { margin: 0.1rem 0 0.7rem; font-size: 0.88rem; color: var(--muted); }
.w-mock-target { margin: 0.1rem 0 0.7rem; font-size: 0.85rem; color: var(--muted); }
.w-mock-whichq { margin: 0.2rem 0 0.6rem; font-size: 0.9rem; font-weight: 700; color: var(--accent-deep); }
.w-mock-q {
  border: 1px solid var(--border); border-radius: 9px; background: #fff;
  padding: 0.65rem 0.8rem; margin-bottom: 0.65rem;
}
.w-mock-q-chosen { border-color: var(--accent-gold); box-shadow: 0 0 0 1px var(--accent-gold); }
.w-mock-unchosen { opacity: 0.65; }
.w-mock-q-top { display: flex; align-items: center; gap: 0.6rem; }
.w-mock-q-n {
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--accent-gold-soft); color: var(--accent-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 800;
}
.w-mock-q-title { flex: 1; min-width: 0; font-weight: 700; line-height: 1.4; }
.w-mock-choose { flex: none; white-space: nowrap; }
.w-mock-qtext { margin-top: 0.45rem; }
.w-mock-qtext summary { cursor: pointer; font-size: 0.82rem; font-weight: 700; color: var(--accent-gold); }
.w-mock-qtext .w-qtext { margin-top: 0.4rem; line-height: 1.65; }
.w-mock-nospec { font-size: 0.85rem; margin: 0.5rem 0 0; }

/* Review: the answer entry + verdict chrome */
.w-mock-editor { margin-top: 0.6rem; border-top: 1px dashed var(--border); padding-top: 0.6rem; }
.w-mock-open { margin-top: 0.55rem; }
/* Dictation leads in the review — the mic is the big obvious action, typing is
   the quiet fallback below it. */
.w-mock-mic-primary {
  width: 100%; justify-content: center; font-size: 1rem; padding: 0.65rem 1rem; margin: 0.35rem 0 0.5rem;
}
.w-mock-close { margin: 0; }
.w-mock-vrow { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.55rem; }
.w-mock-vchip {
  flex: none; font-size: 0.95rem; font-weight: 800; padding: 0.25rem 0.75rem; border-radius: 12px;
  background: var(--accent-gold-soft); color: var(--accent-deep); white-space: nowrap;
}
.w-mock-transition { font-weight: 700; margin: 0.3rem 0 0.5rem; line-height: 1.55; }
.w-mock-ginstr-done { color: #2f7d32; font-weight: 700; }
.w-mock-finishnote { font-size: 0.83rem; color: var(--muted); margin: 0.1rem 0 0; line-height: 1.5; }
.w-mock-finish:disabled { opacity: 0.45; cursor: default; }
.w-mock-howlink { display: inline-block; margin: 0.6rem 0 0.1rem; font-weight: 700; }
.w-mock-how-step {
  display: flex; align-items: flex-start; gap: 0.6rem;
  border: 1px solid var(--border); border-radius: 9px; background: #fff;
  padding: 0.6rem 0.8rem; margin-bottom: 0.55rem; line-height: 1.6;
}
.w-mock-how-step .w-mock-q-n { margin-top: 0.1rem; }
.w-mock-how-icon { flex: none; font-size: 1.1rem; margin-top: 0.05rem; }
.w-mock-how-text { flex: 1; min-width: 0; font-size: 0.92rem; }
.w-mock-stance { font-size: 0.85rem; }
.w-mock-ritual { line-height: 1.65; }
.w-mock-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; margin: 0.9rem 0 0.4rem; }
.w-mock-start { font-size: 1rem; }
.w-mock-armed { background: #a83226 !important; border-color: #a83226 !important; color: #fff !important; }
.w-mock-danger-link { color: #a83226; }
.w-mock-finish { flex: none; white-space: nowrap; }

/* Mock landing = the paper chooser: year tiles + the assembled-paper tile,
   with structure/rules behind a collapsed disclosure. */
.w-mock-pickline { margin: 0.5rem 0 0.2rem; }
.w-mock-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin-top: 0.7rem; }
.w-mock-yearbtn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem;
  border: 2px solid var(--border); border-radius: 8px; background: #fff;
  padding: 0.65rem 0.8rem; cursor: pointer; font: inherit; text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.w-mock-yearbtn:hover { border-color: var(--accent); background: #fdf7ee; }
.w-mock-yearnum { font-size: 1.35rem; font-weight: 700; color: var(--accent); }
.w-mock-yearmeta { font-size: 0.8rem; color: var(--muted); }
.w-mock-yearhead { font-weight: 700; color: var(--accent); margin: 0.8rem 0 0.5rem; }
.w-mock-freshbtn { border-left: 4px solid var(--accent-gold); }
.w-mock-savednote { margin: 0.4rem 0 0; font-size: 0.85rem; }
/* Home: the Mock Exam's elevated full-width banner above the drill grid */
.w-mock-banner {
  display: flex; align-items: center; gap: 0.9rem; width: 100%;
  background: #fff; border: 2px solid var(--accent-gold); border-radius: 10px;
  padding: 0.9rem 1.1rem; margin: 0 0 1rem; cursor: pointer; font: inherit;
  text-align: left; transition: border-color 0.15s, background 0.15s;
}
.w-mock-banner:hover { border-color: var(--accent); background: #fdf7ee; }
/* Home: the Last-20-Days plan banner — same elevated shape, brown accent so the
   two banners read as siblings, not duplicates */
.w-plan-banner { border-color: var(--accent); background: #fdf9f2; }
.w-plan-banner:hover { border-color: var(--accent-gold); background: #fff; }
/* The plan view: dense chip rows (topic/draft deep links + the years evidence).
   The chips are the plan's whole navigation — style them as obvious buttons,
   not passive tags: raised, gold-edged, with a trailing chevron affordance. */
.w-plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.3rem 0; }
.w-plan-row .w-chip {
  font: inherit; font-size: 0.86rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: linear-gradient(180deg, #fffefb, #f7eedf);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 1px 2px rgba(92, 47, 16, 0.14);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.w-plan-row .w-chip::after { content: "›"; color: var(--accent-gold); font-weight: 700; }
.w-plan-row .w-chip:hover {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 2px 6px rgba(92, 47, 16, 0.2); transform: translateY(-1px);
}
.w-plan-row .w-chip:active { transform: none; box-shadow: 0 1px 2px rgba(92, 47, 16, 0.14); }
/* demo: locked plan chips — blurred identity, dashed edge, no chevron; still
   tappable (lands on the topic's unlock card) */
.w-plan-row .w-chip-lock { background: #f6f1e8; border-style: dashed; border-color: #cbb391; box-shadow: none; font-weight: 500; }
.w-plan-row .w-chip-lock::after { content: none; }
.w-plan-row .w-chip-lock:hover { background: #f6f1e8; border-color: var(--accent-gold); transform: none; box-shadow: none; }
.w-plan-yrs { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.w-plan table td:first-child { white-space: nowrap; }
/* Last 7 Days: finite day cards with per-item completion ticks. */
.w-p7-days { font-weight: 700; color: var(--accent); margin: -0.2rem 0 0.6rem; }
.w-p7-day.w-p7-complete { border-color: #3f7d3f; background: #f9fcf7; }
.w-p7-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.w-p7-daynum { font-size: 1.05rem; font-weight: 800; color: var(--accent); white-space: nowrap; }
.w-p7-theme { font-weight: 700; }
.w-p7-today {
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; padding: 0.14rem 0.6rem; white-space: nowrap;
}
.w-p7-prog { margin-left: auto; font-size: 0.84rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.w-p7-complete .w-p7-prog { color: #2f6330; }
.w-p7-sub { margin: 0.15rem 0 0.5rem; }
.w-p7-item { gap: 0.55rem; flex-wrap: nowrap; }
.w-p7-item .w-chip { flex-wrap: wrap; text-align: left; }
.w-p7-tick {
  flex: 0 0 auto; width: 1.55rem; height: 1.55rem; border-radius: 6px;
  border: 2px solid var(--accent-gold); background: #fff; cursor: pointer;
  font: inherit; font-size: 0.95rem; font-weight: 800; color: #2f6330;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.w-p7-tick:hover { border-color: var(--accent); background: #fdf7ee; }
.w-p7-tick-off { cursor: default; opacity: 0.45; }
.w-p7-done .w-p7-tick { background: #eaf5e6; border-color: #3f7d3f; }
.w-p7-done .w-chip, .w-p7-done .w-p7-task { opacity: 0.62; }
.w-p7-task { font-size: 0.9rem; }
.w-p7-donebar {
  margin-top: 0.5rem; padding: 0.45rem 0.8rem; border-radius: 8px;
  background: #eaf5e6; color: #2f6330; font-weight: 700; text-align: center;
}
.w-p7-morning { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.w-p7-morning li { margin: 0.35rem 0; }
/* Study Hacks: a gold-edged collapsible so the method advice reads as one
   tucked-away toolbox, not five more days of content. */
.w-p7-secret { border: 2px solid var(--accent-gold); background: #fdf9f2; }
.w-p7-secret > summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 0.15rem 0; }
.w-p7-secret[open] > summary { margin-bottom: 0.4rem; }
.w-p7-hack { border-top: 1px solid #ecdfc8; padding: 0.55rem 0 0.25rem; }
.w-p7-hack h4 { color: var(--accent); margin: 0 0 0.3rem; }
.w-p7-hack p { margin: 0.35rem 0; }
.w-p7-hack a { color: var(--accent); font-weight: 600; }
.w-mock-banner-icon { font-size: 1.7rem; flex: none; }
.w-mock-banner .w-mode-text { flex: 1; min-width: 0; }
.w-mock-details { margin-top: 1rem; }
.w-mock-details > summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 0.2rem 0; }
.w-mock-details[open] > summary { margin-bottom: 0.5rem; }

@media (max-width: 560px) {
  .w-mock-clock { font-size: 1.15rem; }
  .w-mock-pill { bottom: 0.7rem; right: 0.7rem; font-size: 0.8rem; padding: 0.4rem 0.8rem; }
  .w-mock-q-top { flex-wrap: wrap; }
  .w-mock-choose { margin-left: auto; }
}

@media (max-width: 560px) {
  .w-wrap { padding: 0.9rem; }
  .w-skel { font-size: 0.68rem; }
  .w-draft .dp { padding-left: 18%; }
  .w-draft .djurat { padding-left: 10%; }
  .w-mode-grid { grid-template-columns: 1fr; }
  .w-sd-big { font-size: 1.15rem; }
  .w-toc-grid { grid-template-columns: 1fr; }
  /* Compact topbar: small logo + one dense meta row (hub · user · language)
     instead of three tall rows — statute text starts a screen earlier. */
  .topbar { padding: 0.35rem 0.8rem 0.45rem; row-gap: 0.1rem; }
  .brand-topbar-logo { height: 42px; }
  .topbar-meta { width: 100%; justify-content: space-between; gap: 0.3rem 0.55rem; font-size: 0.78rem; }
  .user-info { font-size: 0.78rem; }
  .user-info .link-btn { font-size: 0.78rem; padding: 0.1rem 0.35rem; }
  #lang-toggle-wrap { font-size: 0; }   /* hides the "Language:" label text */
  #lang-toggle-wrap .lang-btn { font-size: 0.75rem; padding: 0.16rem 0.42rem; margin-left: 0.2rem; }
  .w-topbar-link { font-size: 0.78rem; }
  .w-keybar { padding: 0.35rem 0.5rem; gap: 0.4rem; }
}

/* ---- Demo mode (?demo=1) banner — honest counts + one upgrade path ------ */
.w-demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  background: #f6ead2;
  border: 1px solid var(--accent-gold, #b08550);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.w-demo-banner-text { color: #3d1d08; font-weight: 600; }
.w-demo-banner-cta {
  background: var(--accent, #5c2f10);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.w-demo-banner-cta:hover { opacity: 0.92; }

/* Locked-but-visible demo items: the full catalogue shows on every list, the
   locked rows sit faded and their identities blurred — the count is the sell,
   the high-yield map (topic AND draft titles) is the product. Locked rows open
   an unlock card only; no teaser, no question, no section numbers. */
.w-demo .w-topic-row.w-locked { opacity: 0.55; }
.w-demo .w-topic-row.w-locked:hover { opacity: 0.85; }
.w-demo-blur {
  filter: blur(4.5px);
  user-select: none;
  -webkit-user-select: none;
}

/* The teaser body: truncated content fading out into the unlock card. */
.w-demo-teaser { position: relative; overflow: hidden; }
.w-demo-teaser-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--card, #ffffff) 90%);
  pointer-events: none;
}
.w-demo-unlock {
  border: 1px solid var(--accent-gold, #b08550);
  background: #f6ead2;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 0.2rem 0 1rem;
  text-align: center;
}
.w-demo-unlock-head { margin: 0 0 0.35rem; font-weight: 700; color: #3d1d08; }
.w-demo-unlock-sub { margin: 0 0 0.7rem; font-size: 0.88rem; color: #5a4632; }
.w-demo-unlock .primary-btn { display: inline-block; text-decoration: none; }

/* Compact demo chip: every view past the home front door gets one line, not the
   full honest-counts card (locked views get nothing — the unlock card pitches). */
.w-demo-banner-mini {
  display: block;
  text-align: center;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3d1d08;
  text-decoration: none;
}
.w-demo-banner-mini:hover { background: #f2e2c2; }

/* One-line explainer above a list that contains locked (blurred) rows. */
.w-lock-note { font-size: 0.82rem; color: #6b573f; margin: -0.2rem 0 0.5rem; }

/* Demo home: the three recall drills collapse to a compact chip row. */
.w-drill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.7rem; }
.w-drill-lbl { font-size: 0.82rem; color: #6b573f; font-weight: 600; }

/* Demo guided tour: the one obvious first tap on the demo home. */
.w-tour-steps { display: flex; flex-direction: column; gap: 0.5rem; }
.w-tour-step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  background: var(--card, #fff);
  border: 1px solid #e6d9c2;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.w-tour-step:hover { border-color: var(--accent-gold, #b08550); background: #faf4e6; }
.w-tour-n {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent, #5c2f10);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.w-tour-done { opacity: 0.72; }
.w-tour-done .w-tour-n { background: #2e7d32; }
.w-tour-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.1rem; }
.w-tour-t { font-weight: 700; color: #3d1d08; }
.w-tour-s { font-size: 0.82rem; color: #6b573f; }
.w-tour-go { flex: 0 0 auto; color: var(--accent-gold, #b08550); font-weight: 700; }
.w-tour-count { font-size: 0.78rem; color: #6b573f; font-weight: 600; margin-left: 0.45rem; }
