/* v2.24 the Islamic Library, the new Deen home, the Simrah place, the Coding Studio layout and lessons in depth.
   Built on the app's tokens (app.css), so light, dark and skins apply. */

/* ---------- Islamic Library ---------- */
.lb-main { --lb-gold: #c9a227; --lb-ink: #0b2a24; padding-bottom: 40px; }
.lb-main > *, .lb-shelf, .lb-row { min-width: 0; }
.lb-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 30px 22px 22px; margin-bottom: 14px; color: #fff; background: radial-gradient(130% 120% at 100% 0%, #1d6b5c 0%, #0b3b32 45%, #071f1b 100%); }
.lb-hero-pattern { position: absolute; inset: 0; opacity: .14; background-image: radial-gradient(circle at 20px 20px, #e0b44c 2px, transparent 2.5px), linear-gradient(45deg, transparent 46%, rgba(224,180,76,.6) 47%, rgba(224,180,76,.6) 53%, transparent 54%), linear-gradient(-45deg, transparent 46%, rgba(224,180,76,.6) 47%, rgba(224,180,76,.6) 53%, transparent 54%); background-size: 40px 40px; pointer-events: none; }
.lb-hero > * { position: relative; }
.lb-hero-ar { margin: 0 0 2px; font-family: "Simrah Amiri Quran", "Amiri Quran", "Scheherazade New", serif; font-size: 30px; color: var(--lb-gold, #c9a227); line-height: 1.6; }
.lb-hero h1 { margin: 0 0 6px; font-size: clamp(26px, 4.4vw, 40px); letter-spacing: -.01em; }
.lb-hero p { margin: 0 0 14px; max-width: 640px; opacity: .9; }
.lb-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.lb-stats span { display: grid; padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(224,180,76,.35); }
.lb-stats b { font-size: 20px; } .lb-stats small { opacity: .8; font-size: 12px; }
.lb-search { width: 100%; background: rgba(255,255,255,.96); color: #0b2a24; border: 0; }
.lb-results { margin: 6px 0 14px; display: grid; gap: 10px; }
.lb-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.lb-chip { flex: none; display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.lb-chip svg { width: 16px; height: 16px; } .lb-chip.on { border-color: var(--lb-gold, #c9a227); background: #fbf4df; color: #5b4510; }
.lb-shelf { margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.lb-shelf.compact { margin: 10px 0; border: 0; }
.lb-shelf-h { display: flex; align-items: center; gap: 10px; }
.lb-shelf-h h2 { margin: 0; font-size: 18px; } .lb-shelf-ar { color: var(--muted); font-size: 13px; }
.lb-shelf-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--s1, #0b6b4f), var(--s2, #123b2f)); }
.lb-shelf-ic.big { width: 58px; height: 58px; border-radius: 16px; } .lb-shelf-ic svg { width: 20px; height: 20px; }
.tone-emerald { --s1: #0b6b4f; --s2: #123b2f; } .tone-gold { --s1: #b8901f; --s2: #5b4510; } .tone-teal { --s1: #0e7c86; --s2: #0b3236; } .tone-blue { --s1: #1f6fb2; --s2: #0d2340; } .tone-rose { --s1: #b4466b; --s2: #3b1121; } .tone-violet { --s1: #6a4fc4; --s2: #24163f; }
.lb-more { display: inline-flex; align-items: center; gap: 2px; color: var(--primary); font-weight: 700; text-decoration: none; font-size: 14px; } .lb-more svg { width: 16px; height: 16px; }
.lb-shelf-blurb { margin: 6px 0 10px; color: var(--muted); font-size: 14px; }
.lb-row { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 10px 0 16px; }
/* A book: a cover with a spine, an ornament, the Arabic title and the English title. */
.lb-book { scroll-snap-align: start; position: relative; display: grid; gap: 8px; color: var(--text); text-decoration: none; }
.lb-cover { position: relative; aspect-ratio: 3 / 4.2; border-radius: 6px 12px 12px 6px; padding: 16px 12px 12px 18px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 10px 22px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.08); transition: transform .18s ease, box-shadow .18s ease; }
.lb-book:hover .lb-cover, .lb-book:focus-visible .lb-cover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 16px 30px rgba(0,0,0,.24); }
.lb-spine { position: absolute; z-index: 1; left: 0; top: 0; width: 8px; aspect-ratio: auto; height: calc(100% - 0px); border-radius: 6px 0 0 6px; }
.lb-cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.08)); }
.lb-orn { position: absolute; inset: 10px 10px 10px 16px; border: 1px solid rgba(224,180,76,.55); border-radius: 4px 8px 8px 4px; pointer-events: none; }
.lb-orn::after { content: ""; position: absolute; left: 50%; top: 44%; width: 46px; height: 46px; transform: translate(-50%, -50%) rotate(45deg); border: 1px solid rgba(224,180,76,.45); }
.lb-ar { position: relative; z-index: 1; font-family: "Simrah Amiri Quran", "Amiri Quran", "Scheherazade New", serif; font-size: 21px; line-height: 1.5; color: #f3d98c; text-align: center; margin-top: 18%; }
.lb-ar svg { width: 30px; height: 30px; color: #f3d98c; }
.lb-title { position: relative; z-index: 1; font-size: 13px; line-height: 1.3; text-align: center; }
.lb-meta { display: grid; gap: 1px; } .lb-meta small { font-size: 12px; line-height: 1.35; color: var(--muted); } .lb-meta .lb-kind { color: #9a7417; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 10.5px; }
.lb-book.kind-tafsir .lb-cover { background: linear-gradient(160deg, #8a6a12, #2f2306); }
.lb-book.kind-topic .lb-cover { background: linear-gradient(160deg, var(--c1), #0b1b2a); }
.lb-vrow { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 12px; overflow-x: auto; padding: 2px 2px 12px; }
.lb-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 10px 0 16px; }
.lb-video { display: grid; gap: 6px; color: var(--text); text-decoration: none; } .lb-video b { font-size: 14px; line-height: 1.3; } .lb-video small { color: var(--muted); font-size: 12px; }
.lb-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; } .lb-play { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; } .lb-play svg { width: 18px; height: 18px; }
.lb-vmore { align-self: center; justify-self: start; display: inline-flex; gap: 4px; align-items: center; font-weight: 700; color: var(--primary); text-decoration: none; }
.lb-tabs { margin: 8px 0; }
.lb-shelf-hero { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: 24px; margin-bottom: 12px; color: #fff; background: linear-gradient(135deg, var(--s1, #0b6b4f), var(--s2, #123b2f)); }
.lb-shelf-hero h1 { margin: 0 0 4px; font-size: clamp(22px, 4vw, 32px); } .lb-shelf-hero p { margin: 0; opacity: .9; } .lb-shelf-hero .lb-hero-ar { color: #f3d98c; font-size: 22px; }
.lb-shelf-hero .lb-shelf-ic { background: rgba(255,255,255,.14); }
.lb-book-hero { text-align: center; padding: 26px 18px; border-radius: 24px; margin-bottom: 14px; background: linear-gradient(180deg, #fbf6e6, var(--surface)); border: 1px solid #ecdfb5; }
[data-theme="dark"] .lb-book-hero { background: linear-gradient(180deg, #2a2412, var(--surface)); border-color: #4a3f1c; }
.lb-book-hero h1 { margin: 0 0 6px; font-size: clamp(22px, 4vw, 32px); } .lb-book-hero p { margin: 0 auto 8px; max-width: 560px; color: var(--muted); } .lb-book-hero small { color: var(--muted); }
.lb-col { margin: 12px 0; }
.lb-chapters, .lb-for-list { display: grid; gap: 6px; }
.lb-chap { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.lb-chap b { font-size: 14.5px; } .lb-chap small { grid-column: 1; color: var(--muted); font-size: 12.5px; } .lb-chap svg { grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; color: var(--muted); }
.lb-chap:hover { border-color: var(--lb-gold, #c9a227); }
.lb-surahs { display: grid; gap: 6px; margin-top: 10px; }
.lb-surah { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.lb-surah b { display: block; } .lb-surah small { color: var(--muted); } .lb-surah-ar { font-family: "Simrah Amiri Quran", "Amiri Quran", serif; font-size: 20px; color: #9a7417; }
.lb-surah-n { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fbf4df; color: #5b4510; font-weight: 700; font-size: 13px; transform: rotate(45deg); } .lb-surah-n > * { transform: rotate(-45deg); }
.lb-tafsir { display: grid; gap: 14px; margin: 12px 0 20px; }
.lb-tafsir-sec { padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); font-family: var(--read); font-size: 17px; line-height: 1.75; }
.lb-tafsir-ref { display: inline-block; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; background: #fbf4df; color: #5b4510; font: 700 12px var(--font); text-decoration: none; }
.lb-tafsir-text h4 { font: 700 16px var(--font); margin: 12px 0 6px; color: var(--primary-2); } .lb-tafsir-text p { margin: 0 0 10px; }
[data-theme="dark"] .lb-tafsir-text h4 { color: #e0b44c; }
.lb-for { margin-top: 16px; display: grid; gap: 10px; border-color: #ecdfb5; background: linear-gradient(180deg, #fffaf0, var(--surface)); }
[data-theme="dark"] .lb-for { background: var(--surface); border-color: #4a3f1c; }
.lb-for-h { display: flex; gap: 10px; align-items: center; } .lb-for-h > svg { width: 24px; height: 24px; color: #9a7417; } .lb-for-h b { display: block; } .lb-for-h small { color: var(--muted); }
@media (max-width: 520px) { .lb-row { grid-auto-columns: 128px; gap: 12px; } .lb-ar { font-size: 18px; } .lb-hero { padding: 24px 16px 18px; } .lb-vrow { grid-auto-columns: 200px; } }

/* ---------- The Deen home ---------- */
.dn3 { --dn3-gold: #c9a227; }
.dn3-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.dn3-salam { margin: 0; font-family: "Simrah Amiri Quran", "Amiri Quran", serif; font-size: 22px; color: #9a7417; line-height: 1.6; }
.dn3-head h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); letter-spacing: -.01em; } .dn3-sub { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.dn3-quran-btn { flex: none; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0b6b4f, #123b2f); box-shadow: 0 8px 18px rgba(11,107,79,.3); }
.dn3-quran-btn svg { width: 26px; height: 26px; }
.dn3 .dn-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); position: sticky; top: calc(var(--nav-h, 64px) + 2px); z-index: 6; padding: 5px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); }
.dn3-doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.dn3-door { display: grid; gap: 4px; align-content: start; padding: 14px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.dn3-door:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dn3-door b { font-size: 14.5px; line-height: 1.25; } .dn3-door small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.dn3-door-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--s1), var(--s2)); margin-bottom: 4px; } .dn3-door-ic svg { width: 22px; height: 22px; }
.dn3-lib-hero { position: relative; display: grid; gap: 4px; padding: 22px; border-radius: 24px; color: #fff; text-decoration: none; background: radial-gradient(130% 120% at 100% 0%, #1d6b5c 0%, #0b3b32 50%, #071f1b 100%); }
.dn3 a.dn3-lib-hero, .dn3 a.dn3-lib-hero:hover, .dn3 a.dn3-lib-hero * { text-decoration: none; }
.dn3-lib-hero b { font-size: 22px; } .dn3-lib-hero small { opacity: .85; } .dn3-lib-go { display: inline-flex; gap: 4px; align-items: center; margin-top: 8px; font-weight: 700; color: #f3d98c; } .dn3-lib-go svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .dn3-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dn3-door { padding: 12px; } }

/* ---------- The Simrah place ---------- */
.st-search { margin-top: 14px; max-width: 520px; background: rgba(255,255,255,.95); border: 0; color: #0b1b33; }
.st-sections { display: grid; gap: 22px; margin-top: 6px; }
.st-section-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; } .st-section-h h2 { margin: 0; font-size: 20px; } .st-section-h small { color: var(--muted); }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.st-tile { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.st-tile:hover { transform: translateY(-1px); border-color: var(--g1); }
.st-tile-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); } .st-tile-ic svg { width: 22px; height: 22px; }
.st-tile-tx { flex: 1; min-width: 0; } .st-tile-tx b { display: block; } .st-tile-tx small { color: var(--muted); font-size: 12.5px; line-height: 1.35; display: block; }
.st-tile > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }

/* ---------- Coding Studio (v2.24 layout) ---------- */
.cs2 .cs2-head h1 { margin: 2px 0; font-size: clamp(20px, 3vw, 26px); } .cs2 .cs2-head p { margin: 0 0 8px; }
.cs2-bar { position: sticky; top: calc(var(--nav-h, 64px) + 2px); z-index: 8; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; margin-bottom: 10px; border-radius: 16px; background: var(--cs-bg, #0f172a); color: var(--cs-tx, #e5edf9); border: 1px solid var(--cs-line, #24324d); }
.cs2-bar .input, .cs2-bar select { background: #0b1325; color: var(--cs-tx, #e5edf9); border-color: var(--cs-line, #24324d); padding: 8px 10px; max-width: 220px; }
.cs2-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; } .cs2-logo svg { width: 18px; height: 18px; }
.cs2-run { background: #16a34a !important; color: #fff !important; } .cs2-run svg { width: 16px; height: 16px; }
.cs2-bar .btn.soft, .cs2-bar summary.btn { background: #16223b; color: var(--cs-tx, #e5edf9); border: 1px solid var(--cs-line, #24324d); }
.cs2-bar .btn[aria-pressed="true"] { background: #4f46e5; color: #fff; }
.cs2-more { position: relative; } .cs2-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; } .cs2-more > summary::-webkit-details-marker { display: none; } .cs2-more > summary svg { width: 16px; height: 16px; }
.cs2-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .cs2-sep { width: 1px; height: 24px; background: var(--cs-line, #24324d); margin: 0 2px; } .cs2-font { display: inline-flex; gap: 4px; }
.cs2-ai-btn svg { width: 16px; height: 16px; }
@media (min-width: 901px) {
  .cs2-more > summary { display: none; }
  .cs2-more[open] .cs2-tools { display: flex; flex-wrap: nowrap; }
  .cs2-bar { flex-wrap: nowrap; }
  .cs2-more { flex: 1 1 auto; min-width: 0; } .cs2-tools { overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
  .cs2-bar > .btn, .cs2-ai-btn { flex: none; }
  .cs2-bar .cs2-tools select, .cs2-bar > select { width: auto; max-width: 150px; flex: 0 0 auto; }
  .cs2-tools .btn { flex: none; padding: 7px 10px; }
  .cs2-grid { grid-template-columns: 200px minmax(0, 1.2fr) minmax(0, 1fr) !important; grid-template-areas: "side code right" !important; height: calc(100vh - var(--nav-h, 64px) - 170px); min-height: 520px; align-items: stretch !important; }
  .cs2-grid.ai-on { grid-template-columns: 180px minmax(0, 1.1fr) minmax(0, .9fr) 340px !important; grid-template-areas: "side code right ai" !important; }
  .cs2-grid:not(.ai-on) .cs-aipane { display: none; }
  .cs2-grid .cs-codepane, .cs2-grid .cs-side, .cs2-grid .cs-aipane { display: flex; flex-direction: column; min-height: 0; }
  .cs2-grid .cs-ed { flex: 1; min-height: 0; overflow: auto; }
  .cs2-grid .cs-right { grid-template-rows: minmax(0, 1.6fr) minmax(0, 1fr); min-height: 0; }
  .cs2-grid .cs-prevpane, .cs2-grid .cs-conpane { display: flex; flex-direction: column; min-height: 0; } .cs2-grid .cs-frame-wrap, .cs2-grid .cs-console { flex: 1; min-height: 0; overflow: auto; }
  .cs2-grid .cs-aipane { overflow: auto; }
  .cs2 .cs-mtabs { display: none !important; }
}
@media (max-width: 1200px) and (min-width: 901px) { .cs2-grid.ai-on { grid-template-columns: 0 minmax(0, 1.2fr) minmax(0, .8fr) 320px !important; } .cs2-grid.ai-on .cs-side { display: none; } }
@media (max-width: 900px) {
  .cs2 .cs2-head p { display: none; }
  .cs2-bar { gap: 6px; } .cs2-bar > select { flex: 1 1 120px; max-width: none; }
  .cs2-ai-btn span, .cs2 .cs-spacer { display: none; }
  .cs2-more[open] { flex-basis: 100%; order: 9; } .cs2-more[open] > summary { margin-bottom: 8px; }
  .cs2-more[open] .cs2-tools { padding: 8px; border-radius: 12px; background: #0b1325; } .cs2-tools select { flex: 1 1 140px; max-width: none; } .cs2-sep { display: none; }
  .cs2 .cs-mtabs { position: sticky; bottom: calc(var(--nav-h, 64px) + 8px + env(safe-area-inset-bottom)); z-index: 7; margin-top: 8px; padding: 5px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .cs2 .cs-mtabs { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-right: 64px; }
  .cs2 .cs-mtabs button { min-height: 44px; min-width: 0; padding: 6px 4px; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cs2-grid .cs-side { display: none !important; }
  .cs2-grid .cs-ed { min-height: calc(100dvh - 330px); }
  .cs2-grid .cs-frame-wrap { min-height: calc(100dvh - 300px); }
  .cs2 .cs-note { margin-bottom: 70px; }
}

/* ---------- Lessons in depth (free encyclopedia) ---------- */
.lesson-deep { margin: 22px 0; padding: 18px; border-radius: 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, var(--surface)), var(--surface)); border: 1px solid var(--border); }
.lesson-deep-h { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; } .lesson-deep-h h3 { margin: 0; } .lesson-deep-h small { color: var(--muted); }
.lesson-deep-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); flex: none; } .lesson-deep-ic svg { width: 22px; height: 22px; }
.lesson-deep-sec { border-top: 1px solid var(--border); padding: 8px 0; } .lesson-deep-sec > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.lesson-deep-sec p { margin: 0 0 10px; line-height: 1.7; font-family: var(--read); font-size: 16.5px; }
.dg-figure.wiki img { display: block; width: 100%; max-height: 340px; object-fit: contain; background: #fff; border-radius: 10px; cursor: zoom-in; }
.dg-figure.wiki figcaption a { color: var(--muted); }

/* v2.25 hadith: the full Arabic in English */
.hb-full:empty { display: none; }
.hb-full { margin: 4px 0 8px; }
.hb-tr-note { margin: 0 0 6px; }
.hb-tr-btn svg, .hb-full-tr summary svg { width: 15px; height: 15px; }
.hb-full-tr { padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--dn-1, #0f766e) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--dn-1, #0f766e) 22%, transparent); }
.hb-full-tr summary { display: flex; gap: 6px; align-items: center; font-weight: 700; cursor: pointer; color: var(--dn-1, #0f766e); }
.hb-full-tr p { margin: 8px 0 0; }

/* v2.25 Coding Studio: layouts and a preview you can see */
.cs2-view { display: none; gap: 4px; flex: none; }
.cs2-view .btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; } .cs2-view svg { width: 15px; height: 15px; }
.cs2-full { margin-left: auto; } .cs2-full svg { width: 16px; height: 16px; }
.cs-frame-wrap { overflow: hidden !important; position: relative; }
.cs-prevpane:fullscreen, .cs-prevpane.cs2-pv-max { position: fixed; inset: 0; z-index: 9999; border-radius: 0; display: flex; flex-direction: column; background: var(--cs-bg, #0f172a); }
.cs-prevpane:fullscreen .cs-frame-wrap, .cs-prevpane.cs2-pv-max .cs-frame-wrap { flex: 1; min-height: 0; }
@media (min-width: 901px) {
  .cs2-view { display: inline-flex; }
  .cs2-grid { height: calc(100vh - var(--nav-h, 64px) - 150px); min-height: 560px; }
  .cs2-grid .cs-right { grid-template-rows: minmax(0, 2.4fr) minmax(0, .8fr) !important; }
  .cs2-grid[data-view="split"] { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.25fr) !important; }
  .cs2-grid[data-view="code"] { grid-template-columns: 190px minmax(0, 1.6fr) minmax(0, .8fr) !important; }
  .cs2-grid[data-view="preview"] { grid-template-columns: 0 minmax(0, .7fr) minmax(0, 2fr) !important; }
  .cs2-grid[data-view="preview"] .cs-side { display: none !important; }
  .cs2-grid[data-view="preview"] .cs-right { grid-template-rows: minmax(0, 1fr) auto !important; }
  .cs2-grid[data-view="preview"] .cs-conpane .cs-console { max-height: 120px; }
  .cs2-grid.ai-on[data-view] { grid-template-columns: 0 minmax(0, 1fr) minmax(0, 1.1fr) 330px !important; }
  .cs2-grid.ai-on[data-view] .cs-side { display: none !important; }
}

/* v2.25 phones: nothing floats over the page's own controls */
/* v2.26 the floating Qur'an button is back at the bottom of every Deen page, the Deen home included */
@media (max-width: 899px) {
  body:has(.lab-mob-tabs) .companion, body:has(.cs2 .cs-mtabs) .companion { transform: translateY(-76px); }
  body:has(.lab-mob-tabs) .study-calc-float { display: none; }
}
.dn3 { padding-bottom: 72px; }
.cs2 .cs-mtabs { margin-right: 0 !important; }
/* Practical Hub: the folded diagram's title no longer runs into "Diagram"; open, it scrolls with the page */
.lab-mob-diagram > summary > span { flex: none; }
.lab-mob-diagram > summary > small { flex: 1 1 auto; margin-left: 2px; }
.lab-mob-diagram[open] { position: relative; top: auto; }
.lab-mob-diagram:not([open]) { box-shadow: var(--shadow-lg); }

/* v2.25 Business → Assets & documents on phones: rows never push the page wider than the screen */
.bx-assets { grid-template-columns: minmax(0, 1fr); }
.bx-asset { min-width: 0; flex-wrap: wrap; row-gap: 4px; }
.bx-asset > strong { flex: none; white-space: nowrap; }
.bx-assets-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.bx-assets-actions a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border, #dce6ed); background: var(--surface, #fff); color: var(--text, #10202e); font-weight: 600; font-size: 14px; text-decoration: none; }
.bx-assets-actions a svg { width: 16px; height: 16px; }
.bx-assets-page { min-width: 0; max-width: 100%; overflow-x: clip; }
@media (max-width: 560px) {
  .bx-asset { padding: 10px; }
  .bx-asset-name { flex: 1 1 calc(100% - 90px); }
  .bx-asset > strong { margin-left: auto; font-size: 14px; }
  .bx-brand-asset img, .bx-brand-empty { height: 56px; }
}
.bw-autosign { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 8px 0; border-radius: 12px; border: 1px solid var(--border, #dce6ed); cursor: pointer; }
.bw-autosign input { width: 20px; height: 20px; margin-top: 2px; flex: none; } .bw-autosign span { display: grid; gap: 2px; } .bw-autosign small { color: var(--muted, #63717d); }

/* v2.25 Research: bring your own draft and papers */
.rx-import { display: flex; gap: 12px; align-items: center; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 18px; border: 1.5px dashed color-mix(in srgb, var(--primary, #2563eb) 45%, transparent); background: color-mix(in srgb, var(--primary, #2563eb) 5%, var(--surface)); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.rx-import > svg { width: 26px; height: 26px; flex: none; color: var(--primary, #2563eb); }
.rx-import span { display: grid; gap: 2px; } .rx-import small { color: var(--muted); line-height: 1.35; }
.rx-hero .rx-import { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); color: #fff; } .rx-hero .rx-import small { color: rgba(255,255,255,.8); } .rx-hero .rx-import > svg { color: #f3d98c; }
.rs-drop { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 22px 14px; border-radius: 16px; border: 2px dashed var(--border); background: var(--surface-2, #f4f7fa); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.rs-drop svg { width: 30px; height: 30px; color: var(--primary, #2563eb); } .rs-drop small { color: var(--muted); }
.rs-chip-import { border-style: dashed !important; font-weight: 700; }
.rs-import-status:empty { display: none; }
@media (max-width: 899px) { .lab-mob .lab-fab { right: auto !important; left: 16px; } }

/* v2.26 Brand Studio: the way around, the kit, sample review, signature */
.bs-nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 4px 0 14px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.bs-nav-a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--border, #dce6ed); background: var(--surface, #fff); color: inherit; text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.bs-nav-a svg { width: 16px; height: 16px; }
.bs-nav-a.on { background: var(--bw-accent, #147d72); border-color: var(--bw-accent, #147d72); color: #fff; }
.bs-nav-sep { flex: none; width: 1px; align-self: stretch; margin: 4px 2px; background: var(--border, #dce6ed); }
.bs-kit { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.bs-kit-i { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 12px; border: 1px dashed var(--border, #c9d6de); color: var(--muted, #63717d); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.bs-kit-i svg { width: 15px; height: 15px; }
.bs-kit-i.ok { border-style: solid; border-color: color-mix(in srgb, #15803d 40%, transparent); color: #15803d; background: color-mix(in srgb, #15803d 7%, transparent); }
.bs-group { margin: 22px 0 8px; } .bs-group-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } .bs-group-h h2 { margin: 0; font-size: 19px; } .bs-group-h small { color: var(--muted, #63717d); }
.bs-tile.locked { opacity: .7; }
.bs-more { margin-top: 10px; } .bs-more > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.bs-review { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--bw-accent, #147d72) 6%, var(--surface, #fff)); border: 1px solid color-mix(in srgb, var(--bw-accent, #147d72) 25%, transparent); }
.bs-review h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; } .bs-review h3 svg { width: 18px; height: 18px; }
.bs-review ul { margin: 4px 0 10px; padding-left: 20px; }
.bs-prev { max-width: 100%; max-height: 360px; border-radius: 12px; border: 1px solid var(--border, #dce6ed); margin-top: 10px; display: block; }
.bs-concepts.page .bs-canvas, .bs-doc-prev .bs-canvas { width: 100%; max-width: 560px; height: auto; box-shadow: 0 8px 28px rgba(16, 33, 43, .14); border-radius: 6px; background: #fff; }
.bs-doc-prev { margin-top: 12px; }
.bs-swatches.pick { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; } .bs-swatches.pick button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border, #dce6ed); cursor: pointer; }
.bs-sig-img { display: block; max-width: 320px; max-height: 120px; margin: 6px 0 10px; background: repeating-conic-gradient(#f3f5f7 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 10px; border: 1px solid var(--border, #dce6ed); }
.bs-sig-pad { display: block; width: 100%; max-width: 640px; aspect-ratio: 3 / 1; height: auto; border-radius: 14px; border: 2px dashed var(--border, #c9d6de); background: #fff; touch-action: none; cursor: crosshair; margin: 6px 0 10px; }
.bs-check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; } .bs-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }

/* v2.26 Marketing Studio */
.mk-chans { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-chans .chip[aria-pressed="true"] { background: var(--bw-accent, #147d72); border-color: var(--bw-accent, #147d72); color: #fff; }
.mk-copy { display: grid; gap: 12px; }
.mk-block { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border, #dce6ed); background: var(--surface-2, #f6f9fb); }
.mk-block-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.mk-block p { margin: 0; white-space: pre-wrap; } .mk-block ol { margin: 0; padding-left: 20px; }
.mk-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 10px 0; } .mk-tools .bw-field { min-width: 120px; }
.mk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 12px 0; align-items: start; }
.mk-tile { margin: 0; display: grid; gap: 8px; } .mk-tile.mk-f-banner { grid-column: 1 / -1; } .mk-tile { min-width: 0; } .mk-gallery { min-width: 0; }
.mk-canvas { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 6px 20px rgba(16, 33, 43, .14); background: #fff; }
.mk-tile figcaption { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; } .mk-tile figcaption small { color: var(--muted, #63717d); }
.mk-tile-acts { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.mk-library { display: grid; gap: 8px; }
.mk-lib-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .mk-lib-h h2 { margin: 0; }
.mk-lib-item { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px; border-radius: 14px; border: 1px solid var(--border, #dce6ed); }
.mk-lib-item.on { border-color: var(--bw-accent, #147d72); }
.mk-lib-item img, .mk-lib-ph { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2, #eef3f6); }
.mk-lib-item > span:nth-child(2) { flex: 1; min-width: 120px; display: grid; } .mk-lib-item small { color: var(--muted, #63717d); }
.mk-lib-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.bw-social-art-out .bs-canvas { width: 100%; max-width: 420px; height: auto; border-radius: 10px; margin-top: 10px; }
@media (max-width: 560px) { .mk-gallery { grid-template-columns: 1fr 1fr; } .mk-tile.mk-f-a4, .mk-tile.mk-f-story { grid-column: span 1; } }

/* v2.26 Deen home: a beautiful salam and the Islamic date, nothing else */
.dn3-head { justify-content: center; text-align: center; }
.dn3-greet { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 10px 0 4px; }
.dn3-salam.big { margin: 0; font-family: "Amiri Quran", "Amiri", "Scheherazade New", serif; font-size: clamp(34px, 7vw, 52px); line-height: 1.5; color: var(--dn-gold, #b8892d);
  background: linear-gradient(135deg, #8a6418, #d8b25a 45%, #8a6418); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; }
.dn3-hijri { margin: 0; display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--muted, #5b6b77); }
.dn3-orn { color: var(--dn-gold, #b8892d); font-size: 14px; }

/* v2.26 the sun's path: a slim, elegant band instead of a card-filling arc */
.dn-arc { display: block; width: 100%; max-width: 440px; max-height: 118px; height: auto; margin: 6px auto 2px !important; }
.dn-arc .arc-path { stroke: rgba(255, 255, 255, .32); stroke-width: 1.2; stroke-dasharray: 1.5 4.5; }
.dn-arc .arc-horizon { stroke: rgba(255, 255, 255, .16); stroke-dasharray: 2 6; }
.dn-arc .arc-done { stroke: #f3d98c; stroke-width: 1.8; filter: drop-shadow(0 0 3px rgba(243, 217, 140, .55)); }
.dn-arc .arc-dot text { font-size: 8.6px; font-weight: 600; letter-spacing: .02em; fill: rgba(255, 255, 255, .78); }
.dn-arc .arc-dot.next text { fill: #f6e7bf; font-weight: 800; }
.dn-arc .arc-sun circle:not(.glow) { fill: #ffe39a; filter: drop-shadow(0 0 4px rgba(255, 227, 154, .9)); }
.mk-tile-acts .chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; font-size: 13px; } .mk-tile-acts .chip svg { width: 15px; height: 15px; }
.dn-arc .arc-dot text { font-size: 10px; } @media (min-width: 700px) { .dn-arc .arc-dot text { font-size: 9px; } }

/* v2.27 Research environment in the business design (the "Adire" system), with its own hubs and icons */
.bw.rw[data-hub="home"] { --hub: var(--indigo); } .bw.rw[data-hub="projects"] { --hub: var(--indigo); } .bw.rw[data-hub="discover"] { --hub: #0b8f63; } .bw.rw[data-hub="lab"] { --hub: #d77a00; } .bw.rw[data-hub="more"] { --hub: #5a6590; }
.rw .rw-mono { display: grid; place-items: center; width: 40px; height: 40px; } .rw .rw-mono svg { width: 22px; height: 22px; }
.rw .rw-hub-projects .bw3-hub-ic { background: var(--indigo); } .rw .rw-hub-discover .bw3-hub-ic { background: #0b8f63; } .rw .rw-hub-lab .bw3-hub-ic { background: #e08600; } .rw .rw-hub-more .bw3-hub-ic { background: #5a6590; }
.rw .bw3-ledger { font: inherit; text-align: left; cursor: pointer; }
.rw .rw-unit { font-size: 18px; font-weight: 700; letter-spacing: 0; color: #ffffffb3; }
.rw .rw-bar { background: #ffffff2b; } .rw .rw-bar i { background: linear-gradient(90deg, #ffb400, #ffd76a); }
.rw .bw3-doc.rw-doc { text-decoration: none; } .rw .bw3-doc.rw-doc b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rw .rw-act { background: #e8ecf9; color: var(--indigo); } .rw .rw-act.s { background: #fff3cf; color: #8a5a00; }
.rw .bw-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; } .rw .bw-row h2 { margin: 0; }
.rw button.bw3-tile { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.rw .rw-page { min-width: 0; }
.rw .rw-page > .main, .rw .rw-page.rs-main, .rw .rw-page.main { max-width: none; padding: 0; margin: 0; }
.rw .rs-seg { display: flex !important; }
@media (min-width: 1000px) { .bw.rw .bw-nav::before { content: "Simrah Research"; } }
:root[data-theme="dark"] .rw .rw-act { background: #1f2a58; color: #cfd7ff; }
@media (max-width: 520px) { .rw .rw-help, .rw .bw-header-admin { display: none !important; } .rw .bw-header-actions { gap: 2px; } .rw .bw-brand small { display: none; } }
.rw .rw-page { width: 100%; max-width: 100% !important; box-sizing: border-box; overflow-x: clip; padding-left: 0 !important; padding-right: 0 !important; }
.rw .rs-proj-wrap, .rw .rs-proj-top { min-width: 0; max-width: 100%; }
.rw .rs-crumbs { min-width: 0; overflow: hidden; } .rw .rs-crumb.cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .rw .rs-seg { overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .rw .rs-seg-b { flex: 1 0 auto; flex-direction: row !important; gap: 6px; padding: 9px 12px !important; font-size: 13.5px; }
  .rw .rs-proj-btns { flex-wrap: wrap; }
}
.bw.rw { overflow-x: clip; } .rw .bw-content { min-width: 0; } .rw .bw-content > * { min-width: 0; max-width: 100%; }
.rw .rs-proj-wrap > *, .rw .rs-content, .rw .rs-stack { min-width: 0; max-width: 100%; }
/* research pages take the business palette inside the research shell */
.bw.rw .rw-page, .bw.rw .rw-page.rs-main, .bw.rw .rw-page .rs-main { --accent: #26358a; --primary: #26358a; --teal: #3a4cb3; --ink: #111a3d; --ink-2: #26358a; --gold: #ffb400; --gold-ink: #3b2a00; --bg: transparent; background: transparent; }
.bw.rw .rs-seg-b.on, .bw.rw .rx-switch button.on { background: linear-gradient(135deg, #111a3d, #26358a) !important; color: #fff !important; }
.bw.rw .btn:not(.soft):not(.ghost) { background: #26358a; border-color: #26358a; }
.bw.rw .rs-next .rs-act-ic.on { background: #ffb400; color: #3b2a00; }
:root[data-theme="dark"] .bw.rw .rw-page { --accent: #8fa0ff; --primary: #8fa0ff; --teal: #a9b6ff; }

/* v2.28 research pages fill the business content column (they replace their container's class, so target it by place) */
.bw.rw .bw-content > .main { width: 100%; max-width: none; margin: 0; padding: 0; background: transparent; min-height: 0; box-shadow: none; border: 0;
  --accent: #26358a; --primary: #26358a; --teal: #3a4cb3; --ink: #111a3d; --ink-2: #26358a; --gold: #ffb400; --gold-ink: #3b2a00; --bg: transparent; }
.bw.rw .bw-content > .main .rx-page, .bw.rw .bw-content > .main .rs-proj-wrap, .bw.rw .bw-content > .main .rx-wrap { max-width: none; width: 100%; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
.bw.rw .bw-content > .main .rx-ph h1, .bw.rw .bw-content > .main .rs-proj-title { font-size: clamp(26px, 5vw, 36px); font-weight: 800; letter-spacing: -.02em; color: var(--tx); }
/* the project's tabs: business-style pills on computers, a scrolling strip on phones */
.bw.rw .rs-seg { display: flex !important; flex-wrap: nowrap; gap: 6px; padding: 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; }
.bw.rw .rs-seg-b { position: relative; flex: 1 0 auto; display: inline-flex !important; flex-direction: row !important; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px !important; border-radius: 13px; font-weight: 700; font-size: 14.5px; color: var(--mut); text-decoration: none; white-space: nowrap; min-height: 44px; }
.bw.rw .rs-seg-b svg { width: 19px; height: 19px; flex: none; }
.bw.rw .rs-seg-b.on { background: var(--ink) !important; color: #fff !important; }
.bw.rw .rs-seg-b:not(.on):hover { background: #eef1fb; color: var(--tx); }
.bw.rw .rs-seg-n { position: static !important; margin-left: 2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 800; background: var(--gold); color: var(--gold-ink); }
/* the inner cards take the business card look */
.bw.rw .bw-content > .main :is(.rs-q-card, .rs-q-empty, .rs-stat, .rx-tile, .rs-note, .rs-src-card, .rs-work, .rs-doc-row, .rx-prow, .rx-sec, .rs-contrib, .rs-next) { border-radius: var(--r-md); border-color: var(--line); box-shadow: var(--shadow); }
/* v2.28 Simrah's portrait as the research mark; Deen in the bar; page heads; the floating Simrah above the dock */
.bw.rw .rw-mono { padding: 0; overflow: hidden; background: linear-gradient(135deg, #ffb400, #ffd76a); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffb40066; border-radius: 50%; }
.bw.rw .rw-portrait { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.bw.rw nav.bw-nav.six { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 560px; }
.bw.rw nav.bw-nav.six a span { font-size: 10.5px; }
@media (min-width: 1000px) { .bw.rw .bw-nav::before { content: "Simrah Research"; } }
.bw.rw .rw-hashead > .main .rx-ph h1, .bw.rw .rw-hashead > .main .rx-ph > p, .bw.rw .rw-hashead > .main .rx-ph > div > p:first-of-type { display: none; }
.bw.rw .rw-hashead > .main .rx-ph:not(:has(button, a)) { display: none; }
.bw.rw .rw-hashead > .main { margin-top: -4px; }
@media (max-width: 999px) { body:has(.bw.rw) .companion { bottom: calc(96px + env(safe-area-inset-bottom)) !important; right: 14px; } }
@media (min-width: 1000px) { body:has(.bw.rw) .companion { bottom: 24px !important; right: 24px; } }

/* v2.29 phones: inside a project the bar is the project's own (Research home first); computers keep the rail */
.bw.rw .rw-projnav { display: none; }
@media (max-width: 999px) {
  .bw.rw.rw-inproject nav.rw-nav { display: none !important; }
  .bw.rw.rw-inproject nav.rw-projnav { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bw.rw.rw-inproject .rs-seg { display: none !important; }
  .bw.rw .rw-projnav .rw-home-btn { color: #ffd76a; }
  .bw.rw .rw-projnav .rw-home-btn::after { content: ""; position: absolute; right: -1px; top: 18%; bottom: 18%; width: 1px; background: #ffffff26; }
  .bw.rw .rw-projnav a { position: relative; }
  .bw.rw .rw-projnav a span { font-size: 10.5px; }
}
/* v2.29 template mode */
.bw .bs-modes.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.bw .bs-tpl .bs-concepts.page .bs-canvas { max-width: 420px; }
.bs-spot-list { margin: 8px 0; padding-left: 20px; display: grid; gap: 2px; } .bs-spot-list small { color: var(--muted, #63717d); }
.bw.rw .rs-stage-chip { white-space: nowrap; }

/* ================= v2.30 ================= */
/* research: pickers, uploads, counts */
.rs-picker { display: grid; gap: 8px; } .rs-other[hidden] { display: none; }
.rs-ta { display: grid; gap: 4px; } .rs-count { justify-self: end; font-size: 12px; }
.rs-field-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rs-field-top > span:first-child { font-weight: 600; font-size: 14px; }
.rs-up-btn { padding: 6px 12px; } .rs-up-btn svg { width: 15px; height: 15px; }
/* Ask your library + Find the gaps */
.rs-lib-power { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rs-power { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; border: 0; cursor: pointer; text-align: left; color: #fff; text-decoration: none; font: inherit; box-shadow: 0 8px 22px -12px rgba(16, 24, 64, .55); }
.rs-power.ask { background: linear-gradient(135deg, #312e81, #4f46e5); } .rs-power.gap { background: linear-gradient(135deg, #7c2d12, #c2410c); }
.rs-power b { display: block; font-size: 16px; } .rs-power small { display: block; opacity: .85; font-size: 12.5px; margin-top: 2px; }
.rs-power-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #ffffff22; } .rs-power-ic svg { width: 22px; height: 22px; }
/* Gap Finder */
.rg-wrap { display: grid; gap: 16px; max-width: 980px; }
.rg-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.rg-step { position: relative; padding: 14px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); display: grid; gap: 4px; }
.rg-step-n { position: absolute; top: 10px; right: 12px; font-weight: 800; font-size: 22px; color: color-mix(in srgb, #c2410c 35%, transparent); }
.rg-step-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, #c2410c 12%, transparent); color: #c2410c; } .rg-step-ic svg { width: 18px; height: 18px; }
.rg-step small { color: var(--muted, #63717d); }
.rg-card { display: grid; gap: 10px; } .rg-card h3 { margin: 0; }
.rg-drop { width: 100%; } .rg-drop.over { outline: 2px dashed #c2410c; }
.rg-ups, .rg-lib-list { display: grid; gap: 6px; }
.rg-up, .rg-lib-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, #e5e7eb); background: var(--surface, #fff); }
.rg-up b, .rg-lib-row b { display: block; font-size: 14px; } .rg-up small, .rg-lib-row small { color: var(--muted, #63717d); font-size: 12px; }
.rg-lib-row { cursor: pointer; } .rg-lib-row.thin { opacity: .8; } .rg-up-ic svg { width: 20px; height: 20px; color: #c2410c; }
.rg-run { justify-self: start; } .rg-run:disabled { opacity: .55; }
.rg-progress { display: grid; gap: 6px; } .rg-progress:empty { display: none; } .rg-progress h3 { margin: 4px 0; }
.rg-prow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--surface, #fff) 92%, #c2410c); }
.rg-prow b { display: block; font-size: 14px; } .rg-prow small { color: var(--muted, #63717d); font-size: 12.5px; }
.rg-pst { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; } .rg-pst svg { width: 16px; height: 16px; }
.rg-prow.done .rg-pst { background: #059669; color: #fff; } .rg-prow.bad .rg-pst { background: #dc2626; color: #fff; } .rg-prow.bad small { color: #b42318; }
.rg-res { display: grid; gap: 16px; } .rg-res-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; } .rg-res-head h2 { margin: 0; }
.rg-verdict { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; color: #fff; }
.rg-verdict svg { width: 26px; height: 26px; flex: none; } .rg-verdict b { display: block; font-size: 16px; } .rg-verdict small { display: block; opacity: .9; }
.rg-verdict.open { background: linear-gradient(135deg, #065f46, #059669); } .rg-verdict.found { background: linear-gradient(135deg, #1e3a8a, #4338ca); }
.rg-top { display: grid; gap: 8px; } .rg-gap { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); }
.rg-gap-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #c2410c; color: #fff; font-weight: 800; }
.rg-gap small { display: block; color: var(--muted, #63717d); margin-top: 3px; }
.rg-plan { padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, #1e1b4b, #312e81); color: #fff; display: grid; gap: 8px; }
.rg-plan > small { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: #fcd34d; } .rg-plan h3 { margin: 0; color: #fff; }
.rg-plan .rg-q { font-size: 17px; font-weight: 600; margin: 0; } .rg-plan ol { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.rg-plan .btn.soft { background: #ffffff1f; color: #fff; border-color: #ffffff33; }
.rg-report { padding: 16px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); overflow-x: auto; }
.rg-report table { border-collapse: collapse; width: 100%; font-size: 14px; } .rg-report th, .rg-report td { border: 1px solid var(--line, #e5e7eb); padding: 6px 8px; text-align: left; vertical-align: top; }
.rg-paper { border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 10px 14px; background: var(--surface, #fff); margin-bottom: 8px; }
.rg-paper summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; } .rg-paper summary::-webkit-details-marker { display: none; }
.rg-paper summary b { display: block; font-size: 14px; } .rg-paper summary small { color: var(--muted, #63717d); font-size: 12px; }
.rg-counts { flex: none; font-size: 12px; font-weight: 700; color: #c2410c; white-space: nowrap; }
.rg-blk { margin-top: 8px; } .rg-blk ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.rg-blk.good > b { color: #047857; } .rg-blk.warn > b { color: #b45309; } .rg-blk.gap > b { color: #c2410c; }
.rg-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, #c2410c 12%, transparent); color: #9a3412; margin-right: 6px; }
.rg-past { display: grid; gap: 8px; } .rg-past h3 { margin: 6px 0 0; }
/* Research journey and resources */
.rj { display: grid; gap: 14px; max-width: 920px; }
.rj-active { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); text-decoration: none; color: inherit; font: inherit; cursor: pointer; text-align: left; width: 100%; }
.rj-active span { flex: 1; } .rj-active small { display: block; color: var(--muted, #63717d); font-size: 12px; } .rj-active svg { width: 20px; height: 20px; }
.rj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.rj-stage { display: grid; grid-template-columns: 36px 1fr; gap: 12px; position: relative; padding-bottom: 14px; }
.rj-stage::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line, #e5e7eb); } .rj-stage:last-child::before { display: none; }
.rj-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface, #fff); border: 2px solid var(--line, #d1d5db); z-index: 1; }
.rj-stage.done .rj-dot { background: #059669; border-color: #059669; color: #fff; } .rj-stage.done .rj-dot svg { width: 18px; height: 18px; }
.rj-stage.now .rj-dot { background: #f5b301; border-color: #f5b301; color: #1e1b4b; }
.rj-body { padding: 12px 14px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); }
.rj-stage.now .rj-body { border-color: #f5b301; box-shadow: 0 0 0 3px color-mix(in srgb, #f5b301 25%, transparent); }
.rj-head { display: flex; align-items: center; gap: 8px; } .rj-head em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: #92400e; background: #fef3c7; padding: 2px 8px; border-radius: 999px; }
.rj-ic svg { width: 18px; height: 18px; color: #4338ca; } .rj-body p { margin: 6px 0 8px; color: var(--muted, #63717d); font-size: 14px; }
.rj-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.rj-tool { padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, #4338ca 30%, transparent); background: color-mix(in srgb, #4338ca 7%, transparent); color: #3730a3; font: 600 13px/1.2 inherit; text-decoration: none; cursor: pointer; }
.rj-tool:hover { background: #4338ca; color: #fff; }
.rj-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.rj-res-a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); color: inherit; text-decoration: none; }
.rj-res-a span:nth-child(2) { flex: 1; } .rj-res-a b { display: block; font-size: 14px; } .rj-res-a small { color: var(--muted, #63717d); font-size: 12.5px; }
.rj-res-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, #4338ca 10%, transparent); color: #4338ca; } .rj-res-ic svg { width: 18px; height: 18px; }
/* Research plans */
.rpl { display: grid; gap: 16px; max-width: 1040px; }
.rpl-badge { --rp: #4338ca; flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--rp), color-mix(in srgb, var(--rp) 60%, #000)); box-shadow: 0 6px 16px -8px var(--rp); }
.rpl-badge svg { width: 22px; height: 22px; } .rpl-badge.big { width: 56px; height: 56px; border-radius: 16px; } .rpl-badge.big svg { width: 30px; height: 30px; }
.rpl-status { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); }
.rpl-status b { display: block; font-size: 20px; } .rpl-status small { display: block; color: var(--muted, #63717d); }
.rpl-status.trial { border-color: #93c5fd; background: color-mix(in srgb, #0b6fae 6%, var(--surface, #fff)); } .rpl-status.ended { border-color: #fca5a5; background: color-mix(in srgb, #b42318 6%, var(--surface, #fff)); }
.rpl-have { padding: 14px 16px; border-radius: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); } .rpl-have h3 { margin: 0 0 8px; }
.rpl-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .rpl-top h2 { margin: 0; }
.rpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.rpl-card { --rp: #4338ca; position: relative; display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb); }
.rpl-card.hot { border: 2px solid var(--rp); box-shadow: 0 14px 34px -20px var(--rp); } .rpl-card.mine { outline: 3px solid color-mix(in srgb, var(--rp) 35%, transparent); }
.rpl-flag { position: absolute; top: -11px; right: 16px; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--rp); color: #fff; } .rpl-flag.soft { background: #fef3c7; color: #92400e; }
.rpl-head { display: flex; gap: 12px; align-items: center; } .rpl-head b { display: block; font-size: 18px; } .rpl-head small { display: block; color: var(--muted, #63717d); font-size: 13px; }
.rpl-price { margin: 0; } .rpl-price strong { font-size: 30px; letter-spacing: -.02em; } .rpl-price span { color: var(--muted, #63717d); }
.rpl-calls { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--rp); } .rpl-calls svg { width: 16px; height: 16px; }
.rpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .rpl-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.rpl-list li svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: #059669; }
.rpl-mine { margin: 0; display: flex; gap: 6px; align-items: center; font-weight: 700; color: #047857; } .rpl-mine svg { width: 16px; height: 16px; }
.bw.rw .rw-plan.on { color: var(--rp, #b45309); } .bw.rw .rw-plan.trial { color: #0b6fae; } .bw.rw .rw-plan.ended { color: #b42318; }
.rw-trial { display: flex; align-items: center; gap: 10px; } .rw-trial svg { width: 18px; height: 18px; flex: none; } .rw-trial span { flex: 1; }
.rw-trial.ended { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
/* admin: research plans */
.ar-plan { border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 10px 14px; margin: 8px 0; }
.ar-plan summary { display: flex; gap: 10px; align-items: center; cursor: pointer; flex-wrap: wrap; } .ar-plan summary .rpl-badge { width: 30px; height: 30px; } .ar-plan summary .rpl-badge svg { width: 16px; height: 16px; }
.ar-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 10px; }
/* admin: Users */
.adm-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin; }
.adm-cat { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border, rgba(100,116,139,.35)); background: var(--surface, #fff); color: inherit; font: 600 13px/1.2 inherit; cursor: pointer; }
.adm-cat svg { width: 15px; height: 15px; } .adm-cat b { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(100,116,139,.15); }
.adm-cat.on { background: #1e1b4b; border-color: #1e1b4b; color: #fff; } .adm-cat.on b { background: #ffffff2b; }
.adm-group { margin-top: 12px; } .adm-group-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #63717d); }
.adm-group-h svg { width: 16px; height: 16px; } .adm-group-h small { font-weight: 700; background: rgba(100,116,139,.15); border-radius: 999px; padding: 0 8px; }
.adm-user-row { display: flex; align-items: center; gap: 8px; } .adm-user-row .adm-user { flex: 1; min-width: 0; } .adm-sub { flex: none; }
.adm-plan { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 3px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(100,116,139,.12); color: #475569; }
.adm-plan svg { width: 13px; height: 13px; } .adm-plan.good { background: #dcfce7; color: #166534; } .adm-plan.trial { background: #dbeafe; color: #1e40af; } .adm-plan.warn { background: #fee2e2; color: #991b1b; }
@media (max-width: 560px) { .adm-user-row { flex-wrap: wrap; } .adm-sub { width: 100%; justify-content: center; } }
/* Brand Studio: place details yourself */
.tpl-ed { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .tpl-ed { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); align-items: start; } .tpl-help { grid-column: 1 / -1; } }
.tpl-stage { position: relative; width: 100%; max-width: 460px; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(0,0,0,.5); background: #fff; touch-action: none; user-select: none; }
.tpl-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.tpl-box { --c: #2563eb; position: absolute; border: 2px dashed var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); cursor: move; border-radius: 4px; }
.tpl-box.on { border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); z-index: 2; } .tpl-box:focus-visible { outline: 3px solid #f5b301; }
.tpl-lab { position: absolute; left: -2px; top: -20px; font: 700 11px/18px Arial, sans-serif; padding: 0 6px; background: var(--c); color: #fff; border-radius: 4px 4px 0 0; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tpl-rs { position: absolute; right: -8px; bottom: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid #fff; cursor: nwse-resize; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
@media (pointer: coarse) { .tpl-rs { width: 26px; height: 26px; right: -13px; bottom: -13px; } }
.tpl-side { display: grid; gap: 10px; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-chip, .tpl-mini { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border, rgba(100,116,139,.35)); background: var(--surface, #fff); color: inherit; font: 600 13px/1.2 inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tpl-chip.on, .tpl-mini.on { background: var(--bw-accent, #147d72); border-color: var(--bw-accent, #147d72); color: #fff; } .tpl-mini.bad { color: #b42318; } .tpl-mini svg { width: 14px; height: 14px; }
.tpl-props { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(100,116,139,.08); }
.tpl-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .tpl-row > span { min-width: 90px; font-size: 13px; font-weight: 600; } .tpl-row input[type=color] { width: 44px; height: 32px; border: 0; background: none; padding: 0; }
.tpl-help { margin: 0; font-size: 13px; color: var(--muted, #63717d); }
/* v2.30 phones: the plan icon joins the header, so All Simrah features moves to More (it is a tile there) */
@media (max-width: 519px) { .bw.rw .bw-header-actions .bw-apps { display: none; } }
@media (max-width: 560px) { .rg-steps { grid-template-columns: 1fr 1fr; gap: 8px; } .rg-step { padding: 10px; gap: 2px; } .rg-step small { display: none; } .rg-step b { font-size: 13px; line-height: 1.25; } .rg-step-n { font-size: 16px; top: 6px; right: 8px; } .rg-step-ic { width: 28px; height: 28px; } }
.bw.rw .bw-content .rg-plan h3, .rg-plan h3 { color: #fff !important; } .bw.rw .bw-content .rg-plan p, .bw.rw .bw-content .rg-plan li { color: #eef2ff; }
.bw.rw .bw-header-actions > a.rw-plan.on { color: var(--rp, #b45309) !important; background: color-mix(in srgb, var(--rp, #b45309) 12%, #fff) !important; } .bw.rw .bw-header-actions > a.rw-plan.ended { color: #b42318 !important; }
/* v2.31 research agent in the chat */
.rs-did { list-style: none; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #059669 9%, transparent); display: grid; gap: 4px; font-size: 13.5px; }
.rs-did li { display: flex; gap: 6px; align-items: flex-start; } .rs-did svg { width: 15px; height: 15px; color: #059669; flex: none; margin-top: 2px; }
.rs-msg-offer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
