:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1b2236;
  --muted: #5d6478;
  --line: #e7e1d6;
  --navy: #1d2b4f;
  --navy-2: #2c3e6b;
  --accent: #d9792b; /* apricot */
  --accent-ink: #9a4a0c;
  --wine: #8c2f39;
  --chip: #f2ece2;
  --shadow: 0 1px 2px rgba(27, 34, 54, .06), 0 8px 24px rgba(27, 34, 54, .06);
  --radius: 18px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}
.lang-hy { --font: 'Noto Sans Armenian', 'Inter', system-ui, sans-serif; --display: 'Noto Serif Armenian', 'Fraunces', Georgia, serif; }
.lang-fa { --font: 'Vazirmatn', Tahoma, system-ui, sans-serif; --display: 'Vazirmatn', Tahoma, sans-serif; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10141f; --surface: #181e2d; --ink: #ecebe7; --muted: #a6abb8; --line: #2a3246;
    --navy: #0c1222; --navy-2: #1d2b4f; --accent: #f0a05a; --accent-ink: #f6b97f; --wine: #e07a85; --chip: #232b3f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
.lang-fa body, body.lang-fa { line-height: 1.85; }
a { color: inherit; }
img { max-width: 100%; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; font-weight: 650; margin: 0 0 .5em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.site-header__row { display: flex; align-items: center; gap: 16px; padding: 12px 0 8px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; min-width: 0; }
.brand strong { display: block; font-family: var(--display); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; opacity: .7; font-size: .75rem; }
.brand__short { display: none !important; }
.header-search { margin-inline-start: auto; display: flex; background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 4px 2px 14px; }
.header-search input { background: none; border: 0; color: #fff; width: 180px; font: inherit; font-size: .9rem; outline: none; }
.header-search input::placeholder { color: rgba(255,255,255,.6); }
.header-search button { background: none; border: 0; color: #fff; padding: 6px 8px; cursor: pointer; }
.langs { display: flex; align-items: center; gap: 4px; font-size: .85rem; }
.langs svg { opacity: .7; margin-inline-end: 4px; }
.langs a { text-decoration: none; padding: 4px 8px; border-radius: 999px; opacity: .8; }
.langs a[aria-current] { background: var(--accent); opacity: 1; }
.mainnav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.mainnav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .92rem; opacity: .85; white-space: nowrap; }
.mainnav a:hover { background: rgba(255,255,255,.08); opacity: 1; }
.mainnav a[aria-current] { background: rgba(255,255,255,.14); opacity: 1; }

/* hero */
.hero { position: relative; color: #fff; overflow: hidden; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(217,121,43,.45), transparent 60%),
  radial-gradient(900px 500px at -10% 120%, rgba(140,47,57,.55), transparent 60%),
  linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.hero::after { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 10v60M18 32h44' stroke='%23fff' stroke-opacity='.05' stroke-width='3'/%3E%3C/svg%3E"); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; padding: 64px 0 56px; max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; opacity: .8; margin: 0 0 12px; }
.lang-fa .eyebrow, .lang-hy .eyebrow { letter-spacing: 0; text-transform: none; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 12px; }
.lead { font-size: 1.15rem; opacity: .92; margin: 0 0 24px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.quick a { text-decoration: none; font-size: .88rem; padding: 4px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; }
.quick a:hover { background: rgba(255,255,255,.12); }

/* search */
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
[dir=rtl] .search { padding: 6px 18px 6px 6px; }
.search svg { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1rem; padding: 10px 4px; outline: none; color: inherit; }
.search--big input { font-size: 1.08rem; padding: 12px 4px; }
.search button, .btn { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.search button:hover, .btn:hover { filter: brightness(1.05); }
.btn-ghost { background: none; border: 1px solid var(--line); color: inherit; border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }

/* sections */
.section { padding: 40px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section__title { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section__title small { font-family: var(--font); font-size: .85rem; font-weight: 400; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(217,121,43,.2); }
.more { color: var(--accent-ink); font-weight: 600; text-decoration: none; font-size: .95rem; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.pagehead { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; padding: 40px 0 32px; }
.pagehead h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.center { text-align: center; }

/* tiles */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.tile { --tone: hsl(var(--h) 45% 42%); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(27,34,54,.08), 0 16px 32px rgba(27,34,54,.1); }
.tile__link { text-decoration: none; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 8px; flex: 1; }
.tile__head { display: flex; align-items: center; gap: 12px; }
.datebadge { display: grid; place-items: center; min-width: 58px; padding: 6px 4px; border-radius: 12px; background: var(--tone); color: #fff; line-height: 1.05; text-align: center; }
.datebadge__d { font-family: var(--display); font-size: 1.45rem; font-weight: 650; }
.datebadge__m { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.datebadge__y { font-size: .7rem; opacity: .85; }
.tile__who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .9rem; color: var(--muted); }
.tile__preacher { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #fff; background: hsl(var(--h) 40% 55%); flex: none; font-family: 'Inter', system-ui, sans-serif; }
.tile__media { margin-inline-start: auto; display: flex; gap: 6px; color: var(--muted); }
.tile__title { font-size: 1.22rem; margin: 2px 0 0; }
.keytext { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 0; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); font-weight: 600; font-size: .88rem; }
.tile__msg { margin: 0; color: var(--muted); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 8px 18px 18px; }
.tags a { text-decoration: none; font-size: .8rem; color: var(--muted); background: var(--chip); padding: 2px 10px; border-radius: 999px; }
.tags a:hover { color: var(--accent-ink); }
.tile--featured { flex-direction: row; flex-wrap: wrap; border: 0; background: linear-gradient(135deg, color-mix(in srgb, hsl(var(--h) 45% 42%) 10%, var(--surface)), var(--surface)); }
.tile--featured .tile__link { padding: 28px; }
.tile--featured .tile__title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.tile--featured .tile__msg { font-size: 1.05rem; -webkit-line-clamp: 6; color: var(--ink); }
.tile--featured .tags { flex-basis: 100%; padding: 0 28px 24px; }

/* chips & people */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; }
.chips a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: calc(.92rem * var(--w, 1)); }
.chips a:hover { border-color: var(--accent); color: var(--accent-ink); }
.chips span { color: var(--muted); font-size: .78em; }
.people { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.people a { display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.people a:hover { border-color: var(--accent); }
.people .avatar { width: 40px; height: 40px; font-size: .85rem; }
.people small { display: block; color: var(--muted); font-size: .8rem; }
.books { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.books a, .books .none { display: flex; flex-direction: column; text-decoration: none; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.books a:hover { border-color: var(--accent); }
.books small { color: var(--accent-ink); font-size: .8rem; }
.books .none { opacity: .45; }

/* finder */
.finder .search { margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filter { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; opacity: .95; }
.filter select { font: inherit; font-size: .9rem; padding: 7px 10px; border-radius: 10px; border: 0; background: rgba(255,255,255,.95); color: #1b2236; max-width: 230px; }
.finder .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hint { font-size: .85rem; opacity: .75; margin: 12px 0 0; }
.results { color: var(--muted); margin: 0 0 16px; font-weight: 500; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius); }

/* sermon page */
.sermon__hero { color: #fff; padding: 28px 0 36px; background:
  radial-gradient(900px 400px at 100% 0%, hsl(var(--h) 55% 45% / .55), transparent 60%),
  linear-gradient(160deg, var(--navy), var(--navy-2)); }
.back { text-decoration: none; opacity: .8; font-size: .9rem; }
.sermon__meta { opacity: .85; margin: 18px 0 8px; }
.sermon__meta a { text-decoration-color: rgba(255,255,255,.4); }
.sermon__hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 900px; }
.sermon__key { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-top: 20px; align-items: stretch; }
.keycard { display: flex; flex-direction: column; justify-content: center; gap: 4px; text-decoration: none; background: var(--accent); color: #fff; border-radius: 16px; padding: 14px 20px; }
.keycard span { display: flex; gap: 8px; align-items: center; font-family: var(--display); font-size: 1.3rem; font-weight: 650; }
.keycard small, .keymsg small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; font-family: var(--font); font-style: normal; }
.keymsg { margin: 0; background: rgba(255,255,255,.1); border-radius: 16px; padding: 14px 20px; font-size: 1.08rem; font-style: italic; border-inline-start: 4px solid var(--accent); }
.lang-fa .keymsg, .lang-hy .keymsg { font-style: normal; }
.sermon__body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; padding: 36px 0; }
.sermon__main h2 { font-size: 1.3rem; margin-top: 8px; }
.sermon__main section { margin-bottom: 28px; }
.media { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.player { margin: 0 0 14px; }
.player figcaption { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.player audio { width: 100%; }
.yt { margin-top: 12px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.yt button { width: 100%; height: 100%; border: 0; background-size: cover; background-position: center; cursor: pointer; display: grid; place-items: center; color: #fff; }
.yt button svg { width: 64px; height: 64px; background: rgba(200,0,0,.85); border-radius: 16px; padding: 14px; }
.yt iframe { width: 100%; height: 100%; border: 0; }
.notice { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-radius: 12px; padding: 12px 16px; font-size: .92rem; }
.prose { font-size: 1.03rem; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose blockquote { margin: 1em 0; padding: .2em 1em; border-inline-start: 3px solid var(--accent); color: var(--muted); }
.prose sup { color: var(--accent-ink); }
.sermon__side h3 { font-size: 1rem; margin-top: 20px; }
.sermon__side .tags { padding: 0; }
.refs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.refs a { text-decoration: none; font-size: .85rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.small { font-size: .85rem; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0 40px; }
.pager a { text-decoration: none; color: var(--accent-ink); max-width: 45%; }
[dir=rtl] .back, [dir=rtl] .pager a, [dir=rtl] .more { unicode-bidi: plaintext; }

.about .lead { color: var(--ink); max-width: 720px; }
.addr { display: flex; gap: 8px; align-items: center; font-weight: 600; }

/* footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 28px 0; font-size: .9rem; margin-top: 24px; }
.site-footer p { display: flex; gap: 8px; align-items: center; margin: 4px 0; }

/* language picker (root page) */
.langpick main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }

@media (max-width: 860px) {
  .two-col, .sermon__body { grid-template-columns: 1fr; }
  .sermon__key { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .tile--featured .tile__link { padding: 20px; }
  .tile--featured .tags { padding: 0 20px 20px; }
}
@media (max-width: 560px) {
  .brand small, .brand__long { display: none !important; }
  .brand__short { display: block !important; font-size: 1rem; }
  .langs { margin-inline-start: auto; }
  .langs svg { display: none; }
  .langs a { padding: 4px 6px; }
  .hero__inner { padding: 40px 0; }
  .search { padding-inline-start: 12px; }
  .search > svg { display: none; }
  .search button { padding: 10px 14px; }
  .grid { grid-template-columns: 1fr; }
  .filter { flex: 1 1 45%; }
  .filter select { max-width: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }
