:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #616e7c;
  --border: #e4e7eb;
  --accent: #1d63ed;
  --accent-text: #ffffff;
  --notice: #fff8e1;
  --notice-border: #f5c542;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --card: #1a212b;
    --text: #e4e7eb;
    --muted: #9aa5b1;
    --border: #2c3643;
    --accent: #4c8dff;
    --notice: #3a3016;
    --notice-border: #a8841f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

header img { height: 32px; }

header .who { display: flex; align-items: center; gap: 12px; color: var(--muted); }

main { max-width: 960px; margin: 0 auto; padding: 24px 16px; }

h1, h2, h3, p, li { unicode-bidi: plaintext; text-align: start; }

.notice {
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--notice-border);
  background: var(--notice);
  border-radius: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0 0 12px; color: var(--muted); flex: 1; }
.card .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }

button, .button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  display: inline-block;
}

button.link {
  background: none;
  color: var(--accent);
  padding: 0;
}

.center { text-align: center; padding: 48px 0; }
.center p { text-align: center; }

.badge {
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
}

.hint { color: var(--muted); margin-top: -8px; }
