/* Mixlebs help site (PLT-V2-04). Light by default, dark on request or by the
   system setting; RTL follows the page's dir attribute. */
:root {
  --bg: #f7f7fb; --surface: #ffffff; --text: #17172b; --muted: #61617a;
  --border: #e3e3ee; --brand: #6c3cf0; --brand-ink: #ffffff; --accent: #efe9ff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f1a; --surface: #181828; --text: #ececf5; --muted: #a3a3bd;
    --border: #2a2a40; --brand: #9b7bff; --brand-ink: #0f0f1a; --accent: #241d40;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f1a; --surface: #181828; --text: #ececf5; --muted: #a3a3bd;
  --border: #2a2a40; --brand: #9b7bff; --brand-ink: #0f0f1a; --accent: #241d40;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
}
a { color: var(--brand); }
main { flex: 1; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 48rem; }
.top { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 1rem; height: 4rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.logo { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .75rem;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.names { display: flex; flex-direction: column; line-height: 1.1; }
.names small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; }
.tools { margin-inline-start: auto; display: flex; gap: .5rem; }
.tool { font: inherit; font-size: .875rem; color: var(--text); background: transparent; border: 1px solid var(--border);
  border-radius: .6rem; padding: .35rem .75rem; text-decoration: none; cursor: pointer; }
.tool:hover { background: var(--accent); }
.hero { border-bottom: 1px solid var(--border); background: var(--accent); }
.hero .wrap { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.hero p { margin: .5rem 0 0; color: var(--muted); }
.cards { list-style: none; margin: 2rem 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.card { display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem; border-radius: 1rem;
  background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.card:hover { border-color: var(--brand); }
.card-title { font-weight: 600; font-size: 1.1rem; overflow-wrap: anywhere; }
.card-date, .date { color: var(--muted); font-size: .85rem; }
.back { display: inline-block; margin: 2rem 0 1rem; text-decoration: none; font-size: .9rem; }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.4rem); overflow-wrap: anywhere; }
.page-head .date { margin: .4rem 0 1.5rem; }
.older { padding: .75rem 1rem; border-radius: .75rem; background: var(--accent); border: 1px solid var(--border); }
.entries { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }
.qa, .article { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem 1.25rem; }
.qa summary { cursor: pointer; font-weight: 600; }
.qa[open] summary { margin-bottom: .5rem; }
.article h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.content { overflow-wrap: anywhere; }
.content blockquote { margin: .5rem 0; padding-inline-start: 1rem; border-inline-start: 3px solid var(--border); color: var(--muted); }
.versions { border-top: 1px solid var(--border); padding: 1rem 0 2rem; }
.versions h2 { font-size: 1rem; }
.versions ul { padding-inline-start: 1.25rem; }
.empty { color: var(--muted); text-align: center; padding: 3rem 0; }
.message { text-align: center; padding: 4rem 1.25rem; }
.button { display: inline-block; margin-top: 1rem; padding: .5rem 1rem; border-radius: .6rem; background: var(--brand);
  color: var(--brand-ink); text-decoration: none; }
.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; text-align: center; padding: 1.5rem 0; }
