:root {
  --ink: #1c1915;
  --ink-soft: #3a342c;
  --muted: #6f675c;
  --paper: #f4f0e6;
  --paper-2: #ebe4d4;
  --card: #fffdf8;
  --line: #e3d9c6;
  --green: #0d5c4d;
  --green-dark: #083d34;
  --gold: #9a7340;
  --gold-soft: #e7d3a1;
  --rose: #8d3434;
  --shadow: 0 16px 40px rgba(28, 25, 21, 0.08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --read: 1.16rem;
  --measure: 42rem;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; color-scheme: light; }
html[data-size="sm"] { --read: 1rem; }
html[data-size="lg"] { --read: 1.35rem; }
html[data-size="xl"] { --read: 1.55rem; }
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3efe6;
  --ink-soft: #e4dccb;
  --muted: #c2b7a4;
  --paper: #161410;
  --paper-2: #241f18;
  --card: #221e18;
  --line: #3c342b;
  --green: #8fd0bf;
  --gold: #e2c48a;
  --gold-soft: #e7d3a1;
  --rose: #e7a3a3;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(154, 115, 64, 0.08), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); }
button, input, select { font: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 50;
}
.skip:focus { top: 0.5rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 240, 230, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(var(--wrap), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 60% 50%, transparent 0 0.42rem, var(--gold-soft) 0.46rem 0.58rem, transparent 0.62rem),
    var(--green);
  box-shadow: inset 0 0 0 2px rgba(231, 211, 161, 0.45);
  flex: none;
}
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand small {
  display: block;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem 1rem;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}
.nav a[aria-current="page"] {
  color: var(--green);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.search-form { display: flex; gap: 0.35rem; margin-left: 0.4rem; }
.search-form input {
  width: 9.5rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  color: var(--ink);
}
.search-form input:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.search-form button,
.btn {
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-form button:hover, .btn:hover { background: var(--green-dark); color: #fff; }
.btn.ghost {
  background: transparent;
  color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.btn.ghost:hover { background: var(--green); color: #fff; }

.verse {
  background: var(--green-dark);
  color: #f6f1e4;
}
.verse-inner {
  width: min(var(--wrap), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.7rem 0;
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  font-size: 0.95rem;
}
.verse strong {
  flex: none;
  color: var(--gold-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--sans);
}
.verse span { opacity: 0.95; }

.read-progress {
  position: fixed;
  left: 0; top: 0;
  height: 3px;
  width: 100%;
  z-index: 40;
  background: transparent;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}

main { padding: 1.6rem 0 3rem; }

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  height: 28rem;
  background: var(--green-dark);
  box-shadow: var(--shadow);
}
.hero-track { display: flex; height: 100%; transition: transform 0.55s ease; }
.hero-slide { min-width: 100%; position: relative; height: 100%; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3.5rem 2rem 1.6rem;
  color: white;
  background: linear-gradient(transparent, rgba(12, 24, 20, 0.88) 55%);
}
.hero-copy h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); max-width: 18ch; }
.hero-copy h2 a { color: white; text-decoration: none; }
.hero-copy p { max-width: 42rem; margin: 0.55rem 0 0.9rem; color: rgba(255,255,255,0.88); }
.kicker {
  display: inline-block;
  margin-bottom: 0.45rem;
  background: var(--gold);
  color: #1c1915;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.hero-nav {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.4rem;
}
.hero-nav button, .dots button {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
}
.dots {
  position: absolute;
  right: 1.2rem;
  bottom: 1.15rem;
  display: flex;
  gap: 0.35rem;
}
.dots button { width: 0.55rem; height: 0.55rem; padding: 0; background: rgba(255,255,255,0.55); }
.dots button[aria-current="true"] { background: white; transform: scale(1.25); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.8rem;
  margin-top: 1.8rem;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.8rem 0 0.9rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
}
.section-head h2 { font-size: 1.55rem; }
.section-head a { font-weight: 700; text-decoration: none; }

.feature-grid, .card-grid, .card-grid.cols-2 { display: grid; gap: 1rem; }
.feature-grid { grid-template-columns: 1fr 1fr; }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .thumb {
  aspect-ratio: 16 / 10;
  background: var(--green-dark);
  position: relative;
}
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card h3 { font-size: 1.18rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--green); }
.card p { margin: 0; color: var(--ink-soft); flex: 1; }
.meta { color: var(--muted); font-size: 0.88rem; display: flex; gap: 0.7rem; flex-wrap: wrap; }
.card .more { font-weight: 700; text-decoration: none; margin-top: 0.2rem; }

.band { margin-top: 2.2rem; padding: 1.4rem 0 0.2rem; }
.band.alt { background: rgba(255, 253, 248, 0.65); border-block: 1px solid var(--line); }

.side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
  position: sticky;
  top: 5.4rem;
}
.widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
}
.widget h2 { font-size: 1.15rem; margin-bottom: 0.8rem; }
.pop-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.pop-item:first-of-type { border-top: 0; }
.pop-item img { width: 72px; height: 56px; object-fit: cover; border-radius: 0.45rem; background: var(--paper-2); }
.pop-item strong { display: block; font-family: var(--serif); font-size: 0.98rem; line-height: 1.3; }
.pop-item small { color: var(--muted); }

.vakit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.vakit-grid div {
  background: var(--paper);
  border-radius: 0.6rem;
  padding: 0.45rem 0.3rem;
  text-align: center;
}
.vakit-grid span { display: block; color: var(--muted); font-size: 0.75rem; }
.vakit-grid strong { font-family: var(--serif); font-size: 1rem; }
.widget .city { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.85rem; }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.cat-list a { color: var(--ink); text-decoration: none; font-weight: 650; text-transform: capitalize; }
.cat-list b {
  min-width: 1.6rem;
  text-align: center;
  background: var(--paper-2);
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 0.05rem 0.4rem;
}

.page-title { margin: 0.4rem 0 1rem; }
.page-title p { margin: 0.35rem 0 0; color: var(--muted); }
.more-row { display: flex; justify-content: center; margin: 1.2rem 0; }

.article-layout { width: min(46rem, calc(100% - 2rem)); margin: 0 auto; }
.article-kicker { margin-bottom: 0.6rem; }
.article-layout h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.8rem; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.article-hero {
  margin: 0 0 1.3rem;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--paper-2);
}
.article-hero img { width: 100%; max-height: 28rem; object-fit: cover; }
.article-body, .prose-page { font-family: var(--serif); font-size: var(--read); line-height: 1.75; }
.article-body p { margin: 0 0 1em; }
.article-body h2, .article-body h3, .article-body h4 { margin: 1.3em 0 0.4em; }
.article-body img { margin: 1rem auto; border-radius: 0.7rem; }
.article-body a { color: var(--green-dark); }
.article-body ul, .article-body ol { padding-left: 1.2rem; }
.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  border-block: 1px solid var(--line);
  padding: 0.9rem 0;
  margin: 1.5rem 0 0.4rem;
}
.share-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.share-actions button, #begen-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.share-actions button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.share-actions svg { width: 1.15rem; height: 1.15rem; fill: currentColor; display: block; }
.share-actions button.is-copied { background: var(--green); color: #fff; border-color: var(--green); }
#begen-btn.is-on { background: #f8e8e8; border-color: #e3b8b8; color: var(--rose); }

.related { width: min(var(--wrap), calc(100% - 2rem)); margin: 2rem auto 0; }
.empty, .notice {
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  padding: 1rem;
}
.search-hit { margin-bottom: 1.4rem; }

.site-footer {
  background: #14120f;
  color: #f3ecdf;
  padding: 2.4rem 0 1.2rem;
}
.site-footer a { color: #f3ecdf; text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.site-footer h2 { font-size: 1.15rem; margin-bottom: 0.55rem; }
.site-footer p, .site-footer li { color: rgba(243, 236, 223, 0.82); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.28rem 0; }
.legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 1.4rem;
  padding-top: 0.8rem;
  text-align: center;
  color: rgba(243, 236, 223, 0.7);
  font-size: 0.92rem;
}
.prose-page { width: min(40rem, calc(100% - 2rem)); margin: 0 auto; }
.prose-page p { margin: 0.7rem 0; }

@media (max-width: 980px) {
  .layout, .foot-grid, .card-grid, .feature-grid, .card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .side { position: static; }
  .hero-slider { height: 24rem; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .topbar { position: sticky; }
  .topbar-inner { flex-wrap: wrap; padding: 0.6rem 0; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.8rem;
    gap: 0.55rem;
  }
  .nav.is-open { display: flex; }
  .search-form { margin: 0; }
  .search-form input { flex: 1; width: auto; }
  .layout, .foot-grid, .card-grid, .feature-grid, .card-grid.cols-2, .vakit-grid { grid-template-columns: 1fr; }
  .vakit-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-slider { height: 22rem; border-radius: 0.8rem; }
  .verse-inner { flex-direction: column; gap: 0.2rem; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-track, .card { transition: none; }
}
.prefs { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }
.prefs button, .size-ctrl button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font-weight: 700;
}
.size-ctrl { display: inline-flex; }
.size-ctrl button:first-child { border-radius: 999px 0 0 999px; }
.size-ctrl button:last-child { border-radius: 0 999px 999px 0; border-left: 0; }
html[data-theme="dark"] .topbar { background: rgba(22, 20, 16, 0.92); }
html[data-theme="dark"] .brand, html[data-theme="dark"] .nav a { color: var(--ink); }
html[data-theme="dark"] .article-body a { color: #b7eadc; }

.rank-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 0.2rem 0 1.6rem; }
.rank-card {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 0.65rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.55rem;
  color: inherit;
  text-decoration: none;
}
.rank-card b { font-family: var(--serif); font-size: 1.4rem; color: var(--gold); padding-left: 0.25rem; }
.rank-card img { width: 72px; height: 56px; object-fit: cover; border-radius: 0.45rem; background: var(--paper-2); }
.rank-card strong { display: block; font-family: var(--serif); font-size: 0.98rem; line-height: 1.3; }
.rank-card small { color: var(--muted); }

@media (max-width: 980px) {
  .rank-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .rank-grid { grid-template-columns: 1fr; }
  .prefs { margin-left: 0; }
}

@media print {
  .topbar, .verse, .site-footer, .share-bar, .hero-nav, .dots, .read-progress, .side { display: none !important; }
  body { background: white; }
  .article-layout { width: auto; }
}
