/*
 * The one stylesheet of the apps site (13. apps-site.tf), shared by the root pages and by every app's
 * pages. Plain CSS, system fonts, no build. Logical properties (inline-start, inline-end) throughout so
 * right-to-left pages need nothing of their own: a page sets dir="rtl" and lang, and that is all.
 */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1f24;
  --muted: #5d6270;
  --rule: #e4e1da;
  --accent: #2f5d8a;
  --accent-text: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161b;
    --surface: #1b1e24;
    --text: #e8e6e1;
    --muted: #a3a7b1;
    --rule: #2c3038;
    --accent: #8fb6dd;
    --accent-text: #14161b;
    color-scheme: dark;
  }
}

*,
*::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", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

:lang(fa) body,
body:lang(fa) {
  font-family: Vazirmatn, "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
  line-height: 1.9;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.app {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-block-end: 1.5rem;
  margin-block-end: 2rem;
  border-block-end: 1px solid var(--rule);
}

header.app img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  flex: none;
}

header.app .name {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.2;
}

header.app .by {
  color: var(--muted);
  font-size: 0.875rem;
}

header.app .lang {
  margin-inline-start: auto;
  font-size: 0.9375rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 2.25rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

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

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

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

.updated {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-block-end: 2rem;
}

.lead {
  font-size: 1.125rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 1.25rem 1.375rem;
  margin: 1.5rem 0;
}

.card > :last-child {
  margin-block-end: 0;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 0.5rem 0.625rem;
  border-block-end: 1px solid var(--rule);
}

th {
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

footer {
  margin-block-start: 3rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

footer a {
  color: inherit;
}
