:root {
  color-scheme: light;
  --author-bg: var(--shared-chrome-canvas, #f2f5f1);
  --author-surface: var(--shared-chrome-surface, #ffffff);
  --author-muted-surface: var(--shared-chrome-surface-raised, #edf2ee);
  --author-text: var(--shared-chrome-text, #18231f);
  --author-text-soft: var(--shared-chrome-muted, #52615b);
  --author-muted: var(--shared-chrome-faint, #6f7b76);
  --author-border: var(--shared-chrome-border, rgba(39, 65, 55, .18));
  --author-border-soft: color-mix(in srgb, var(--author-border) 58%, transparent);
  --author-accent: var(--shared-chrome-accent, #266b52);
  --author-accent-strong: var(--shared-chrome-accent-strong, #174b3a);
  --author-accent-soft: var(--shared-chrome-accent-soft, rgba(38, 107, 82, .10));
  --author-sidebar: 248px;
  --author-reading: 980px;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  background: var(--author-bg);
  color: var(--author-text);
}
body.author-page { overflow-x: hidden; }
.author-page a { color: var(--author-accent); }
.author-page button,
.author-page input { font: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 10000;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--author-text);
  color: var(--author-surface);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.author-layout { min-height: 100vh; }
.author-page:not(.author-page--structured) .author-sidebar {
  position: fixed;
  inset: 58px auto 0 0;
  z-index: 20;
  width: var(--author-sidebar);
  overflow-y: auto;
  padding: 20px 16px 28px;
  border-right: 1px solid var(--author-border);
  background: var(--author-muted-surface);
}
.author-sidebar__back {
  display: inline-block;
  margin: 0 4px 18px;
  color: var(--author-text-soft);
  font-size: .83rem;
  font-weight: 700;
  text-decoration: none;
}
.author-sidebar h2 {
  margin: 0 4px 12px;
  color: var(--author-text);
  font-size: .98rem;
  line-height: 1.4;
}
.author-sidebar__group {
  margin: -6px 4px 12px;
  color: var(--author-muted);
  font-size: .72rem;
  font-weight: 700;
}
.author-sidebar nav { display: grid; gap: 3px; }
.author-sidebar nav a {
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--author-text-soft);
  font-size: .84rem;
  text-decoration: none;
}
.author-sidebar nav a:hover,
.author-sidebar nav a[aria-current="location"] {
  border-left-color: var(--author-accent);
  background: var(--author-accent-soft);
  color: var(--author-accent-strong);
}
.author-sidebar__master {
  display: block;
  margin: 20px 4px 0;
  padding-top: 15px;
  border-top: 1px solid var(--author-border);
  color: var(--author-text-soft);
  font-size: .8rem;
  text-decoration: none;
}

.author-main {
  min-width: 0;
  margin-left: var(--author-sidebar);
  padding: 26px clamp(18px, 4vw, 54px) 64px;
}
.author-page--structured .author-main {
  margin-left: 0;
  padding: 28px clamp(16px, 3vw, 38px) 72px;
}
.author-reading { width: min(100%, var(--author-reading)); margin: 0 auto; }
.author-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
  color: var(--author-muted);
  font-size: .78rem;
}
.author-breadcrumbs a { color: inherit; text-decoration: none; }

.author-family-nav {
  margin: 0 0 12px;
  padding: 10px 14px 11px;
  border: 1px solid var(--author-border);
  border-radius: 8px;
  background: var(--author-surface);
}
.author-family-nav__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}
.author-family-nav__header strong {
  color: var(--author-text);
  font-size: .78rem;
}
.author-family-nav__header > a {
  color: var(--author-muted);
  font-size: .7rem;
  text-decoration: none;
}
.author-family-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 18px;
}
.author-family-nav__links a {
  padding: 4px 0 3px;
  border-bottom: 2px solid transparent;
  color: var(--author-text-soft);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.author-family-nav__links a:hover,
.author-family-nav__links a[aria-current="page"] {
  border-bottom-color: var(--author-accent);
  color: var(--author-accent-strong);
}
.author-family-nav a:focus-visible {
  outline: 2px solid var(--author-accent);
  outline-offset: 3px;
}

.author-page--structured .author-sidebar__label {
  margin: 16px 8px 8px;
  color: var(--author-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
}
.author-page--structured .author-sidebar__family {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
}
.author-page--structured .author-sidebar__family a {
  display: block;
  padding: 7px 10px;
  border-left: 3px solid transparent;
  border-radius: 7px;
  color: var(--author-text-soft);
  font-size: .79rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.author-page--structured .author-sidebar__family a:hover,
.author-page--structured .author-sidebar__family a[aria-current="page"] {
  border-left-color: var(--author-accent);
  background: var(--author-accent-soft);
  color: var(--author-accent-strong);
}
.author-page--structured .author-sidebar__footer-links {
  display: grid;
  gap: 8px;
  margin: 22px 7px 0;
  padding-top: 16px;
  border-top: 1px solid var(--author-border);
}
.author-page--structured .author-sidebar__footer-links a {
  color: var(--author-text-soft);
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
}

.author-study {
  border: 1px solid var(--author-border);
  border-radius: 12px;
  background: var(--author-surface);
  overflow: hidden;
}
.author-page--structured .author-study {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.author-hero {
  padding: clamp(22px, 4vw, 36px) clamp(20px, 4.5vw, 44px) 24px;
  border-bottom: 1px solid var(--author-border);
}
.author-page--structured .author-hero {
  margin-bottom: 16px;
  padding: clamp(24px, 4vw, 40px) clamp(21px, 4.5vw, 46px) 28px;
  border: 1px solid var(--author-border);
  border-radius: 18px;
  background: var(--author-surface);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--author-text) 5%, transparent);
}
.author-eyebrow {
  margin: 0 0 5px;
  color: var(--author-accent);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.author-hero h1 {
  margin: 0;
  color: var(--author-text);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.16;
  letter-spacing: -.035em;
}
.author-hero > p:last-child {
  max-width: 730px;
  margin: 9px 0 0;
  color: var(--author-text-soft);
  font-size: clamp(.95rem, 2vw, 1.08rem);
}
.section-jump {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 9px clamp(14px, 4vw, 36px);
  border-bottom: 1px solid var(--author-border);
  scrollbar-width: thin;
}
.section-jump a {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 5px;
  color: var(--author-text-soft);
  font-size: .79rem;
  font-weight: 700;
  text-decoration: none;
}
.section-jump a:hover { background: var(--author-accent-soft); color: var(--author-accent-strong); }
.author-page--structured .section-jump { display: none; }

.study-section {
  padding: 24px clamp(20px, 4.5vw, 44px) 28px;
  border-bottom: 1px solid var(--author-border);
}
.author-page--structured .study-section {
  margin: 16px 0;
  padding: clamp(22px, 3.6vw, 34px) clamp(20px, 4.2vw, 42px) 24px;
  border: 1px solid var(--author-border);
  border-radius: 18px;
  background: var(--author-surface);
  box-shadow: 0 7px 22px color-mix(in srgb, var(--author-text) 4%, transparent);
  scroll-margin-top: calc(var(--shared-topbar-height, 64px) + 18px);
}
.author-page--structured .study-section:last-child { border-bottom: 1px solid var(--author-border); }
.study-section:last-child { border-bottom: 0; }
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.section-heading > span {
  color: var(--author-accent);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.section-heading h2 {
  margin: 0;
  color: var(--author-text);
  font-size: clamp(1.2rem, 2.4vw, 1.52rem);
  line-height: 1.35;
}
.section-heading small { color: var(--author-muted); font-size: .68em; font-weight: 600; }
.author-page--structured .section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--author-border-soft);
}
.author-page--structured .section-heading > span:first-child {
  display: inline-grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: var(--author-accent);
  color: #fff;
  font-size: .72rem;
  line-height: 1;
}
.author-page--structured .section-heading h2 {
  padding-top: 2px;
  font-size: clamp(1.28rem, 2.8vw, 1.68rem);
}
.section-actions { margin-left: auto; }
.section-bookmark {
  display: inline-grid;
  width: 35px;
  height: 35px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--author-border);
  border-radius: 10px;
  background: var(--author-surface);
  color: var(--author-text-soft);
  font: inherit;
  font-size: 1.02rem;
  cursor: pointer;
}
.section-bookmark:hover,
.section-bookmark:focus-visible,
.section-bookmark.active {
  border-color: var(--author-accent);
  background: var(--author-accent-soft);
  color: var(--author-accent-strong);
}
.section-bookmark:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--author-accent) 24%, transparent);
  outline-offset: 2px;
}
.study-subsection + .study-subsection,
.study-subsection + .focus-note,
.focus-note + .study-subsection { margin-top: 22px; }
.study-subsection h3,
.focus-note h3 {
  margin: 0 0 10px;
  color: var(--author-text);
  font-size: 1.06rem;
}
.study-subsection h4 {
  margin: 18px 0 8px;
  color: var(--author-text-soft);
  font-size: .84rem;
}
.study-subsection p { margin: 0; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--author-border-soft);
}
.fact-row {
  min-width: 0;
  padding: 11px 14px 12px 0;
  border-bottom: 1px solid var(--author-border-soft);
}
.fact-row:nth-child(odd) { padding-right: 24px; }
.fact-row:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--author-border-soft); }
.fact-row dt {
  margin: 0 0 4px;
  color: var(--author-accent-strong);
  font-size: .82rem;
  font-weight: 800;
}
.fact-row dd { margin: 0; color: var(--author-text); font-size: 1rem; line-height: 1.58; }

.identity-list,
.key-title-list,
.important-work-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.identity-list,
.key-title-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--author-border-soft);
}
.identity-list li,
.key-title-list li {
  min-width: 0;
  padding: 14px 18px 15px 0;
  border-bottom: 1px solid var(--author-border-soft);
}
.identity-list li:nth-child(even),
.key-title-list li:nth-child(even) {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--author-border-soft);
}
.identity-list strong,
.key-title-list strong {
  display: block;
  color: var(--author-accent-strong);
  font-size: clamp(1.14rem, 2.2vw, 1.36rem);
  font-weight: 850;
  line-height: 1.42;
}
.identity-list span,
.key-title-list span {
  display: block;
  margin-top: 3px;
  color: var(--author-muted);
  font-size: .86rem;
  line-height: 1.52;
}
.key-title-list li {
  position: relative;
  padding-left: 14px;
}
.key-title-list li::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--author-accent);
}
.key-title-list li:nth-child(even) { padding-left: 38px; }
.key-title-list li:nth-child(even)::before { left: 24px; }

.chronology, .work-lines, .quote-list { margin: 0; padding: 0; list-style: none; }
.chronology { border-top: 1px solid var(--author-border-soft); }
.chronology li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--author-border-soft);
}
.chronology time,
.work-lines time {
  color: var(--author-accent-strong);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}
.chronology p { margin: 0; font-size: 1rem; line-height: 1.58; }
.chronology p strong,
.work-lines strong {
  color: var(--author-text);
  font-size: 1.08rem;
  font-weight: 850;
}
.chronology-content { min-width: 0; }
.embedded-verse {
  margin: 7px 0 2px;
  padding: 8px 12px 8px 14px;
  border-left: 3px solid var(--author-accent);
  background: var(--author-accent-soft);
  color: var(--author-accent-strong);
  font-family: "Tiro Devanagari Hindi", "Hind", serif;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.65;
}
.focus-note {
  padding: 12px 16px 13px;
  border-left: 3px solid var(--author-accent);
  background: var(--author-accent-soft);
}
.focus-note h3 { margin-bottom: 4px; color: var(--author-accent-strong); }
.focus-note p { margin: 0; font-size: .98rem; line-height: 1.58; }
.focus-note ul { margin: 0; padding-left: 20px; }
.focus-note li + li { margin-top: 4px; }

.work-lines { border-top: 1px solid var(--author-border-soft); }
.work-lines li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--author-border-soft);
  font-size: 1rem;
  line-height: 1.56;
}
.plain-recall {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px !important;
  font-size: .91rem;
}
.plain-recall > strong { color: var(--author-accent-strong); font-size: .78rem; }

.quote-list {
  display: grid;
  grid-template-columns: 1fr;
  counter-reset: quotes;
  border-top: 1px solid var(--author-border-soft);
}
.quote-list li {
  position: relative;
  padding: 15px 18px 16px 44px;
  border-bottom: 1px solid var(--author-border-soft);
  counter-increment: quotes;
}
.quote-list li::before {
  content: counter(quotes, decimal-leading-zero);
  position: absolute;
  top: 19px;
  left: 0;
  color: var(--author-accent);
  font-size: .72rem;
  font-weight: 900;
}
.quote-list blockquote {
  position: relative;
  margin: 0;
  padding-left: 15px;
  border-left: 3px solid var(--author-accent);
  color: var(--author-text);
  font-family: "Tiro Devanagari Hindi", "Hind", serif;
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  font-weight: 650;
  line-height: 1.72;
}
.quote-list p {
  margin: 7px 0 0 18px;
  color: var(--author-muted);
  font-size: .88rem;
  line-height: 1.55;
}
.quote-list p strong { color: var(--author-accent-strong); }
.quote-list--meanings { grid-template-columns: 1fr; }
.quote-list--meanings p { max-width: 850px; font-size: .94rem; }

/* Meera's selected pads need breathing room because several entries span many lines. */
.author-study--meerabai #important-lines .quote-list {
  gap: 0;
  border-top: 0;
}
.author-study--meerabai #important-lines .quote-list li {
  padding: 16px 12px 20px 48px;
  border-bottom: 0;
}
.author-study--meerabai #important-lines .quote-list li + li {
  margin-top: 18px;
  padding-top: 30px;
  border-top: 1px solid var(--author-border-soft);
}
.author-study--meerabai #important-lines .quote-list li::before { top: 20px; }
.author-study--meerabai #important-lines .quote-list li + li::before { top: 34px; }
.author-study--meerabai #important-lines .quote-list blockquote {
  max-width: 820px;
}
.author-study--meerabai #important-lines .quote-list p {
  margin-top: 11px;
}

.important-work-list { border-top: 1px solid var(--author-border-soft); }
.important-work-list li {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.65fr);
  gap: 24px;
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--author-border-soft);
}
.important-work-list li > div:only-child { grid-column: 1 / -1; }
.important-work-title {
  display: block;
  color: var(--author-accent-strong);
  font-size: clamp(1.12rem, 2.1vw, 1.3rem);
  font-weight: 850;
  line-height: 1.42;
}
.important-work-byline {
  display: block;
  margin-top: 3px;
  color: var(--author-muted);
  font-size: .82rem;
  font-weight: 750;
}
.important-work-note {
  margin: 0;
  color: var(--author-text);
  font-size: .98rem;
  line-height: 1.62;
}

/* Shailesh Matiyani's supplied groups are memorised as ordered title series. */
.author-study--shailesh-matiyani .matiyani-series-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--author-border-soft);
}
.author-study--shailesh-matiyani .matiyani-series-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--author-border-soft);
}
.author-study--shailesh-matiyani .matiyani-series-list p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 0;
  margin: 0;
  color: var(--author-text);
  font-size: 1.03rem;
  line-height: 1.72;
}
.author-study--shailesh-matiyani .series-work {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 14px;
  border-right: 1px solid var(--author-border);
  color: var(--author-accent-strong);
  font-weight: 700;
}
.author-study--shailesh-matiyani .series-work:first-child { padding-left: 0; }
.author-study--shailesh-matiyani .series-work:last-child {
  padding-right: 0;
  border-right: 0;
}
.author-study--shailesh-matiyani .series-work small {
  color: var(--author-muted);
  font-size: .78em;
  font-weight: 600;
  line-height: 1.4;
}

/*
 * Structured Hindi-author typography
 * ----------------------------------
 * These rules intentionally apply only to the three reviewed structured pages.
 * Hind remains the study face; Tiro Devanagari is reserved for quoted verse so
 * literary lines are visually distinct from explanations and exam facts.
 */
.author-page--structured {
  --author-font-reading: "Hind", "Noto Sans Devanagari", system-ui, sans-serif;
  --author-font-heading: "Hind", "Noto Sans Devanagari", system-ui, sans-serif;
  --author-font-literary: "Tiro Devanagari Hindi", "Hind", serif;
}

.author-page--structured .author-main,
.author-page--structured .author-study {
  font-family: var(--author-font-reading) !important;
}

.author-page--structured .author-hero h1 {
  font-family: var(--author-font-heading) !important;
  font-size: clamp(2.2rem, 4.2vw, 3rem) !important;
  font-weight: 700;
  line-height: 1.16 !important;
}

.author-page--structured .author-hero > p:last-child {
  font-family: var(--author-font-reading) !important;
  font-size: 1rem !important;
  line-height: 1.62 !important;
}

.author-page--structured .section-heading h2 {
  font-family: var(--author-font-heading) !important;
  font-size: clamp(1.42rem, 2.3vw, 1.62rem) !important;
  font-weight: 700;
  line-height: 1.34 !important;
}

.author-page--structured .study-subsection h3,
.author-page--structured .focus-note h3 {
  font-family: var(--author-font-heading) !important;
  font-size: clamp(1.08rem, 1.7vw, 1.2rem) !important;
  font-weight: 700;
  line-height: 1.42 !important;
}

.author-page--structured .study-subsection h4 {
  font-family: var(--author-font-heading) !important;
  font-size: .96rem !important;
  line-height: 1.45 !important;
}

.author-page--structured .fact-row dt {
  font-family: var(--author-font-heading);
  font-size: .84rem;
  line-height: 1.45;
}

.author-page--structured .fact-row dd,
.author-page--structured .chronology p,
.author-page--structured .work-lines li {
  font-family: var(--author-font-reading) !important;
  font-size: 17px !important;
  line-height: 1.62 !important;
}

.author-page--structured :is(.identity-list, .key-title-list) strong {
  font-family: var(--author-font-heading);
  font-size: clamp(1.14rem, 1.8vw, 1.3rem);
  font-weight: 700;
  line-height: 1.38;
}

.author-page--structured :is(.identity-list, .key-title-list) span {
  font-family: var(--author-font-reading);
  font-size: .9rem;
  line-height: 1.5;
}

.author-page--structured .important-work-title {
  font-family: var(--author-font-heading);
  font-size: clamp(1.12rem, 1.8vw, 1.28rem);
  font-weight: 700;
  line-height: 1.4;
}

.author-page--structured .important-work-note,
.author-page--structured .focus-note p {
  font-family: var(--author-font-reading) !important;
  font-size: .98rem !important;
  line-height: 1.6 !important;
}

.author-page--structured .embedded-verse,
.author-page--structured .quote-list blockquote {
  font-family: var(--author-font-literary) !important;
  font-size: clamp(1.18rem, 1.9vw, 1.3rem) !important;
  font-weight: 400;
  line-height: 1.72 !important;
}

.author-page--structured .quote-list p {
  font-family: var(--author-font-reading) !important;
  font-size: .92rem !important;
  line-height: 1.55 !important;
}

.author-page--structured .quote-list--meanings p {
  font-size: .96rem !important;
  line-height: 1.58 !important;
}

.author-page--structured .author-study--meerabai #important-lines .quote-list blockquote {
  line-height: 1.9 !important;
}

.author-page--structured .plain-recall {
  font-family: var(--author-font-reading);
  font-size: .95rem;
  line-height: 1.58;
}

.author-page--structured :is(.chronology time, .work-lines time) {
  font-family: var(--author-font-reading);
  font-size: .82rem;
  line-height: 1.45;
}

.author-page--structured .complete-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--author-border-soft);
}
.author-page--structured .complete-btn {
  --completion-accent: var(--author-accent);
  --completion-accent-strong: var(--author-accent-strong);
  --completion-bg: var(--author-surface);
  --completion-border: var(--author-border);
  --completion-text: var(--author-text-soft);
  --completion-done-bg: var(--author-accent-soft);
}
.author-page--structured .section-meta {
  color: var(--author-muted);
  font-size: .72rem;
  font-weight: 800;
}

/* Preserved master-author content, restyled by this standalone family. */
.legacy-author-content .poet-card {
  border: 1px solid var(--author-border);
  border-radius: 12px;
  background: var(--author-surface) !important;
  overflow: hidden;
  box-shadow: none !important;
}
.legacy-author-content .poet-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px clamp(20px, 4vw, 38px) 20px;
  border-bottom: 1px solid var(--author-border);
  background: var(--author-surface) !important;
}
.legacy-author-content .poet-avatar {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: var(--author-accent-soft) !important;
  color: var(--author-accent);
  font-size: 1.2rem;
}
.legacy-author-content .poet-name {
  color: var(--author-text);
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  font-weight: 850;
  line-height: 1.2;
}
.legacy-author-content .poet-subtitle { margin-top: 4px; color: var(--author-text-soft); font-size: .9rem; }
.legacy-author-content .poet-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.legacy-author-content .tag,
.legacy-author-content .period-badge {
  padding: 3px 7px;
  border: 1px solid var(--author-border);
  border-radius: 4px;
  background: transparent !important;
  color: var(--author-text-soft) !important;
  font-size: .7rem;
}
.legacy-author-content .poet-body { padding: 22px clamp(20px, 4vw, 38px) 30px; }
.legacy-author-content .info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--author-border-soft);
}
.legacy-author-content .info-cell {
  padding: 10px 18px 11px 0;
  border-bottom: 1px solid var(--author-border-soft);
  background: transparent !important;
}
.legacy-author-content .info-cell:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--author-border-soft); }
.legacy-author-content .info-label { color: var(--author-accent-strong) !important; font-size: .73rem; font-weight: 800; }
.legacy-author-content .info-value { color: var(--author-text) !important; font-size: .9rem; }
.legacy-author-content .subsection-title {
  margin: 24px 0 10px;
  padding: 0 0 7px;
  border-bottom: 1px solid var(--author-border);
  color: var(--author-text) !important;
  font-size: 1.05rem;
  font-weight: 800;
}
.legacy-author-content .awards-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.legacy-author-content .award-item {
  padding: 8px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--author-border-soft) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--author-text) !important;
  font-size: .88rem;
}
.legacy-author-content .mnemonic,
.legacy-author-content .dhara-card {
  margin: 10px 0;
  padding: 12px 14px;
  border: 0;
  border-left: 3px solid var(--author-accent);
  border-radius: 0;
  background: var(--author-accent-soft) !important;
  color: var(--author-text) !important;
}
.legacy-author-content .accordion { border-bottom: 1px solid var(--author-border-soft); background: transparent !important; }
.legacy-author-content .accordion-header,
.legacy-author-content .poem-header {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border: 0;
  background: transparent !important;
  color: var(--author-text) !important;
  cursor: pointer;
  text-align: left;
  font-weight: 750;
}
.legacy-author-content .accordion-chevron,
.legacy-author-content .poem-chevron { margin-left: auto; color: var(--author-accent); }
.legacy-author-content .accordion-body,
.legacy-author-content .poem-body { display: none; padding: 0 0 13px; color: var(--author-text-soft); }
.legacy-author-content .accordion.open .accordion-body,
.legacy-author-content .poem-block.open .poem-body { display: block; }
.legacy-author-content .works-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.legacy-author-content .work-chip {
  padding: 4px 8px;
  border: 1px solid var(--author-border);
  border-radius: 4px;
  background: transparent !important;
  color: var(--author-text) !important;
  font-size: .8rem;
}
.legacy-author-content .timeline { border-top: 1px solid var(--author-border-soft); }
.legacy-author-content .tl-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--author-border-soft);
  color: var(--author-text) !important;
  font-size: .88rem;
}
.legacy-author-content .tl-label { color: var(--author-accent-strong) !important; font-size: .73rem; font-weight: 800; }
.legacy-author-content .quote-card {
  margin: 0;
  padding: 10px 0;
  border: 0 !important;
  border-bottom: 1px solid var(--author-border-soft) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.legacy-author-content .quote-card-header,
.legacy-author-content .quote-card-body { padding: 0; background: transparent !important; }
.legacy-author-content .quote-text { color: var(--author-text) !important; font-size: .91rem; font-weight: 650; }
.legacy-author-content .quote-meaning,
.legacy-author-content .quote-source { margin-top: 3px; color: var(--author-muted) !important; font-size: .76rem; }
.legacy-author-content .flashcard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.legacy-author-content .flashcard { min-height: 150px; perspective: 800px; cursor: pointer; }
.legacy-author-content .flashcard-inner { position: relative; height: 100%; min-height: 150px; transition: transform .28s; transform-style: preserve-3d; }
.legacy-author-content .flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.legacy-author-content .flashcard-front,
.legacy-author-content .flashcard-back {
  position: absolute;
  inset: 0;
  padding: 14px;
  border: 1px solid var(--author-border);
  border-radius: 7px;
  background: var(--author-muted-surface) !important;
  color: var(--author-text) !important;
  backface-visibility: hidden;
}
.legacy-author-content .flashcard-back { transform: rotateY(180deg); }
.legacy-author-content .fc-hint,
.legacy-author-content .fc-flip-icon { color: var(--author-muted) !important; font-size: .7rem; }
.legacy-author-content .fc-question,
.legacy-author-content .fc-answer { margin-top: 8px; color: var(--author-text) !important; font-size: .86rem; }
.legacy-author-content .poem-block { border-bottom: 1px solid var(--author-border-soft); }
.legacy-author-content .poem-num { color: var(--author-accent); font-size: .7rem; font-weight: 900; }
.legacy-author-content .poem-title { color: var(--author-text) !important; }
.legacy-author-content .poem-source,
.legacy-author-content .poem-bhav { color: var(--author-muted) !important; }
.legacy-author-content table { width: 100%; border-collapse: collapse; color: var(--author-text); }
.legacy-author-content th,
.legacy-author-content td { padding: 8px; border: 1px solid var(--author-border); text-align: left; }

.author-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.author-pagination a {
  padding: 12px 14px;
  border: 1px solid var(--author-border);
  border-radius: 7px;
  background: var(--author-surface);
  color: var(--author-text-soft);
  text-decoration: none;
}
.author-pagination a:last-child { text-align: right; }
.author-pagination small { display: block; color: var(--author-muted); font-size: .7rem; }
.author-pagination strong { color: var(--author-text); font-size: .88rem; }

@media (max-width: 900px) {
  .author-page:not(.author-page--structured) .author-sidebar { display: none; }
  .author-main { margin-left: 0; padding-top: 18px; }
}

@media (max-width: 880px) {
  .author-page--structured .study-sidebar {
    height: calc(100vh - var(--shared-topbar-height, 60px));
    height: calc(100dvh - var(--shared-topbar-height, 60px));
    min-height: calc(100vh - var(--shared-topbar-height, 60px));
    min-height: calc(100dvh - var(--shared-topbar-height, 60px));
    max-height: none;
  }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 68px; }
  .author-main { padding: 12px 12px 44px; }
  .author-family-nav { padding: 9px 11px 10px; }
  .author-family-nav__header { margin-bottom: 5px; }
  .author-family-nav__links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .author-study, .legacy-author-content .poet-card { border-radius: 8px; }
  .author-hero { padding: 20px 17px 17px; }
  .study-section { padding: 20px 17px 23px; }
  .author-page--structured .author-hero,
  .author-page--structured .study-section { border-radius: 15px; }
  .author-page--structured .section-heading {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
  }
  .author-page--structured .section-heading > span:first-child {
    width: 32px;
    height: 32px;
  }
  .author-page--structured .section-heading h2 { font-size: 1.26rem; }
  .section-bookmark { width: 32px; height: 32px; }
  .fact-grid,
  .identity-list,
  .key-title-list,
  .legacy-author-content .info-grid,
  .legacy-author-content .awards-list,
  .legacy-author-content .flashcard-grid,
  .quote-list { grid-template-columns: 1fr; }
  .fact-row:nth-child(odd),
  .fact-row:nth-child(even),
  .legacy-author-content .info-cell,
  .legacy-author-content .info-cell:nth-child(even) { padding: 10px 0; border-left: 0; }
  .identity-list li,
  .identity-list li:nth-child(even),
  .key-title-list li,
  .key-title-list li:nth-child(even) {
    padding: 12px 0 13px 14px;
    border-left: 0;
  }
  .key-title-list li::before,
  .key-title-list li:nth-child(even)::before { left: 0; }
  .chronology li { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .work-lines li { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
  .plain-recall { grid-template-columns: 1fr; gap: 3px; }
  .legacy-author-content .poet-header { padding: 19px 17px 16px; }
  .legacy-author-content .poet-avatar { display: none; }
  .legacy-author-content .poet-body { padding: 18px 17px 24px; }
  .legacy-author-content .tl-item { grid-template-columns: 68px minmax(0, 1fr); gap: 9px; }
  .author-pagination { grid-template-columns: 1fr; }
  .author-pagination a:last-child { text-align: left; }
  .important-work-list li { grid-template-columns: 1fr; gap: 5px; }
  .quote-list li { padding: 13px 0 14px 35px; }
  .quote-list li::before { top: 17px; }
  .quote-list blockquote { padding-left: 11px; }
  .quote-list p { margin-left: 14px; }
  .author-study--meerabai #important-lines .quote-list li {
    padding: 14px 0 18px 37px;
  }
  .author-study--meerabai #important-lines .quote-list li + li {
    margin-top: 14px;
    padding-top: 24px;
  }
  .author-study--meerabai #important-lines .quote-list li::before { top: 18px; }
  .author-study--meerabai #important-lines .quote-list li + li::before { top: 28px; }
  .author-study--meerabai #important-lines .quote-list blockquote { line-height: 1.82 !important; }
  .author-page--structured .complete-row { margin-top: 20px; padding-top: 14px; }

  .author-page--structured .author-hero h1 {
    font-size: clamp(2rem, 9vw, 2.28rem) !important;
  }

  .author-page--structured .section-heading h2 {
    font-size: 1.38rem !important;
  }

  .author-page--structured .study-subsection h3,
  .author-page--structured .focus-note h3 {
    font-size: 1.08rem !important;
  }

  .author-page--structured .embedded-verse,
  .author-page--structured .quote-list blockquote {
    font-size: 1.14rem !important;
    line-height: 1.68 !important;
  }

  .author-page--structured .quote-list p {
    font-size: .96rem !important;
  }

  .author-page--structured .fact-row dd,
  .author-page--structured .chronology p,
  .author-page--structured .work-lines li {
    font-size: 16.5px !important;
  }
}

:is(html.dark, html[data-theme="dark"]) .author-page--structured .section-heading > span:first-child {
  color: #1a1712;
}

@media print {
  .author-sidebar,
  .author-breadcrumbs,
  .author-family-nav,
  .section-jump,
  .author-pagination { display: none !important; }
  .author-main { margin: 0; padding: 0; }
  .author-study { border: 0; }
  .study-section { break-inside: auto; }
  .focus-note,
  .embedded-verse,
  .quote-list li { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .legacy-author-content .flashcard-inner { transition: none; }
}

/* Premchand: long title inventories are compact study lists, not standalone heading rows. */
.author-study--premchand .premchand-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 30px;
  counter-reset: premchand-work;
}
.author-study--premchand .premchand-work-grid li {
  position: relative;
  display: block;
  min-width: 0;
  padding: 9px 0 10px 34px;
  counter-increment: premchand-work;
}
.author-study--premchand .premchand-work-grid li::before {
  content: counter(premchand-work, decimal-leading-zero);
  position: absolute;
  top: 11px;
  left: 0;
  color: var(--author-accent);
  font-family: var(--author-font-heading);
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.5;
}
.author-page--structured .author-study--premchand .premchand-work-grid .important-work-title {
  font-size: 1.02rem;
  line-height: 1.42;
}
.author-study--premchand .premchand-work-grid .important-work-byline {
  margin-top: 1px;
  font-size: .76rem;
  line-height: 1.4;
}
.author-study--premchand .mnemonic-work {
  color: var(--author-accent-strong);
  font-weight: 750;
  background: linear-gradient(transparent 62%, var(--author-accent-soft) 62%);
  padding: 0 .04em;
}

@media (max-width: 720px) {
  .author-study--premchand .premchand-work-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
}

/* Shekhar Joshi: three exam-critical stories keep title → पात्र/विषय relationships compact. */
.author-study--shekhar-joshi .shekhar-story-facts {
  display: grid;
  gap: 7px;
  margin: 0;
}
.author-study--shekhar-joshi .shekhar-story-facts > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.author-study--shekhar-joshi .shekhar-story-facts dt {
  color: var(--author-accent-strong);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.55;
}
.author-study--shekhar-joshi .shekhar-story-facts dd {
  margin: 0;
  color: var(--author-text);
  font-size: .96rem;
  line-height: 1.58;
}
.author-study--shekhar-joshi .shekhar-story-groups .important-work-title {
  font-size: 1.04rem;
}

@media (max-width: 720px) {
  .author-study--shekhar-joshi .shekhar-story-facts > div {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
  }
}
