/* صفحة الأسئلة الشائعة المستقلة. */
:root {
  color-scheme: light;
}

/* الصفحة مستقلة عن ملف المنصة؛ تستخدم أسماء الرموز الدلالية وألوانها نفسها. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #0e1622;
  --bg-surface: #172230;
  --bg-surface-raised: #1b2735;
  --bg-input: #1b2735;
  --fg-primary: #e7eef5;
  --fg-secondary: #a7b8c9;
  --border-subtle: #2b3a4c;
  --border-default: #7189a1;
  --focus-ring-color: #e8c98a;
  --status-warning-bg: #352a1a;
  --status-warning-fg: #e8c98a;
  --status-warning-border: #d9ad5e;
}
@font-face {
  font-family: Tajawal;
  src: url(/assets/fonts/tajawal/regular.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Tajawal;
  src: url(/assets/fonts/tajawal/bold.woff2) format('woff2');
  font-weight: 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f7fa;
  color: #102c42;
  font-family: Tajawal,sans-serif;
  font-size: 18px;
  line-height: 1.8;
}

header {
  background: #061e30;
  padding: 16px max(24px,calc((100% - 1100px)/2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: white;
}

a {
  color: inherit;
  text-underline-offset: 5px;
}

header a {
  text-decoration: none;
  font-size: 16px;
}

.brand {
  font-size: 28px;
  font-weight: 700;
}

.brand b {
  color: #e9bc68;
}

main {
  max-width: 1100px;
  margin: auto;
  padding: 42px 24px;
}

.intro {
  padding-bottom: 32px;
}

.intro>span {
  color: #846023;
}

h1 {
  font-size: 44px;
  line-height: 1.3;
  margin: 14px 0;
}

h2 {
  font-size: 24px;
  margin: 30px 0 14px;
}

.intro p {
  margin: 0 0 12px;
}

.intro small {
  color: #586777;
  font-size: 14px;
}

.controls {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

label {
  font-weight: 700;
  font-size: 16px;
}

input,select {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 400;
  padding: 14px;
  background: white;
  border: 1px solid #bbcbd7;
  border-radius: 10px;
  color: #102c42;
  min-height: 55px;
  margin-top: 5px;
}

input:focus,select:focus,button:focus-visible,summary:focus-visible {
  outline: 3px solid #d4a04d;
  outline-offset: 3px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  padding: 14px 0;
}

button {
  font: inherit;
  color: #183f5c;
  border: 1px solid #bbcbd7;
  border-radius: 7px;
  background: white;
  padding: 7px 12px;
  cursor: pointer;
}

details {
  background: white;
  border: 1px solid #dde5eb;
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
}

summary {
  cursor: pointer;
  font-weight: 700;
  padding: 19px 22px;
  line-height: 1.7;
}

details[open] {
  border-color: #bba16e;
}

details[open] summary {
  background: #fbf8f1;
}

details p {
  padding: 0 22px;
  margin: 18px 0 24px;
  color: #3c5263;
  line-height: 2;
}

aside {
  margin-top: 40px;
  background: #e6eef3;
  border-radius: 12px;
  padding: 18px 24px;
}

aside h2 {
  margin: 0;
}

aside p {
  margin: 8px 0;
}

footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px;
  background: #061e30;
  color: #d9e4ee;
  font-size: 15px;
}

[hidden] {
  display: none !important;
}

html[data-theme="dark"] body { background: var(--bg-canvas); color: var(--fg-primary); }
html[data-theme="dark"] .intro>span { color: var(--status-warning-fg); }
html[data-theme="dark"] .intro small,
html[data-theme="dark"] details p { color: var(--fg-secondary); }
html[data-theme="dark"] :is(input,select,button) { background: var(--bg-input); color: var(--fg-primary); border-color: var(--border-default); }
html[data-theme="dark"] input::placeholder { color: var(--fg-secondary); opacity: 1; }
html[data-theme="dark"] details { background: var(--bg-surface); border-color: var(--border-subtle); }
html[data-theme="dark"] details[open] { border-color: var(--status-warning-border); }
html[data-theme="dark"] details[open] summary { background: var(--status-warning-bg); }
html[data-theme="dark"] aside { background: var(--bg-surface-raised); }
html[data-theme="dark"] :is(input,select):focus,
html[data-theme="dark"] :is(button,summary,a):focus-visible { outline: 3px solid var(--focus-ring-color); outline-offset: 3px; }

@media (max-width:650px) {
  body {
    font-size: 16px;
  }

  main {
    padding: 28px 18px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 21px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar p {
    margin: 0;
  }

  summary {
    padding: 15px;
  }

  details p {
    padding: 0 15px;
  }

  header {
    padding: 14px 18px;
  }

  .brand {
    font-size: 25px;
  }

}
