/* Self-hosted Playfair Display + Inter (Google Fonts, OFL 1.1).
   Variable woff2 — one file per style/subset covers every weight the site uses.
   Subsets: latin + latin-ext only (cyrillic/greek/vietnamese omitted). */

/* Inter — normal */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/Inter-Variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/Inter-Variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — italic */
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/Inter-Italic-Variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/Inter-Italic-Variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Playfair Display — normal */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-Variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-Variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Playfair Display — italic */
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-Italic-Variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/PlayfairDisplay-Italic-Variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ================================================================
   FORTRESS INDIA — EDUCATION
   Design system adapted from the parent site (css/style.css).
   Typography: Playfair Display (headings) + Inter (body)
   Palette: Warm ivory · Deep charcoal · Maroon · Antique gold
   Same tokens, same component vocabulary — a sibling, not a spin-off.
   ================================================================ */

/* 1. FONTS ----------------------------------------------------- */
/* Playfair Display + Inter load via a <link rel="stylesheet"> in each
   page's <head>, not @import here — see the Google Fonts link next to
   the preconnect hints. @import would block CSS parsing on a second
   network round-trip before the browser even discovers the font request. */

/* Self-hosted Hindi display face — applied only when html[lang="hi"] */
@font-face {
  font-family: 'Noto Serif Devanagari';
  src: url('../fonts/NotoSerifDevanagari-Variable.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html[lang="hi"] {
  --font-display: 'Noto Serif Devanagari', 'Playfair Display', Georgia, serif;
  --font-body:    'Noto Serif Devanagari', Inter, system-ui, -apple-system, sans-serif;
}

/* 2. DESIGN TOKENS (identical to the parent site) -------------- */
:root {
  --bg:              #F4EEE5;   /* Sandstone */
  --bg-alt:          #EDE6DA;
  --bg-inset:        #E6DDD0;

  --bg-deep:         #1C1814;
  --bg-mid:          #272320;

  --text-primary:    #2B2B2B;   /* Graphite */
  --text-secondary:  #7A6A5A;

  --text-on-dark:    #F4EEE5;
  --text-gold:       #C2A15A;

  --accent:          #3D0B04;   /* Royal Maroon */
  --accent-gold:     #C2A15A;

  --maroon:          #3D0B04;
  --sandstone:       #F4EEE5;
  --amber:           #FA7526;
  --gold-harvest:    #FFB81F;
  --olive:           #5D6A27;
  --graphite:        #2B2B2B;

  /* Four-pillar accent tokens */
  --pillar-geography:    #2B2B2B;
  --pillar-environment:  #5D6A27;
  --pillar-institutions: #3D0B04;
  --pillar-knowledge:    #FA7526;

  --rule:            #D8CEBC;
  --rule-light:      #D8CEBC;
  --rule-dark:       #3A3330;
  --rule-gold:       #C2A15A;

  --link:            #2B2B2B;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    Inter, system-ui, -apple-system, sans-serif;

  --max-prose: 800px;
  --max-wide:  1100px;
  --section-v: 6rem;
  --prose-width: 660px;
}

em, i {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 500;
}

/* 3. RESET & BASE ------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Grain texture overlay, same treatment as the main site */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 4. TYPOGRAPHY --------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 400; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 400; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

/* 5. LINKS --------------------------------------------------------- */
a {
  color: var(--link);
  text-decoration: none;
}

a.text-link {
  border-bottom: 1px solid var(--rule-gold);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* 6. LAYOUT -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.container--prose { max-width: var(--max-prose); }
.container--narrow { max-width: 760px; }

.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.section-v {
  padding: var(--section-v) 0;
}

/* 7. NAVIGATION ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.95rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.brand-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-gold);
  font-weight: 500;
}

.brand-name {
  display: block;
  line-height: 1.15;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 28px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--text-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  white-space: nowrap;
  transition: color 0.25s ease;
  padding-bottom: 3px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-gold);
  transition: width 0.25s ease;
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.nav-link.active { color: var(--accent); font-weight: 500; }
.nav-link.active::after { width: 100%; background-color: var(--accent); }

.nav-link--external {
  color: var(--text-secondary);
  opacity: 0.85;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.35rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px;
  background: transparent;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn[lang="hi"] { font-family: 'Noto Serif Devanagari', var(--font-body); }

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--text-on-dark);
}

.lang-btn:hover:not([aria-pressed="true"]) {
  color: var(--text-primary);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* 8. EYEBROW / SECTION LABELS --------------------------------------- */
.label-gold {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-gold);
  margin-bottom: 1.25rem;
}

.rule-gold {
  width: 50px;
  height: 1px;
  background: var(--accent-gold);
  border: none;
  margin: 1.5rem auto;
}

.section-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: var(--font-body);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.pull-quote {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.3rem;
  line-height: 1.55;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 3rem 0;
  max-width: 640px;
  color: var(--text-primary);
}

/* 9. BUTTONS --------------------------------------------------------- */
.btn-outline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.75rem 2.5rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  border-radius: 0;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--bg);
}

/* 10. BOOK CARD — shared unit for shelves & grids -------------------- */
.book-item { margin: 0; min-width: 0; }

.book-item__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: #FBF8F2;
  border: 1px solid rgba(43, 43, 43, 0.14);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(28, 24, 20, 0.06);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.book-item__link:hover,
.book-item__link:focus-visible {
  box-shadow: 0 10px 24px rgba(28, 24, 20, 0.14);
  border-color: rgba(28, 24, 20, 0.2);
  transform: translateY(-3px);
}

.book-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  background-color: var(--bg-inset);
  overflow: hidden;
}

.book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-cover--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.book-cover-fallback {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
  color: var(--text-primary);
}

.book-item__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
  padding: 0.95rem 1.1rem 1.15rem;
}

.book-item__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  color: var(--text-primary);
}

.book-item__line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0.35rem 0 0;
  white-space: normal;
  overflow: hidden;
}

.book-item__buy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}

.book-item__link:hover .book-item__buy { color: var(--accent-gold); }

/* Grid of book cards (theme/pillar/region shelves, /books) */
.books-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.books-grid--tight { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 900px) {
  .books-grid,
  .books-grid--tight { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .books-grid,
  .books-grid--tight { grid-template-columns: 1fr; max-width: 380px; }
}

/* 11. PILLAR TAGS ----------------------------------------------------- */
.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.pillar-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--text-primary);
  background: var(--bg-alt);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pillar-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pillar-tag:hover { border-color: currentColor; }

.pillar-tag--geography    { color: var(--pillar-geography); }
.pillar-tag--environment  { color: var(--pillar-environment); }
.pillar-tag--institutions { color: var(--pillar-institutions); }
.pillar-tag--knowledge    { color: var(--pillar-knowledge); }

/* 12. MAP PANEL -------------------------------------------------------- */
.map-section {
  padding: var(--section-v) 0;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 2.5rem;
  align-items: start;
}

.map-panel {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem;
}

.map-panel svg {
  display: block;
  width: 100%;
  height: auto;
}

.map-region {
  cursor: pointer;
  fill: var(--bg-inset);
  stroke: var(--text-primary);
  stroke-width: 0.75;
  transition: fill 0.2s ease;
}

.map-region:hover,
.map-region.is-active {
  fill: var(--accent-gold);
}

.map-pin {
  cursor: pointer;
  fill: var(--accent);
  transition: fill 0.2s ease;
}

.map-pin:hover { fill: var(--accent-gold); }

.map-sidebar {
  border-left: 1px solid var(--rule);
  padding-left: 2rem;
}

.map-sidebar__eyebrow {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.75rem;
}

.map-sidebar__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.map-sidebar__count {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.map-region-list {
  list-style: none;
  margin-top: 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.map-region-list li { margin-bottom: 0.5rem; }

.map-region-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
}

.map-region-list a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-sidebar { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
}

/* 13. SHELF (region / theme / pillar listing pages) --------------------- */
.shelf-hero {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.shelf-hero__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-gold);
  margin-bottom: 1rem;
}

.shelf-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.shelf-hero__intro {
  max-width: var(--prose-width);
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

.shelf-index {
  padding: 3rem 0;
}

.shelf-index__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  list-style: none;
}

.shelf-index__card {
  display: block;
  padding: 1.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 6px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.shelf-index__card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.shelf-index__card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.shelf-index__card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* 13b. SHELF FILTER (theme filter chips on /books) ------------------------ */
.shelf-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 2rem 0 0;
}

.shelf-filter__btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.shelf-filter__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.shelf-filter__btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-dark);
}

.shelf-empty {
  color: var(--text-secondary);
  padding: 2rem 0;
}

/* 14. BOOK PAGE ----------------------------------------------------------- */
.book-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.book-hero__layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.book-hero__cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--bg-inset);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(28, 24, 20, 0.15);
}

.book-hero__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-hero__eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.book-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.book-hero__line {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: var(--prose-width);
  margin-bottom: 1.25rem;
}

.book-hero__crumbs {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.book-hero__crumbs a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.book-hero__crumbs a:hover { color: var(--accent); }

.pillar-tags--hero { margin-top: 1.5rem; }

.book-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.25rem;
  text-align: center;
}

/* "On the map" locator list — plain linked index, no map graphic */
.book-map-locator {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.book-map-locator li a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text-primary);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.book-map-locator li a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Pillars-taught section — pillar chip + link back to the parent site */
.pillars-taught {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: var(--prose-width);
}

.pillars-taught__item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pillars-taught__parent-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-bottom: 1px dotted var(--rule);
}

.pillars-taught__parent-link:hover { color: var(--accent); }

.book-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--rule);
}

.book-section:last-of-type { border-bottom: none; }

.book-section__heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.book-section__body {
  max-width: var(--prose-width);
  color: var(--text-primary);
}

.book-section__body p { line-height: 1.8; }

.book-excerpt {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.75;
  border-left: 3px solid var(--accent-gold);
  padding-left: 1.5rem;
  max-width: var(--prose-width);
}

.book-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.book-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

.editions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: var(--prose-width);
}

.edition-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.edition-row__label {
  font-family: var(--font-display);
  font-size: 0.98rem;
}

.edition-row__lang {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

.edition-row__buy {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* Edition with nothing to buy online: same slot, no link, no hover */
.edition-row__buy--muted {
  color: var(--text-secondary, #7A6A5A);
  text-decoration: none;
  cursor: default;
}

.related-works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
}

@media (max-width: 800px) {
  .book-hero__layout { grid-template-columns: 1fr; }
  .book-hero__cover { max-width: 240px; }
}

/* 15. FOOTER --------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--rule);
  padding-top: 5rem;
  padding-bottom: 3rem;
  margin-top: 3rem;
}

.footer-grid {
  max-width: var(--max-wide);
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 0 2rem;
}

.footer-col h4 {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  font-weight: 400;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  font-family: var(--font-body);
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 2rem 0;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-display);
  font-style: normal;
  color: var(--text-secondary);
  font-size: 1rem;
  display: block;
  margin-bottom: 0.6rem;
}

.footer-devanagari {
  font-size: 0.88rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 1.25rem;
}

.footer-copyright {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
}

/* 16. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav.open {
    max-height: 480px;
    padding: 1rem 0;
  }

  .site-nav .nav-link {
    width: 100%;
    padding: 0.85rem 2rem;
  }

  .site-nav .lang-toggle {
    margin: 0.5rem 2rem 0;
  }

  .header-inner { position: relative; }
}

@media (max-width: 640px) {
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  .footer-grid { padding: 0 1.25rem; }
  .footer-bottom { padding: 2rem 1.25rem 0; }
}

/* 17. PRINT ------------------------------------------------------------------ */
@media print {
  .site-header, .site-footer, .map-panel { display: none; }
}

/* 18. REDUCED MOTION ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* ---- Skip link ------------------------------------------------
   The first tab stop on every page. Off-screen until focused, so it costs a
   sighted visitor nothing, and saves a keyboard or screen-reader user tabbing
   through the announce bar, the logo and seven nav items on every single page.
   Colours use var() with literal fallbacks so the rule works unchanged in the
   education stylesheet, which does not define the main site's tokens. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--bg-deep, #1C1814);
  color: var(--text-on-dark, #F5EFE6);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent-gold, #C2A15A);
  outline-offset: -2px;
}
