:root {
  --bg: #f6f1e8;
  --surface: #fffaf2;
  --surface-strong: #ffffff;
  --text: #1a1714;
  --muted: #5f564c;
  --line: #d8cbb8;
  --accent: #7c3f17;
  --accent-soft: #efe0cd;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #fff7ec 0, transparent 32%),
    linear-gradient(180deg, #f3eadf 0%, #f8f3eb 42%, #f6f1e8 100%);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 64px 0 28px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  line-height: 1.15;
  font-weight: 700;
}

h1 {
  font-size: clamp(40px, 6vw, 68px);
  max-width: 880px;
}

h2 {
  font-size: clamp(28px, 3.2vw, 40px);
}

h3 {
  font-size: 24px;
}

.lead {
  max-width: 760px;
  font-size: 20px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 28px 0 56px;
}

.language-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 28px 0 56px;
}

.card,
.article,
.panel,
.language-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
}

.card {
  padding: 22px;
}

.filter-bar {
  margin-bottom: 24px;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.search-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font: inherit;
  color: var(--text);
}

.search-input:focus {
  outline: 2px solid rgba(124, 63, 23, 0.18);
  border-color: var(--accent);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.result-count {
  margin: 16px 0 0;
  color: var(--muted);
}

.is-hidden {
  display: none;
}

.empty-state {
  margin-top: 16px;
}

.language-card {
  display: block;
  padding: 22px;
  color: var(--text);
}

.language-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.language-card span {
  color: var(--muted);
}

.language-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.card p,
.article p,
.panel p,
.article li,
.language-card p {
  color: var(--muted);
}

.section {
  padding: 12px 0 54px;
}

.articles {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.article {
  padding: 26px;
}

.thumb,
.cover {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: block;
  background: #f3eadf;
}

.thumb {
  margin-bottom: 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cover {
  margin: 10px 0 24px;
}

.article .meta,
.meta {
  font-size: 14px;
  color: var(--muted);
}

.button {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.button:hover {
  text-decoration: none;
  opacity: 0.92;
}

.article-page {
  padding: 34px 0 72px;
}

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  gap: 24px;
}

.article-body {
  padding: 34px;
  background: var(--surface-strong);
}

.article-body p,
.article-body li {
  font-size: 18px;
}

.article-body h1 + .cover {
  margin-top: 4px;
}

.article-body ul,
.article-body ol {
  padding-left: 20px;
}

.article-body blockquote {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: #4d3323;
}

.backlink {
  margin-bottom: 18px;
}

.footer {
  padding: 28px 0 60px;
  color: var(--muted);
}

.mini-nav {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

[dir="rtl"] body,
[dir="rtl"] .article-body,
[dir="rtl"] .hero,
[dir="rtl"] .section,
[dir="rtl"] .footer {
  text-align: right;
}

[dir="rtl"] .article-body ul,
[dir="rtl"] .article-body ol {
  padding-left: 0;
  padding-right: 20px;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 42px;
  }

  .lead,
  .article-body p,
  .article-body li {
    font-size: 17px;
  }

  .article-body {
    padding: 22px;
    border-radius: 20px;
  }
}
