/* 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; }

@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; }
}
