/* Meryas website: one stylesheet, no fonts, images or scripts. Colours follow
   the app (app/lib/core/theme.dart). Logical properties keep RTL and LTR the
   same. */
:root {
  color-scheme: light dark;
  --bg: #f2efe6;
  --surface: #fbf9f3;
  --line: #ddd6c4;
  --text: #1d2420;
  --muted: #5b615b;
  --accent: #245c4b;
  --brass: #8a5f0f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1310;
    --surface: #161d19;
    --line: #2a352f;
    --text: #e9e6dc;
    --muted: #a3a99f;
    --accent: #6fc0ab;
    --brass: #d7a340;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic",
    "Geeza Pro", Tahoma, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

header.top {
  border-block-end: 1px solid var(--line);
  background: var(--surface);
}

header.top .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.75rem;
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

main {
  padding-block: 1.5rem 2.5rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin-block: 0.5rem 0.75rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin-block: 2rem 0.5rem;
  color: var(--brass);
}

h3 {
  font-size: 1.05rem;
  margin-block: 1.25rem 0.25rem;
}

p,
ul,
ol {
  margin-block: 0 0.9rem;
}

ul,
ol {
  padding-inline-start: 1.4rem;
}

li {
  margin-block-end: 0.35rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.lead {
  font-size: 1.15rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-block: 1rem;
}

.links {
  list-style: none;
  padding: 0;
}

.links li {
  margin-block-end: 0.6rem;
}

code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
  direction: ltr;
  unicode-bidi: isolate;
}

[lang="en"] {
  unicode-bidi: isolate;
}

footer {
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  padding-block: 1rem 2rem;
}

footer p {
  margin: 0.25rem 0;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
