@import url("https://fonts.googleapis.com/css2?family=Tenali+Ramakrishna&display=swap");
.heritage-page{--ink:#183c32;--gold:#ad8445;color:var(--ink)}
.heritage-hero{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(220px,1fr);align-items:center;gap:clamp(24px,5vw,72px);padding:clamp(24px,5vw,64px);background:#eae7d8;border-radius:18px}
.heritage-hero h1{font:500 clamp(36px,5.2vw,72px)/1.16 Georgia,"Tiro Telugu",serif;margin:.35em 0}
.heritage-hero p,.heritage-block p{line-height:1.85}
.heritage-hero figure,.heritage-closing{margin:0;text-align:center}
.heritage-hero img{display:block;width:100%;max-height:470px;object-fit:contain;border-radius:12px}
.heritage-page figcaption{padding-top:.65rem;font-size:.85rem;color:#526459}
.heritage-kicker{display:block;text-transform:uppercase;font-size:.75rem;font-weight:700;letter-spacing:.08em;color:#77562b}
.heritage-page a{color:var(--ink);text-underline-offset:3px}
.heritage-jump{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0 0}
.heritage-jump a{display:flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid #d7c9aa;border-radius:999px;background:#fffaf0;font-weight:600;text-decoration:none}
.heritage-jump a:hover{background:#eee5d0}
.heritage-icon{width:22px;height:22px;flex:none;color:var(--gold)}
.heritage-block{margin:clamp(36px,6vw,76px) 0;scroll-margin-top:24px}
.heritage-block h2{font-family:Georgia,"Tiro Telugu",serif;font-size:clamp(27px,3.5vw,44px)}
.heritage-block .pc-section{margin-top:24px}
.heritage-block .pc-card{border-top:3px solid #c3a16a}
.heritage-feature{display:grid;grid-template-columns:auto minmax(0,1fr);gap:22px;padding:clamp(20px,4vw,44px);background:#e4ebdf;border-radius:14px}
.heritage-feature>.heritage-icon{width:42px;height:42px}
.heritage-feature h2{margin:.25em 0}
.heritage-branches{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:9px;padding:0;list-style:none;counter-reset:heritage-branch}
.heritage-branches li{counter-increment:heritage-branch;display:flex;gap:8px;align-items:baseline;padding:9px 12px;background:#fffcf5;border:1px solid #ded6c3;border-radius:8px;font-family:"Tiro Telugu","Nirmala UI",serif;overflow-wrap:anywhere}
.heritage-branches li::before{content:counter(heritage-branch,decimal-leading-zero);color:#77562b;font:600 .73rem system-ui}
.heritage-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:16px}
.heritage-person{padding:20px;background:#fffcf5;border:1px solid #ded6c3;border-radius:12px}
.heritage-person h3{margin:.5em 0}
.heritage-person .heritage-icon{margin-bottom:9px}
.heritage-closing img{display:block;width:100%;max-height:440px;object-fit:cover;object-position:center 12%;border-radius:14px}
.ruler-group-title { margin: 30px 0 14px; font-size: 1.25rem; }
.ruler-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ruler-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fffcf5;
  border: 1px solid #d9ccb4;
  border-radius: 14px;
  box-shadow: 0 3px 12px #40372208;
}
.ruler-tile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  color: #695337;
  background: #e8eee3;
  border-bottom: 1px solid #ded6c3;
}
.ruler-tile:nth-child(3n + 2) .ruler-tile-banner { background-color: #f2ead8; }
.ruler-tile:nth-child(3n + 3) .ruler-tile-banner { background-color: #eee8e1; }
.ruler-crest {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border: 1px solid #d8b878;
  border-radius: 50%;
  background: #fff5db;
  color: #795b2b;
}
.ruler-crest svg { width: 32px; height: 32px; }
.ruler-tile-number { font: 400 1.35rem Georgia, serif; letter-spacing: .08em; }
.ruler-tile-copy { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 21px; }
.ruler-tile-copy h4 { margin: 0; font-size: 1.15rem; }
.ruler-tile-copy p { margin: 9px 0 14px; }
.ruler-tile-copy a { align-self: flex-start; margin-top: auto; }
@media (max-width: 850px) { .ruler-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .ruler-grid { grid-template-columns: minmax(0, 1fr); } }
@media(max-width:700px){.heritage-hero{grid-template-columns:minmax(0,1fr)}.heritage-hero img{max-height:370px}.heritage-feature{gap:12px}.heritage-feature>.heritage-icon{width:26px;height:26px}}
.ruler-crest-portrait { width: 72px; height: 72px; object-fit: contain; border: 0; }

.heritage-feature-art {
    grid-column: 2;
    margin: 0;
    min-width: 0;
}
.heritage-feature-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}
.heritage-feature-art figcaption {
    margin-top: .4rem;
    font-size: .85rem;
}
@media (min-width: 1000px) {
    #sannidhi {
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 34%);
        align-items: center;
        padding-block: clamp(20px, 2.3vw, 34px);
    }
    #sannidhi > .heritage-icon { align-self: start; }
    .heritage-feature-art { grid-column: 3; }
}
@media (max-width: 700px) {
    .heritage-feature-art { grid-column: 1 / -1; }
}


.heritage-hero h1:lang(te) {
    font: 400 clamp(32px, 4.6vw, 64px)/1.2 "Tenali Ramakrishna", "Tiro Telugu", serif;
}
