/*
Theme Name: Palani Sacred Archive
Theme URI: https://palani.org/
Author: Palani.org
Description: Tamil-first WordPress front end and shared visual system for the Palani sacred archive.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: palani-archive
*/

:root {
  --background: #f8f3e7;
  --foreground: #2f211d;
  --card: #fffdf7;
  --card-foreground: #2f211d;
  --popover: #fffdf7;
  --popover-foreground: #2f211d;
  --primary: #a23224;
  --primary-foreground: #fffaf0;
  --secondary: #ead9bd;
  --secondary-foreground: #48291f;
  --muted: #efe6d5;
  --muted-foreground: #6e5b51;
  --accent: #e4aa34;
  --accent-foreground: #341c13;
  --destructive: #b42318;
  --border: #d8c8ad;
  --input: #d8c8ad;
  --ring: #b86d24;
  --chart-1: #a23224;
  --chart-2: #176d68;
  --chart-3: #372247;
  --chart-4: #d9951c;
  --chart-5: #bb5c49;
  --radius: 0.5rem;
  --sidebar: #f2e7d4;
  --sidebar-foreground: #2f211d;
  --sidebar-primary: #a23224;
  --sidebar-primary-foreground: #fffaf0;
  --sidebar-accent: #e4aa34;
  --sidebar-accent-foreground: #341c13;
  --sidebar-border: #d8c8ad;
  --sidebar-ring: #b86d24;
  --ink: #2f211d;
  --paper: #f8f3e7;
  --paper-deep: #ede1ca;
  --saffron: #e19a1d;
  --kumkum: #a23224;
  --indigo: #2e1b3a;
  --teal: #176d68;
  --line: #d8c8ad;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1c131d;
    --foreground: #f8eedb;
    --card: #281c29;
    --card-foreground: #f8eedb;
    --popover: #281c29;
    --popover-foreground: #f8eedb;
    --primary: #e4aa34;
    --primary-foreground: #251423;
    --secondary: #4a3548;
    --secondary-foreground: #f8eedb;
    --muted: #3a2938;
    --muted-foreground: #d7c6b0;
    --accent: #c57c24;
    --accent-foreground: #fff8eb;
    --border: #594754;
    --input: #6b5868;
    --ring: #e4aa34;
    --sidebar: #251a26;
    --sidebar-foreground: #f8eedb;
    --sidebar-primary: #e4aa34;
    --sidebar-primary-foreground: #251423;
    --sidebar-accent: #a23224;
    --sidebar-accent-foreground: #fff8eb;
    --sidebar-border: #594754;
    --sidebar-ring: #e4aa34;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Noto Sans Tamil", "Noto Sans Malayalam", "Noto Sans Telugu", "Noto Sans Kannada", "Noto Sans Devanagari", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: #fff; color: #111; padding: 10px 16px; }
.skip-link:focus { top: 12px; }

.main-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 253, 247, .96); border-bottom: 1px solid rgba(117, 83, 57, .22); backdrop-filter: blur(14px); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 300px; }
.brand-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--kumkum); overflow: hidden; }
.brand-mark img { width: 42px; height: 42px; object-fit: contain; filter: invert(1); mix-blend-mode: screen; }
.brand strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1; letter-spacing: .17em; }
.brand strong b { font-size: .82em; font-weight: 700; }
.brand small { display: block; margin-top: 5px; color: #765f54; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; }
.primary-nav { display: flex; align-items: center; gap: 8px; font-size: .91rem; font-weight: 700; }
.primary-nav a { padding: 10px 13px; border-radius: 3px; }
.primary-nav a:hover { background: var(--paper-deep); }
.primary-nav .nav-emphasis { background: var(--kumkum); color: #fff; padding-inline: 18px; }
.primary-nav .nav-emphasis:hover { background: #7f251b; }

.language-bar { background: #e6aa35; border-bottom: 1px solid #c8821d; color: #301b20; }
.language-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.language-inner > p { max-width: 390px; display: flex; align-items: center; gap: 10px; margin: 0; font-size: .82rem; font-weight: 700; line-height: 1.4; }
.language-inner > p svg { width: 19px; flex: 0 0 auto; }
.language-options { display: flex; align-items: stretch; gap: 5px; }
.language-options button { min-height: 40px; min-width: 76px; display: grid; place-items: center; align-content: center; padding: 5px 12px; border: 1px solid rgba(69,35,28,.24); border-radius: 3px; background: rgba(255,255,255,.3); color: #392023; cursor: pointer; font-size: .87rem; line-height: 1.15; }
.language-options button:hover { background: rgba(255,255,255,.58); }
.language-options button.is-active { border-color: var(--indigo); background: var(--indigo); color: #fff8e9; box-shadow: 0 4px 12px rgba(46,27,58,.2); }
.language-options small { margin-top: 3px; font-size: .59rem; letter-spacing: .07em; opacity: .78; }

.hero { position: relative; min-height: 540px; display: grid; align-items: center; overflow: hidden; background: var(--indigo); color: #fff; isolation: isolate; }
.hero-image { object-fit: cover; object-position: center 49%; z-index: -3; transform: scale(1.015); }
.hero-overlay { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(32, 15, 40, .94) 0%, rgba(44, 19, 43, .82) 38%, rgba(37, 16, 34, .28) 72%, rgba(37, 16, 34, .18) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(20, 11, 23, .42), transparent 48%); }
.hero-content { padding-block: 70px 90px; }
.eyebrow, .kicker { margin: 0 0 12px; color: var(--kumkum); font-weight: 800; font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; }
.hero .eyebrow { color: #f2c465; }
.hero h1 { max-width: 690px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.35rem, 7vw, 6.2rem); font-weight: 500; line-height: .94; letter-spacing: -.045em; text-wrap: balance; }
.hero-intro { max-width: 650px; margin: 24px 0 28px; color: #f3ead9; font-family: Georgia, "Times New Roman", serif; font-size: 1.23rem; line-height: 1.55; }
.hero-search { width: min(760px, 100%); display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: #fffdf8; border: 1px solid rgba(255,255,255,.7); border-radius: 6px; box-shadow: 0 22px 50px rgba(15, 5, 20, .32); color: var(--ink); }
.hero-search > svg { width: 20px; color: #866f62; }
.hero-search input { height: 48px; border: 0; box-shadow: none; background: transparent; font-size: 1rem; }
.hero-search input:focus-visible { box-shadow: none; border: 0; }
.hero-search [data-slot="button"] { height: 48px; border-radius: 3px; background: var(--kumkum); font-weight: 800; }

.path-strip { position: relative; z-index: 3; margin-top: -33px; }
.path-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--card); box-shadow: 0 18px 48px rgba(67, 42, 29, .12); }
.path-card { min-height: 100px; display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; gap: 14px; padding: 20px 22px; border-right: 1px solid var(--line); transition: background .2s ease, transform .2s ease; }
.path-card:last-child { border-right: 0; }
.path-card:hover { background: #fff6e5; transform: translateY(-2px); }
.path-card > svg:first-child { color: var(--kumkum); width: 25px; }
.path-card strong, .path-card small { display: block; }
.path-card strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.03rem; }
.path-card small { margin-top: 2px; color: #79665c; font-size: .77rem; line-height: 1.35; }
.path-arrow { width: 16px; color: #9f8a7d; }

.ad-space { min-height: 112px; margin-top: 34px; display: grid; place-items: center; border-block: 1px solid #dfd3bf; color: #96877c; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.ad-space-bottom { margin-top: 0; border-top: 0; min-height: 132px; }

.illustrated-section { padding-block: 90px 96px; background: #2b1930; color: #fff8ec; }
.illustrated-heading { display: grid; grid-template-columns: 1.05fr .95fr; align-items: end; gap: 70px; margin-bottom: 36px; }
.illustrated-heading h2 { max-width: 650px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 4.6vw, 4.6rem); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.illustrated-heading > p { max-width: 560px; margin: 0 0 5px; color: #dac9d8; font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; line-height: 1.6; }
.illustrated-grid { display: grid; grid-template-columns: 1.25fr .75fr; grid-template-rows: repeat(2, minmax(280px, 1fr)); gap: 16px; }
.illustrated-card { min-height: 280px; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.18); background: #6c302a; box-shadow: 0 18px 44px rgba(11,4,16,.24); isolation: isolate; }
.illustrated-card-featured { min-height: 610px; grid-row: 1 / span 2; }
.illustrated-image { position: absolute; inset: 0; z-index: -2; }
.illustrated-image img { object-fit: cover; transition: transform .55s ease; }
.illustrated-card-featured .illustrated-image img { object-position: center 18%; }
.illustrated-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(22,8,22,.96) 0%, rgba(32,11,27,.7) 38%, rgba(28,10,25,.08) 76%); transition: background .25s ease; }
.illustrated-card:hover .illustrated-image img { transform: scale(1.035); }
.illustrated-card:hover::after { background: linear-gradient(0deg, rgba(91,24,27,.98) 0%, rgba(47,14,28,.72) 42%, rgba(28,10,25,.1) 78%); }
.illustrated-copy { min-height: 100%; display: grid; grid-template-columns: 42px 1fr; align-items: end; gap: 18px; padding: 28px; }
.illustrated-card-featured .illustrated-copy { padding: 38px; }
.illustrated-number { align-self: start; color: #f1be58; font-family: Georgia, serif; font-size: 1.2rem; }
.illustrated-copy h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 2.5vw, 2.45rem); font-weight: 500; line-height: 1.06; }
.illustrated-card-featured .illustrated-copy h3 { font-size: clamp(2.6rem, 4vw, 4.25rem); }
.illustrated-copy p { max-width: 550px; margin: 11px 0 17px; color: #f0e3df; font-size: .91rem; line-height: 1.55; }
.illustrated-copy strong { display: inline-flex; align-items: center; gap: 8px; color: #f4c769; font-size: .76rem; letter-spacing: .04em; }
.illustrated-copy strong svg { width: 16px; }

.section { padding-block: 92px; }
.section-heading { display: grid; grid-template-columns: 1.05fr .95fr; align-items: end; gap: 70px; margin-bottom: 36px; }
.section-heading h2, .feature-copy h2, .archive-title-row h2, .visitor-band h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 4vw, 4rem); font-weight: 500; line-height: 1.05; letter-spacing: -.035em; }
.section-heading > p, .compact-heading > p { max-width: 560px; margin: 0 0 4px; color: #725f54; font-family: Georgia, "Times New Roman", serif; font-size: 1.04rem; }
.collection-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.collection-card { min-height: 220px; display: grid; grid-template-columns: 52px 1fr 28px; align-items: start; gap: 20px; padding: 34px; color: #fff; overflow: hidden; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.collection-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -52px; bottom: -70px; border: 1px solid rgba(255,255,255,.19); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.04), 0 0 0 50px rgba(255,255,255,.03); }
.collection-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(55, 29, 25, .16); }
.collection-number { color: rgba(255,255,255,.6); font-family: Georgia, serif; font-size: 1.55rem; }
.collection-card h3 { margin: 0; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.collection-card p { max-width: 430px; margin: 12px 0 0; color: rgba(255,255,255,.84); font-size: .94rem; }
.collection-card > svg { width: 23px; margin-top: 3px; }
.collection-indigo { background: #382145; }
.collection-saffron { background: #b76a18; }
.collection-teal { background: #17645f; }
.collection-rose { background: #8f3228; }

.image-feature { padding: 0 0 94px; }
.image-feature-grid { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 540px; background: #efe2ca; }
.feature-image-wrap { min-height: 480px; position: relative; }
.feature-image-wrap > img { object-fit: cover; }
.image-caption { position: absolute; left: 18px; bottom: 18px; background: rgba(38,21,32,.86); color: #fff; padding: 8px 11px; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.feature-copy { display: flex; flex-direction: column; justify-content: center; padding: 58px; }
.feature-copy > p:not(.kicker) { margin: 22px 0 24px; color: #68554b; font-family: Georgia, serif; font-size: 1.08rem; }
.feature-copy ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid #d3bfa3; }
.feature-copy li { display: grid; grid-template-columns: 25px 1fr; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #d3bfa3; font-weight: 700; }
.feature-copy li svg { width: 19px; color: var(--kumkum); }
.feature-copy a:hover { color: var(--kumkum); }

.archive-section { padding-block: 96px; background: var(--indigo); color: #f8f0df; scroll-margin-top: 80px; }
.archive-title-row { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.archive-title-row p:not(.kicker) { margin: 15px 0 0; color: #d9c9d8; }
.kicker-light { color: #f0bd55; }
.legacy-index-link { display: inline-flex; align-items: center; gap: 9px; padding-bottom: 5px; border-bottom: 1px solid #f0bd55; color: #f0bd55; font-size: .9rem; font-weight: 800; }
.legacy-index-link svg { width: 17px; }
.archive-tools { margin-top: 34px; padding: 24px; background: #f8f3e7; color: var(--ink); }
.archive-input-wrap { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 7px; padding: 4px 12px; border: 1px solid #cdbd9f; background: #fff; }
.archive-input-wrap svg { width: 20px; color: #876f62; }
.archive-input-wrap input { height: 48px; border: 0; box-shadow: none; background: transparent; font-size: 1rem; }
.archive-input-wrap input:focus-visible { border: 0; box-shadow: none; }
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.category-tabs [data-slot="button"] { border-radius: 999px; font-size: .82rem; }
.category-tabs [aria-pressed="false"] { background: transparent; }
.archive-result-meta { min-height: 52px; display: flex; align-items: center; justify-content: space-between; color: #d9c9d8; font-size: .84rem; }
.archive-result-meta button { border: 0; background: none; color: #f0bd55; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.archive-import-count { white-space: nowrap; color: #f0c369; font-family: Arial, sans-serif; font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.archive-card { min-height: 232px; display: flex; flex-direction: column; padding: 24px; background: #fffdf7; color: var(--ink); border-top: 4px solid #d58a21; transition: transform .2s ease, background .2s ease; }
.archive-card:hover { transform: translateY(-3px); background: #fff5df; }
.archive-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--kumkum); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.archive-card-top small { color: #8b796d; font-size: .62rem; letter-spacing: .06em; }
.archive-card h3 { margin: 22px 0 8px; font-family: Georgia, serif; font-size: 1.23rem; line-height: 1.2; }
.archive-card p { margin: 0; color: #705e54; font-size: .88rem; line-height: 1.55; }
.read-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 18px; color: var(--kumkum); font-size: .78rem; font-weight: 800; }
.read-link svg { width: 15px; }
.archive-more { display: flex; justify-content: center; padding-top: 28px; }
.archive-more [data-slot="button"] { min-width: 220px; border-color: rgba(255,255,255,.44); background: transparent; color: #fff; }
.archive-more [data-slot="button"]:hover { background: #fff; color: var(--indigo); }
.no-results { min-height: 330px; display: grid; place-items: center; align-content: center; text-align: center; background: #fffdf7; color: var(--ink); padding: 40px; }
.no-results > svg { color: var(--kumkum); }
.no-results h3 { margin: 14px 0 4px; font-family: Georgia, serif; font-size: 1.4rem; }
.no-results p { margin: 0 0 20px; color: #756258; }

.compact-heading { align-items: center; }
.story-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.story-card { background: #fffdf7; border: 1px solid var(--line); }
.story-image { height: 300px; position: relative; overflow: hidden; }
.story-large .story-image { height: 390px; }
.story-image img { object-fit: cover; transition: transform .4s ease; }
.story-card:hover img { transform: scale(1.025); }
.story-card > div:last-child { padding: 26px 28px 30px; }
.story-card span { color: var(--kumkum); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.story-card h3 { margin: 6px 0 8px; font-family: Georgia, serif; font-size: 1.75rem; font-weight: 500; }
.story-card p { margin: 0 0 16px; color: #6f5c52; }
.story-card a { display: inline-flex; align-items: center; gap: 7px; color: var(--kumkum); font-size: .82rem; font-weight: 800; }
.story-card a svg { width: 16px; }

.legacy-title-band { padding-block: 58px 62px; background: var(--indigo); color: #fff9ed; }
.legacy-title-band h1 { max-width: 900px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.65rem, 5vw, 5rem); font-weight: 500; line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.legacy-title-band > .site-shell > p:last-child { max-width: 780px; margin: 20px 0 0; color: #ddcede; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; line-height: 1.65; }
.legacy-breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; color: #d7c4d5; font-size: .78rem; }
.legacy-breadcrumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.legacy-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 58px; padding-block: 64px 88px; }
.legacy-sidebar { position: sticky; top: 112px; border-top: 4px solid var(--kumkum); background: #efe3cd; }
.legacy-sidebar h2 { margin: 0; padding: 20px 20px 14px; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 600; }
.legacy-sidebar nav { border-top: 1px solid #d8c5a9; }
.legacy-sidebar nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 20px; border-bottom: 1px solid #d8c5a9; font-size: .86rem; font-weight: 700; }
.legacy-sidebar nav a:hover { background: #fff7e7; color: var(--kumkum); }
.legacy-sidebar nav svg { width: 15px; flex: 0 0 auto; }
.legacy-source-links { padding: 16px 20px 20px; }
.legacy-source-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 7px; color: #74443b; font-size: .78rem; line-height: 1.4; }
.legacy-source-links a:hover { color: var(--kumkum); text-decoration: underline; text-underline-offset: 3px; }
.legacy-source-links svg { width: 15px; flex: 0 0 auto; }
.legacy-content { min-width: 0; max-width: 830px; color: #33231e; font-family: Georgia, "Times New Roman", serif; font-size: 1.07rem; line-height: 1.78; }
.legacy-content > :first-child { margin-top: 0; }
.legacy-content h1, .legacy-content h2, .legacy-content h3, .legacy-content h4 { color: #33211d; font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.16; text-wrap: balance; }
.legacy-content h1 { margin: 2.2rem 0 1rem; font-size: 2.5rem; }
.legacy-content h2 { margin: 2.1rem 0 .9rem; font-size: 2rem; }
.legacy-content h3 { margin: 1.8rem 0 .75rem; font-size: 1.5rem; }
.legacy-content p { margin: 0 0 1.15em; }
.legacy-content a { color: #8e2c22; text-decoration: underline; text-decoration-color: rgba(142,44,34,.35); text-underline-offset: 3px; }
.legacy-content a:hover { text-decoration-color: currentColor; }
.legacy-content img { display: block; max-width: 100%; height: auto; margin: 1.15rem auto; border: 1px solid rgba(83,53,39,.18); }
.legacy-content a img { transition: transform .2s ease, box-shadow .2s ease; }
.legacy-content a:hover img { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(49,25,19,.16); }
.legacy-content figure { margin: 2rem 0; }
.legacy-content figcaption, .legacy-content small { color: #776157; font-family: Arial, sans-serif; font-size: .79rem; }
.legacy-content blockquote { margin: 1.8rem 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--saffron); color: #5b463d; font-size: 1.08em; }
.legacy-content ul, .legacy-content ol { margin: 0 0 1.3rem; padding-left: 1.45rem; }
.legacy-content table { max-width: 100%; margin: 1.6rem auto; border-collapse: collapse; }
.legacy-content td, .legacy-content th { padding: .55rem .65rem; vertical-align: top; }
.legacy-content th { background: #eee1c9; text-align: left; }
.legacy-content pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }
.legacy-content center { max-width: 100%; }
.legacy-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-bottom: 88px; }
.legacy-pager > a { min-height: 112px; display: flex; align-items: center; gap: 16px; padding: 20px 24px; border: 1px solid var(--line); background: #fffdf7; transition: transform .2s ease, border-color .2s ease; }
.legacy-pager > a:last-child { justify-content: flex-end; text-align: right; }
.legacy-pager > a:hover { transform: translateY(-2px); border-color: #af7d62; }
.legacy-pager svg { width: 20px; flex: 0 0 auto; color: var(--kumkum); }
.legacy-pager small, .legacy-pager strong { display: block; }
.legacy-pager small { margin-bottom: 4px; color: #8b7367; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.legacy-pager strong { font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.35; }

.visitor-band { padding-block: 88px; background: var(--kumkum); color: #fff7e8; }
.visitor-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 90px; }
.visitor-grid > div:first-child > p:last-child { margin: 20px 0 0; color: #f1d4c9; font-family: Georgia, serif; font-size: 1.04rem; }
.visitor-links { border-top: 1px solid rgba(255,255,255,.3); }
.visitor-links a { display: grid; grid-template-columns: 28px 1fr 22px; align-items: center; gap: 16px; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,.3); transition: padding .2s ease; }
.visitor-links a:hover { padding-left: 8px; }
.visitor-links svg { width: 21px; }
.visitor-links strong, .visitor-links small { display: block; }
.visitor-links strong { font-family: Georgia, serif; font-size: 1.08rem; }
.visitor-links small { color: #f0d1c5; font-size: .76rem; }

footer { padding: 64px 0 20px; background: #231529; color: #e9ddce; }
.footer-grid { display: grid; grid-template-columns: 1.8fr repeat(3, 1fr); gap: 50px; padding-bottom: 48px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { filter: invert(1); opacity: .9; }
.footer-brand strong, .footer-brand span { display: block; }
.footer-brand strong { font-family: Georgia, serif; font-size: 1.22rem; letter-spacing: .15em; }
.footer-brand span { margin-top: 3px; color: #bfaebc; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; }
.footer-grid h2 { margin: 0 0 13px; color: #f0bd55; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.footer-grid > div:not(:first-child) a { display: block; padding: 4px 0; color: #d9ccd7; font-size: .86rem; }
.footer-grid > div:not(:first-child) a:hover { color: #fff; }
.footer-base { display: flex; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid #49364c; color: #a997a9; font-size: .72rem; }
.footer-base p { margin: 0; }

@media (max-width: 980px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: 14px 10px; gap: 8px; }
  .main-header { position: relative; }
  .primary-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .language-inner { align-items: flex-start; flex-direction: column; gap: 10px; padding-block: 13px; }
  .language-inner > p { max-width: none; }
  .language-options { width: 100%; overflow-x: auto; padding-bottom: 3px; }
  .hero { min-height: 500px; }
  .path-grid { grid-template-columns: repeat(2, 1fr); }
  .path-card:nth-child(2) { border-right: 0; }
  .path-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .collection-grid, .section-heading, .illustrated-heading, .image-feature-grid, .visitor-grid { grid-template-columns: 1fr; }
  .section-heading, .illustrated-heading { gap: 20px; }
  .illustrated-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .illustrated-card-featured { grid-column: 1 / -1; grid-row: auto; min-height: 520px; }
  .image-feature-grid { min-height: auto; }
  .feature-copy { padding: 46px; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .legacy-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 34px; }
  .visitor-grid { gap: 42px; }
  .footer-grid { grid-template-columns: 1.7fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 2; }
}

@media (max-width: 700px) {
  .site-shell { width: min(100% - 26px, 1180px); }
  .header-inner { min-height: auto; }
  .brand { min-width: 0; }
  .brand small { font-size: .64rem; }
  .primary-nav { gap: 2px; }
  .primary-nav a { padding: 8px 10px; white-space: nowrap; font-size: .84rem; }
  .language-inner { width: calc(100% - 20px); }
  .language-inner > p { font-size: .76rem; }
  .language-options button { min-width: 80px; min-height: 42px; font-size: .84rem; }
  .hero { min-height: 600px; align-items: end; }
  .hero-image { object-position: 57% center; }
  .hero-overlay { background: linear-gradient(0deg, rgba(32, 15, 40, .96) 0%, rgba(38, 17, 40, .77) 64%, rgba(37, 16, 34, .18) 100%); }
  .hero-content { padding-block: 180px 68px; }
  .hero h1 { font-size: clamp(3.2rem, 16vw, 4.5rem); }
  .hero-intro { font-size: 1.04rem; }
  .hero-search { grid-template-columns: 24px 1fr; }
  .hero-search [data-slot="button"] { grid-column: 1 / -1; width: 100%; }
  .path-strip { margin-top: 0; }
  .path-grid { width: 100%; grid-template-columns: 1fr; border-inline: 0; }
  .path-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .path-card:last-child { border-bottom: 0; }
  .section { padding-block: 70px; }
  .section-heading h2, .illustrated-heading h2, .feature-copy h2, .archive-title-row h2, .visitor-band h2 { font-size: 2.55rem; }
  .illustrated-section { padding-block: 70px; }
  .illustrated-grid { grid-template-columns: 1fr; }
  .illustrated-card, .illustrated-card-featured { grid-column: auto; min-height: 430px; }
  .illustrated-card:not(.illustrated-card-featured) { min-height: 340px; }
  .illustrated-card-featured .illustrated-copy { padding: 28px; }
  .illustrated-copy { grid-template-columns: 34px 1fr; gap: 10px; padding: 24px; }
  .collection-grid { grid-template-columns: 1fr; }
  .collection-card { min-height: 240px; grid-template-columns: 42px 1fr 20px; padding: 28px 24px; gap: 12px; }
  .feature-image-wrap { min-height: 360px; }
  .feature-copy { padding: 38px 26px 44px; }
  .archive-section { padding-block: 72px; }
  .archive-title-row { align-items: flex-start; flex-direction: column; }
  .archive-tools { padding: 14px; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .category-tabs [data-slot="button"] { white-space: nowrap; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card { min-height: 215px; }
  .legacy-title-band { padding-block: 46px 50px; }
  .legacy-title-band h1 { font-size: 2.75rem; }
  .legacy-layout { grid-template-columns: 1fr; gap: 36px; padding-block: 42px 66px; }
  .legacy-sidebar { position: static; }
  .legacy-sidebar nav { display: grid; grid-template-columns: repeat(2, 1fr); }
  .legacy-sidebar nav a:nth-child(odd) { border-right: 1px solid #d8c5a9; }
  .legacy-content { font-size: 1rem; line-height: 1.72; }
  .legacy-content h1 { font-size: 2.15rem; }
  .legacy-content h2 { font-size: 1.75rem; }
  .legacy-content table { display: block; overflow-x: auto; }
  .legacy-pager { grid-template-columns: 1fr; padding-bottom: 68px; }
  .legacy-pager > span { display: none; }
  .story-grid { grid-template-columns: 1fr; }
  .story-large .story-image, .story-image { height: 300px; }
  .visitor-band { padding-block: 70px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 22px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid > div:last-child { grid-column: auto; }
  .footer-base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* WordPress and cPanel release additions */
.admin-bar .main-header { top: 32px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; z-index: 100000; top: 10px; left: 10px; width: auto; height: auto; padding: 12px 16px; clip: auto; background: #fff; color: #111; }
.palani-icon { width: 1.55rem; display: inline-grid; place-items: center; color: var(--kumkum); font-size: 1.15rem; line-height: 1; }
.path-arrow, .link-arrow { color: #9f8a7d; font-size: 1.1rem; }
.palani-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 3px; padding: 10px 18px; background: var(--kumkum); color: #fffaf0; cursor: pointer; font-weight: 800; }
.palani-button:hover, .palani-button:focus-visible { background: #7f251b; color: #fff; }
.palani-button-outline { border-color: rgba(255,255,255,.48); background: transparent; }
.hero-image, .illustrated-image img, .feature-image-wrap > img, .story-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-image { position: absolute; inset: 0; }
.illustrated-copy, .story-card > div:last-child { position: relative; }
.archive-card[hidden], .palani-hidden { display: none !important; }
.archive-input-wrap input, .hero-search input { width: 100%; outline: none; }
.category-tabs button { min-height: 40px; padding: 7px 13px; border: 1px solid #cdbd9f; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; font-size: .82rem; font-weight: 700; }
.category-tabs button:hover, .category-tabs button[aria-pressed="true"] { border-color: var(--kumkum); background: var(--kumkum); color: #fff; }
.archive-section .category-tabs button { border-color: #aa987a; }
.archive-more { display: flex; justify-content: center; padding-top: 28px; }
.archive-more button { min-width: 220px; }
.recent-section { padding-block: 88px; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.recent-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: #fffdf7; }
.recent-card-image { aspect-ratio: 16 / 10; overflow: hidden; background: #eadfca; }
.recent-card-image img { width: 100%; height: 100%; object-fit: cover; }
.recent-card-body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.recent-card-body time { color: #8d6f61; font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.recent-card-body h3 { margin: 10px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.18; }
.recent-card-body p { margin: 0 0 18px; color: #705e54; }
.recent-card-body .read-link { margin-top: auto; }
.content-title-band { padding-block: 54px 58px; background: var(--indigo); color: #fff9ed; }
.content-title-band h1 { max-width: 940px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 5vw, 4.8rem); font-weight: 500; line-height: 1.04; letter-spacing: -.04em; }
.content-title-band p { max-width: 760px; margin: 18px 0 0; color: #dacbdb; }
.content-shell { width: min(900px, calc(100% - 40px)); margin-inline: auto; padding-block: 62px 88px; }
.entry-content { color: #33231e; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.8; }
.entry-content > :first-child { margin-top: 0; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content a { color: #8e2c22; text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.18; }
.entry-meta { margin-bottom: 26px; color: #7d685d; font-size: .8rem; }
.posts-layout { padding-block: 70px 90px; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span { min-width: 40px; padding: 8px 12px; border: 1px solid var(--line); background: #fffdf7; text-align: center; }
.palani-notice { padding: 18px 20px; border-left: 4px solid var(--saffron); background: #fff7e6; color: #4d372e; }
.legacy-source-links a { word-break: break-word; }
.legacy-content iframe, .legacy-content script, .legacy-content style, .legacy-content form { display: none !important; }

@media (max-width: 980px) {
  .recent-grid, .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
  .admin-bar .main-header { top: 46px; }
}

@media (max-width: 700px) {
  .recent-grid, .posts-grid { grid-template-columns: 1fr; }
  .content-shell { width: min(100% - 26px, 900px); padding-block: 42px 66px; }
}
