/* Telugu Daily Calendar — styles.css
   Mobile-first, handcrafted tear-calendar aesthetic */

:root {
  /* Core palette: maroon + cream paper + ink, saffron accent */
  --color-maroon: #c0392b;
  --color-maroon-light: #d44334;
  --color-paper: #ffffff;
  --color-paper-warm: #faf9f7;
  --color-ink: #1a1a1a;
  --color-ink-muted: #5a5a5a;
  --color-saffron: #c45c26;
  --color-saffron-dark: #9a4520;
  --color-gold: #c9a227;
  --color-gold-light: #e0c068;
  --color-sidebar-head: #eae7e1;
  --color-section-head: #eae7e1;
  --color-widget-head-text: var(--color-ink);
  --color-widget-head-meta: var(--color-ink-muted);
  --color-widget-head-border: #d2cdc4;
  --color-section-pill: #f0e6d8;
  --color-body-bg: #f5f2ed;
  /* Derived / functional */
  --color-sheet-head: #f5f0e8;
  --color-tint: #f5f0e8;
  --color-muted-foreground: #6b6458;
  --color-border: #e8e8e8;
  --color-border-warm: #e4e0d8;
  --color-border-dark: #d4d4d4;
  --color-good: #1e6b3a;
  --color-bad: #b91c1c;
  --color-active: #fdf3e9;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "DM Sans", var(--font-sans);
  --font-telugu: "Noto Sans Telugu", var(--font-sans);
  --font-calendar: "Anton", "Impact", "DM Sans", var(--font-sans);
  --font-classic-hero: "Archivo Black", "Anton", var(--font-sans);
  --radius: 6px;
  --shadow-sheet: 0 1px 4px rgba(0, 0, 0, 0.07);
  --cal-sheet-width: var(--max-width);
  --cal-border: 1px solid #ddd8d0;
  --cal-border-strong: 2px solid var(--color-maroon);
  --max-width: 1100px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  /* Slightly larger base for older readers */
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.home,
body.tdc-inner {
  background-color: var(--color-body-bg);
  background-image:
    radial-gradient(ellipse 100% 55% at 50% 0%, rgba(201, 162, 39, 0.06), transparent 58%),
    radial-gradient(ellipse 80% 45% at 50% 100%, rgba(192, 57, 43, 0.03), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Ccircle cx='13' cy='13' r='0.85' fill='%23a89f8c' fill-opacity='0.22'/%3E%3C/svg%3E");
  background-size: auto, auto, 26px 26px;
}

/* Tabular figures for dates and numeric UI columns (DM Sans) */
.cal-date-select,
.festival-list__date,
.festival-list--table .festival-list__head-cell:first-child,
.month-calendar td a,
.month-nav__label,
.sidebar-moon-item__date,
.muhurtham-table td:first-child {
  font-variant-numeric: tabular-nums;
}

/* Tabular timing values — same DM Sans, aligned clock columns */
.cal-classic-timing-table__time,
.cal-ttime,
.utility-bar__clock,
.muhurtham-table .is-good {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.telugu {
  font-family: var(--font-telugu);
}

a {
  color: var(--color-saffron-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* Utility bar */
.utility-bar {
  background: var(--color-maroon);
  color: #fff;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid var(--color-gold);
}

.utility-bar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.utility-bar__quote {
  flex: 1;
  min-width: 0;
}

.utility-bar__quote-text {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.utility-bar__quote-body {
  font-style: italic;
  line-height: 1.4;
}

.utility-bar__quote-body::before {
  content: "\201C";
}

.utility-bar__quote-body::after {
  content: "\201D";
}

.utility-bar__quote-source {
  font-style: normal;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.utility-bar__quote-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.utility-bar__clock {
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.utility-bar__controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.utility-bar__lang {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.utility-bar__lang-btn {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.utility-bar__lang-btn.is-active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

@media (max-width: 479px) {
  .utility-bar__quote {
    display: none;
  }

  .utility-bar__inner {
    justify-content: flex-end;
  }
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1rem 1.05rem;
  color: var(--color-ink);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.site-logo:hover {
  text-decoration: none;
}

/* Mini calendar icon */
.site-logo__mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
}

.site-logo__svg {
  display: block;
  width: 36px;
  height: 36px;
}

.site-logo__title {
  font-family: 'Noto Sans Telugu';
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: capitalize;
  color: var(--color-ink);
  line-height: 1.2;
  transition: color 0.12s;
}

.site-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border-dark);
  color: var(--color-ink);
  padding: 0.35rem;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.site-nav-toggle__icon {
  display: block;
}

.site-nav-toggle:hover {
  border-color: var(--color-maroon);
  color: var(--color-maroon);
}

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

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-ink);
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
}

.site-nav a:hover {
  background: var(--color-active);
  color: var(--color-maroon);
  text-decoration: none;
}

.site-nav a[aria-current="page"],
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: rgba(192, 57, 43, 0.12);
  color: var(--color-maroon);
  font-weight: 500;
  text-decoration: none;
}

/* WordPress menu list reset */
.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
}

.site-nav__list li {
  margin: 0;
  padding: 0;
}

.contact-form__error {
  color: var(--color-bad);
  font-weight: 600;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  .site-nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.5rem;
  }

  .site-nav__list {
    flex-direction: column;
    width: 100%;
    gap: 0.25rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-bottom: none;
    border-left: 3px solid transparent;
    border-radius: 4px;
  }

  .site-nav a:hover {
    background: var(--color-active);
    color: var(--color-maroon);
    border-left-color: var(--color-maroon);
  }

  .site-nav a[aria-current="page"],
  .site-nav .current-menu-item > a,
  .site-nav .current_page_item > a {
    background: rgba(192, 57, 43, 0.12);
    color: var(--color-maroon);
    border-left-color: var(--color-maroon);
  }
}

/* Layout */
.page-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}

.main-content {
  min-width: 0;
}

.sidebar {
  display: block;
}

@media (min-width: 960px) {
  .sidebar {
    position: sticky;
    top: 1rem;
  }
}

/* Cards */
.card {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sheet);
  margin-bottom: 1rem;
  overflow: hidden;
}

.card__header {
  background: var(--color-maroon);
  border-bottom: none;
  padding: 0.65rem 1rem;
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.card__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}

.card__subtitle--inline {
  display: inline;
  margin: 0 0 0 0.35rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .card__subtitle--inline {
    white-space: normal;
  }
}

.card__title--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card__title-text {
  min-width: 0;
}

.card__title-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-sans);
}

/* Homepage below-fold — plain inset sections, no card chrome */
.home-section {
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0 0 1.75rem;
  padding: 0;
}

.home-section--card {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.home-section--card .home-section__title {
  margin-bottom: 0;
}

.home-section--card .home-section__body--table {
  padding: 0.65rem 0.75rem 0.75rem;
}

.page-layout .home-section {
  margin-bottom: 1.25rem;
}

.page-layout .home-section__body {
  padding: 0.75rem;
}

.page-layout .home-section__body .month-nav,
.page-layout .home-section__body .month-legend {
  padding-left: 0;
  padding-right: 0;
}

.page-layout--static .festivals-hero {
  margin-bottom: 1rem;
}

/* Breadcrumbs */
.tdc-breadcrumbs {
  margin: 0 0 0.75rem;
}

.tdc-breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  font-size: 0.75rem;
  color: var(--color-ink-muted);
}

.tdc-breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--color-border-dark);
}

.tdc-breadcrumbs__item a {
  color: var(--color-ink-muted);
  text-decoration: none;
}

.tdc-breadcrumbs__item a:hover {
  color: var(--color-maroon);
  text-decoration: underline;
}

.tdc-breadcrumbs__item span[aria-current="page"] {
  color: var(--color-ink);
  font-weight: 600;
}

/* 404 page */
.error-links {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.8;
}

.error-links a {
  font-weight: 600;
}

/* Rasi date picker */
.rasi-date-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.75rem;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.rasi-date-form__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink);
}

.rasi-date-form__input {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.rasi-date-form__btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  color: #fff;
  background: var(--color-maroon);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.rasi-date-form__today {
  font-size: 0.8125rem;
  font-weight: 600;
}

.page-layout--static .static-page.home-section--card .static-page__body {
  padding: 1rem 1.25rem 1.25rem;
}

.home-section__empty {
  margin: 0;
  padding: 0.5rem 0.75rem;
  color: var(--color-ink-muted);
}

.home-section__title {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--color-section-head);
  border-bottom: 1px solid var(--color-widget-head-border);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-widget-head-text);
}

h1.home-section__title {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
}

.home-section__title--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.home-section__title-text {
  min-width: 0;
}

.home-section__title-meta {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-widget-head-meta);
  text-align: right;
  flex-shrink: 0;
}

.home-section__title-meta--mobile {
  display: none;
}

.home-section__body {
  padding: 0;
}

.home-section__body--table {
  padding: 0;
}

.home-section .festival-list--table {
  border: none;
}

.home-section .month-more {
  margin: 0.65rem 0 0;
  font-size: 0.9375rem;
}

.home-section--seo {
  margin-bottom: 1rem;
}

.home-section--seo .home-section__title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  padding-left: 0;
  padding-right: 0;
}

.home-section--seo .seo-block {
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .home-section__title-meta--desktop {
    display: none;
  }

  .home-section__title-meta--mobile {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.6875rem;
  }
}

/* Homepage — one calendar sheet (width aligned with site header inner) */
.page-layout--home-sheet {
  max-width: none;
  grid-template-columns: 1fr;
}

body.home .page-layout--home-sheet {
  padding-top: 0.75rem;
}

.page-layout--home-sheet .home-sheet-tail {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.cal-home-sheet {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cal-home-sheet__calendar {
  width: 100%;
}

.home-sheet-tail {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-warm, #ddd8d0);
}

.home-sheet-tail__main {
  min-width: 0;
}

.home-sheet-tail .sidebar {
  display: block;
}

@media (min-width: 960px) {
  .home-sheet-tail {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }

  .home-sheet-tail .sidebar {
    position: sticky;
    top: 1rem;
  }
}

.home-sheet-below {
  margin-top: 0;
}

.home-sheet-below__title {
  margin: 0 0 0.75rem;
  padding: 0 0 0.55rem;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.home-sheet-below__body {
  padding-top: 0;
}

.home-sheet-below .home-section:first-child {
  margin-top: 0;
}

.ad-slot[hidden] {
  display: none !important;
}

.sidebar .ad-slot:not(.ad-slot--loaded) .ad-slot__container:empty {
  display: none;
}

.sidebar .ad-slot:not(.ad-slot--loaded):has(.ad-slot__container:empty) {
  display: none;
}

@media (min-width: 680px) {
  body.home .page-layout--home-sheet {
    padding-top: 1rem;
  }
}

@media (max-width: 480px) {
  .card__title--split {
    gap: 0.5rem;
  }

  .card__title--split .card__title-text {
    font-size: 0.875rem;
  }

  .card__title-meta {
    font-size: 0.6875rem;
  }
}

.card__body {
  padding: 0.75rem 0.85rem;
}

.card__body--table {
  padding: 0;
}

.card__body--table .month-more {
  margin: 0;
  padding: 0.75rem 0.85rem;
}

.card__body--table .muhurtham-empty {
  padding: 0.65rem;
}

/* Festivals page — hero intro & collapsible month cards */
.festivals-hero {
  margin-bottom: 0.25rem;
}

.festivals-hero__inner {
  padding: 0.25rem 0 0;
}

.festivals-hero__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-maroon);
}

.festivals-hero__title-text {
  min-width: 0;
}

.festivals-hero__year {
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--color-maroon);
}

.festivals-hero__tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0.65rem 0 0;
}

.festivals-hero__tagline-te {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-maroon);
}

.festivals-hero__tagline-en {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink-muted);
}

.festivals-hero__tagline-en::before {
  content: "·";
  margin-right: 0.55rem;
  color: var(--color-border-dark);
  font-weight: 400;
}

.festivals-hero__lead {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--color-ink-muted);
}

/* Festivals page — month jump nav */
.festivals-jump {
  margin: 1.25rem 0 0;
  padding: 0.65rem 0.75rem;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.festivals-jump__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.festivals-jump__list a {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-ink);
  background: var(--color-section-pill);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
}

.festivals-jump__list a:hover {
  border-color: var(--color-gold);
  color: var(--color-maroon);
  text-decoration: none;
}

/* Festivals page — type filter */
.festivals-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 0;
}

.festivals-filter__btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.festivals-filter__input:focus-visible + .festivals-filter__btn {
  outline: 2px solid var(--color-saffron);
  outline-offset: 2px;
}

.festivals-filter__input:checked + .festivals-filter__btn {
  color: #fff;
  background: var(--color-maroon);
  border-color: var(--color-maroon);
}

.festival-month__past-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  vertical-align: middle;
}

.festival-month--past > summary.card__header {
  opacity: 0.88;
}

@media (min-width: 640px) {
  .festivals-hero__tagline {
    margin-top: 0.75rem;
  }

  .festivals-hero__lead {
    margin-top: 1.15rem;
    font-size: 1rem;
  }
}

.festivals-months {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.25rem;
}

/* Match inner-page section headers (home-section__title) */
.festivals-page .card--collapsible {
  box-shadow: none;
}

.festivals-page .card--collapsible > summary.card__header {
  background: var(--color-section-head);
  border-bottom: 1px solid var(--color-widget-head-border);
  padding: 0.55rem 0.75rem;
  color: var(--color-widget-head-text);
}

.festivals-page .card--collapsible > summary.card__header:hover {
  filter: none;
  background: #e2dfd9;
}

.festivals-page .card--collapsible > summary.card__header::after {
  border-right-color: var(--color-ink-muted);
  border-bottom-color: var(--color-ink-muted);
}

.festivals-page .card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-widget-head-text);
}

.festivals-page .card__subtitle,
.festivals-page .card__subtitle--inline {
  color: var(--color-widget-head-meta);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.card--collapsible {
  margin-bottom: 0;
}

.card--collapsible > summary.card__header {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.card--collapsible > summary.card__header::-webkit-details-marker {
  display: none;
}

.card--collapsible > summary.card__header::after {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--color-ink-muted);
  border-bottom: 2px solid var(--color-ink-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -0.2rem;
}

.card--collapsible[open] > summary.card__header::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.card--collapsible > summary.card__header:hover {
  filter: brightness(1.05);
}

.card__header-inner {
  display: block;
  min-width: 0;
}

.card--collapsible .card__body {
  padding: 1.15rem 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}

.card--collapsible .card__body--table {
  padding: 0;
}

.card--collapsible .card__body--table .festival-list--table {
  margin: 0;
}

/* Compact body for sidebar mini-calendar */
.sidebar-cal-body {
  padding: 0.4rem 0.5rem !important;
}

/* ============ Cal Widget — tear-off daily sheet ============ */

.cal-sheet-unit {
  width: 100%;
  max-width: var(--cal-sheet-width);
  margin: 0 auto 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.cal-date-bar {
  background: #f8f6f2;
  border: none;
  border-bottom: 1px solid #ddd8d0;
  border-radius: 0;
  padding: 0.5rem 0.85rem 0.45rem;
}

.cal-date-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.cal-bar-today--jump::before {
  content: "↩ ";
}

.cal-date-bar__pickers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.cal-date-bar__nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.cal-date-bar__pick-label {
  font-family: var(--font-telugu);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  margin-right: 0.1rem;
}

.cal-bar-nav {
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
  border-radius: 30px;
  border: 1px solid #ddd8d0;
  background: #fff;
  color: var(--color-ink-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.cal-bar-nav:hover {
  border-color: var(--color-maroon);
  color: var(--color-maroon);
  text-decoration: none;
}

.cal-bar-today {
  border: 1px solid #ddd8d0;
  border-radius: 999px;
  background: #fff;
  color: var(--color-ink-muted);
  padding: 0.3rem 0.7rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
}

.cal-bar-today:hover {
  border-color: var(--color-maroon);
  color: var(--color-maroon);
  text-decoration: none;
}

@media (max-width: 520px) {
  .cal-date-bar__inner {
    gap: 0.5rem;
  }

  .cal-date-bar__pickers {
    flex: 1 1 100%;
    order: 1;
  }

  .cal-date-bar__nav {
    order: 2;
    margin-left: auto;
  }

  .cal-bar-nav {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    font-size: 1.0625rem;
  }
}

.cal-shell {
  width: 100%;
  border: 1px solid #ddd8d0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.cal-shell--today {
  /* no extra decoration — today is shown via the badge */
}

.cal-tear-perforation {
  height: 10px;
  background: #fff;
  border-bottom: 2px dashed #c8c3ba;
}

.cal-date-select {
  appearance: none;
  background: #fff;
  border: 1px solid #ddd8d0;
  border-radius: 3px;
  color: var(--color-ink);
  padding: 0.3rem 1.25rem 0.3rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' viewBox='0 0 9 5'%3E%3Cpath fill='%23666' d='M1 1l3.5 3L8 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.42rem center;
  transition: border-color 0.12s;
}

.cal-date-select:focus {
  outline: 2px solid var(--color-maroon);
  outline-offset: 1px;
}

.cal-date-select--day {
  min-width: 3.25rem;
}

.cal-date-select--month {
  min-width: 9rem;
}

.cal-date-select--year {
  min-width: 4.75rem;
}

.cal-date-go {
  background: var(--color-ink);
  border: 1px solid var(--color-ink);
  border-radius: 4px;
  color: #fff;
  padding: 0.32rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cal-date-bar .cal-date-go {
  background: var(--color-maroon);
  border-color: var(--color-maroon);
}

.cal-date-bar .cal-date-go:hover {
  background: var(--color-maroon-light, #8b2942);
  border-color: var(--color-maroon-light, #8b2942);
}


.cal-home-jump {
  margin: 0;
  padding: 0.5rem 0.85rem 0.65rem;
  text-align: center;
  background: #f8f6f2;
  border-top: 1px solid #ddd8d0;
}

.cal-home-jump__link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.cal-home-jump__link:hover {
  color: var(--color-maroon);
  text-decoration: none;
}

.cal-empty-notice {
  margin: 0;
  padding: 0.85rem 1.25rem;
  background: #fdf0e0;
  border: 1px solid #e8c9a8;
  border-radius: 4px;
  color: var(--color-ink, #2c1810);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
}

.cal-classic-sheet--no-data .cal-classic-date-block {
  border-bottom: none;
}

.cal-classic-sheet--no-data .cal-empty-notice {
  margin: 0.75rem 1rem 1rem;
}
/* Daily sheet print styles live in calendar-classic.css */

/* Rasi Phalalu list */
.cal-rasi {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cal-rasi li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.22rem 0.35rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.cal-rasi li:last-child { border-bottom: none; }

.cal-rname {
  color: var(--color-ink);
  font-weight: 500;
}

.cal-rword {
  font-weight: 500;
  font-size: 0.8125rem;
  text-align: right;
  max-width: 55%;
  word-break: break-word;
  line-height: 1.3;
}

.cal-table .cal-rword.is-good { color: var(--color-good); }

.cal-table .cal-rword.is-caution { color: var(--color-bad); }

.cal-rword.is-good    { color: var(--color-good); }
.cal-rword.is-caution { color: var(--color-bad); }


/* Festivals list */
.festival-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.festival-list li,
.festival-list__item {
  margin: 0;
}

/* Table-style festival grid */
.festival-list--table {
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0;
  overflow: hidden;
  font-size: 0.875rem;
  padding: 0;
}

.festival-list--table .festival-list__head,
.festival-list--table .festival-list__item {
  display: grid;
  grid-template-columns: 6.75rem minmax(0, 1fr) minmax(5.75rem, auto);
  align-items: center;
  column-gap: 0;
}

.festival-list--table .festival-list__head {
  background: #fff;
  color: var(--color-ink-muted);
  border-bottom: 1px solid var(--color-border);
}

.festival-list--table .festival-list__head-cell {
  padding: 0.55rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  border-right: 1px solid var(--color-border);
}

.festival-list--table .festival-list__head-cell:last-child {
  border-right: none;
  text-align: right;
}

.festival-list--table .festival-list__item {
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.festival-list--table .festival-list__date,
.festival-list--table .festival-list__name,
.festival-list--table .festival-list__type {
  padding: 0.6rem 0.75rem;
  border-right: 1px solid var(--color-border);
  min-width: 0;
}

.festival-list--table .festival-list__type {
  border-right: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.festival-list__date {
  font-weight: 500;
  color: var(--color-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.festival-list__name {
  min-width: 0;
  line-height: 1.45;
}

.festival-list__name a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.festival-list__name a:hover {
  color: var(--color-maroon);
}

.festival-list__name-te,
.festival-list__name .telugu {
  font-family: var(--font-telugu);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-ink);
}

.festival-list__name-en {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-ink);
}

.festival-list__badge {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  white-space: nowrap;
}

.festival-list__badge--festival {
  background: #fde8e6;
  color: var(--color-maroon);
}

.festival-list__badge--vrata {
  background: #eef4fd;
  color: #1e4a8a;
}

.festival-list__badge--holiday {
  background: #edf7ed;
  color: var(--color-good);
}

.festival-list__name .muhurtham-time {
  color: var(--color-good);
  font-size: 0.8125rem;
  font-weight: 600;
}

.festival-list__badge--marriage {
  background: #fde8e6;
  color: var(--color-maroon);
}

.festival-list__badge--griha {
  background: #fff4e5;
  color: var(--color-saffron-dark);
}

.festival-list__badge--business,
.festival-list__badge--vehicle {
  background: #edf7ed;
  color: var(--color-good);
}

.festival-list__badge--education,
.festival-list__badge--naming {
  background: #eef4fd;
  color: #1e4a8a;
}

.festival-list__badge--spiritual,
.festival-list__badge--general,
.festival-list__badge--muhurtham {
  background: #f3eef8;
  color: #5b3a8c;
}

/* Plain list fallback (e.g. major festivals links) */
.festival-list:not(.festival-list--table) .festival-list__item,
.festival-list:not(.festival-list--table) > li:not(.festival-list__head) {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.festival-list:not(.festival-list--table) .festival-list__item:last-child,
.festival-list:not(.festival-list--table) > li:not(.festival-list__head):last-child {
  border-bottom: none;
}

.festival-list:not(.festival-list--table) .festival-list__type {
  margin-left: auto;
}

@media (max-width: 520px) {
  .festival-list--table .festival-list__head,
  .festival-list--table .festival-list__item {
    grid-template-columns: 5.75rem minmax(0, 1fr) minmax(4.75rem, auto);
  }

  .festival-list--table .festival-list__date,
  .festival-list--table .festival-list__name,
  .festival-list--table .festival-list__type {
    padding: 0.5rem 0.55rem;
  }

  .festival-list--table .festival-list__head-cell {
    padding: 0.45rem 0.55rem;
  }
}

.muhurtham-empty {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 0.875rem;
}

/* Monthly calendar grid */
.month-calendar {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}

.month-calendar th {
  padding: 0.35rem 0.1rem;
  font-weight: 700;
  color: var(--color-ink-muted);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.month-calendar td {
  padding: 0.2rem 0.1rem;
  text-align: center;
  border: 1px solid var(--color-border);
  vertical-align: middle;
}

.month-calendar td a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  color: var(--color-ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  font-weight: 500;
}

.month-calendar td a:hover {
  background: var(--color-tint);
  text-decoration: none;
}

.month-calendar td.is-festival:not(.is-today) a {
  font-weight: 700;
  color: var(--color-maroon);
}

.month-calendar td.is-today a {
  background: var(--color-maroon);
  color: #fff;
  font-weight: 700;
}

.month-calendar td.is-empty {
  background: transparent;
  border-color: transparent;
  /* Keep row divider — empty cells above real dates (e.g. 5–7) must not erase it */
  border-bottom-color: var(--color-border);
}

/* Hide tithi sub-text — minimal calendar view */
.month-calendar__tithi {
  display: none;
}

.month-cal-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-saffron);
}

.month-calendar td.is-viewing a {
  box-shadow: inset 0 0 0 2px var(--color-maroon);
  border-radius: 4px;
}

.sidebar-cal-legend {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.6875rem;
  color: var(--color-ink-muted);
}

.sidebar-cal-legend-wrap {
  margin-top: 0.45rem;
}

.sidebar-cal-legend-wrap__toggle {
  font-size: 0.6875rem;
  color: var(--color-ink-muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.sidebar-cal-legend-wrap__toggle::-webkit-details-marker {
  display: none;
}

.sidebar-cal-legend-wrap__toggle::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.sidebar-cal-legend-wrap[open] .sidebar-cal-legend-wrap__toggle::before {
  transform: rotate(90deg);
}

.sidebar-cal-legend__item::before {
  display: inline-block;
  margin-right: 0.25rem;
}

.sidebar-cal-legend__item--today::before {
  content: "●";
  color: var(--color-maroon);
}

.sidebar-cal-legend__item--viewing::before {
  content: "◎";
  color: var(--color-maroon);
}

.sidebar-cal-legend__item--festival {
  font-weight: 700;
  color: var(--color-maroon);
}

.sidebar-cal-legend__item--festival::before {
  content: none;
}

/* Sidebar mini calendar — compact cells, no festival dots */
.month-calendar--compact td a {
  flex-direction: row;
  gap: 0;
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.75rem;
}

.month-calendar--compact td {
  padding: 0.2rem 0.05rem;
  line-height: 1;
  vertical-align: middle;
}

/* Ad slots */
.ad-slot {
  margin: 1rem 0;
  text-align: center;
}

.ad-slot__label {
  font-size: 0.6875rem;
  color: var(--color-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.ad-slot__container {
  background: var(--color-tint);
  border: 1px dashed var(--color-border-dark);
  border-radius: var(--radius);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
  font-size: 0.75rem;
  overflow: hidden;
}

.ad-slot--responsive .ad-slot__container {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  aspect-ratio: 728 / 90;
}

.ad-slot--in-feed .ad-slot__container {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
}

.ad-slot--sidebar .ad-slot__container {
  width: 100%;
  min-height: 600px;
  max-height: 600px;
}

/* SEO & FAQ */
.seo-block {
  font-size: 0.9375rem;
  color: var(--color-ink);
}

.seo-block h2 {
  font-size: 1.125rem;
  color: var(--color-maroon);
  margin: 0 0 0.75rem;
}

.seo-block h3 {
  font-size: 1rem;
  color: var(--color-saffron-dark);
  margin: 1.25rem 0 0.5rem;
}

.seo-block p {
  margin: 0 0 0.75rem;
  color: var(--color-ink-muted);
}

.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 0.75rem 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--color-ink);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+ ";
  color: var(--color-saffron);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: "− ";
}

.faq-item__answer {
  padding: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--color-ink-muted);
  line-height: 1.6;
}

.festivals-empty {
  margin: 0;
  padding: 0.5rem 0;
  color: var(--color-ink-muted);
  line-height: 1.5;
  font-size: 0.8125rem;
}

.festivals-empty--cta {
  padding: 0.5rem 0;
}

.festivals-empty__link {
  margin: 0.35rem 0 0;
  font-weight: 600;
}

.festivals-empty__link a {
  color: var(--color-saffron-dark);
  text-decoration: none;
}

.festivals-empty__link a:hover {
  color: var(--color-maroon);
  text-decoration: underline;
}

/* Sidebar widgets */
.sidebar-widget {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.sidebar-widget__title {
  background: var(--color-sidebar-head);
  border-bottom: 1px solid var(--color-widget-head-border);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-widget-head-text);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-cal-today {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-maroon);
  padding: 0.22rem 0.5rem;
  border-radius: 3px;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1.3;
}

.sidebar-cal-today:hover {
  background: var(--color-maroon-light);
  color: #fff;
  text-decoration: none;
}

.noscript-notice {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  background: #fff8e6;
  border-bottom: 1px solid #f0d78c;
  color: var(--color-ink);
  font-size: 0.875rem;
  text-align: center;
}

.sidebar-widget__body {
  padding: 0.75rem;
  font-size: 0.8125rem;
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-links li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-links li:last-child {
  border-bottom: none;
}

.sidebar-links a {
  color: var(--color-ink);
  text-decoration: none;
}

.sidebar-links a:hover {
  color: var(--color-saffron-dark);
}

.sidebar-widget__month {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-widget-head-meta);
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-widget__title-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.sidebar-widget__title-icon {
  flex-shrink: 0;
  color: var(--color-maroon);
}

.sidebar-widget__title-te {
  font-family: var(--font-telugu);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink-muted);
}

/* At a Glance */
.sidebar-glance {
  margin: 0;
}

.sidebar-glance__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border-warm);
  font-size: 0.8125rem;
}

.sidebar-glance__row:last-child {
  border-bottom: none;
}

.sidebar-glance__label {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink-muted);
}

.sidebar-glance__value {
  margin: 0;
  text-align: right;
}

/* Pournami & Amavasya — minimal list */
.sidebar-moon-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-moon-item {
  border-bottom: 1px solid var(--color-border);
}

.sidebar-moon-item:last-child {
  border-bottom: none;
}

.sidebar-moon-item__link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.4rem 0;
  text-decoration: none;
  color: var(--color-ink);
}

.sidebar-moon-item__link:hover {
  color: var(--color-maroon);
  text-decoration: none;
}

.sidebar-moon-item__icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.sidebar-moon-item--pournami .sidebar-moon-item__icon {
  color: var(--color-saffron-dark);
}

.sidebar-moon-item--amavasya .sidebar-moon-item__icon {
  color: var(--color-maroon);
}

.sidebar-moon-item__main {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.sidebar-moon-item__type {
  display: block;
  font-weight: 600;
}

.sidebar-moon-item__name {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  color: var(--color-ink-muted);
}

.sidebar-moon-item__date {
  flex-shrink: 0;
  text-align: right;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-ink);
}

.sidebar-moon-item__weekday {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.sidebar-moon-more {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
}

.sidebar-moon-more a {
  color: var(--color-saffron-dark);
  text-decoration: none;
}

.sidebar-moon-more a:hover {
  color: var(--color-maroon);
  text-decoration: underline;
}

.sidebar-moon-empty {
  margin: 0;
  color: var(--color-ink-muted);
  line-height: 1.45;
  font-size: 0.8125rem;
}

/* Footer */
.site-footer {
  background: var(--color-maroon);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 1rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-footer__heading {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li {
  padding: 0.2rem 0;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

/* Muhurtham page */
.muhurtham-intro p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-ink-muted);
}

.muhurtham-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.muhurtham-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.muhurtham-table th {
  text-align: left;
  padding: 0.5rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-ink-muted);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.muhurtham-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-ink);
  vertical-align: top;
}

.muhurtham-table tbody tr:last-child td {
  border-bottom: none;
}

.muhurtham-table td a {
  color: var(--color-maroon);
  font-weight: 700;
  text-decoration: none;
}

.muhurtham-table td a:hover {
  text-decoration: underline;
}

.muhurtham-table .is-good {
  color: var(--color-good);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Monthly calendar page */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.month-nav__label {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-maroon);
}

.month-nav__btn {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.month-nav__btn:hover {
  color: var(--color-maroon);
  border-color: var(--color-maroon);
  text-decoration: none;
}

.month-nav__btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Year index page */
.year-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.year-nav__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-maroon);
}

.year-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .year-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .year-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.year-grid__month {
  padding: 0.65rem;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.year-grid__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
}

.year-grid__title a {
  color: var(--color-maroon);
  text-decoration: none;
}

.year-grid__title a:hover {
  text-decoration: underline;
}

.month-calendar--page th {
  font-size: 0.75rem;
  padding: 0.65rem 0.25rem;
}

.month-calendar--page td {
  padding: 0.35rem 0.2rem;
  height: 3.5rem;
  vertical-align: middle;
}

.month-calendar--page td a {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.month-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--color-ink-muted);
}

.month-legend__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.month-legend__dot--today { background: var(--color-maroon); }
.month-legend__dot--festival { background: var(--color-saffron); }

.month-more {
  margin: 1rem 0 0;
  font-size: 0.875rem;
}

.month-more a {
  color: var(--color-maroon);
  font-weight: 600;
  text-decoration: none;
}

.month-more a:hover { text-decoration: underline; }

/* Rasi Palalu page */
.rasi-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 480px) {
  .rasi-page-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .rasi-page-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.rasi-page-grid li {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.rasi-page-grid .cal-rname {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.rasi-en {
  font-size: 0.75rem;
  color: var(--color-ink-muted);
  font-weight: 500;
}

.rasi-legend-inline .is-good-text { color: var(--color-good); font-weight: 700; }
.rasi-legend-inline .is-caution-text { color: var(--color-bad); font-weight: 700; }

/* Static pages (About, Contact) — match header/footer width */
.page-layout--static {
  grid-template-columns: 1fr;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}

.page-static .main-content {
  width: 100%;
}

.page-static .static-page__lead,
.page-static .static-section p,
.page-static .static-section ul {
  max-width: none;
}

@media (min-width: 768px) {
  .page-about .static-page__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }

  .page-about .static-page__lead,
  .page-about .static-section--last {
    grid-column: 1 / -1;
  }

  .page-about .static-section ul {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .page-about .static-section ul {
    grid-template-columns: 1fr 1fr;
  }
}

.static-page {
  width: 100%;
}

.static-page__header {
  padding: 0 0 1.75rem;
  margin-bottom: 0.5rem;
}

.static-page__title {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 900;
  color: var(--color-maroon);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.static-page__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--color-maroon);
  margin-top: 0.75rem;
  border-radius: 2px;
}

.static-page__tagline {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--color-ink-muted);
}

.static-page__body {
  padding: 0;
}

.static-page__lead {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-ink);
}

.static-section {
  padding: 0 0 2rem;
  margin-bottom: 2rem;
}

.static-section--last {
  margin-bottom: 0;
  padding-bottom: 0;
}

.static-section h2 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-maroon);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.static-section p {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-ink-muted);
}

.static-section p:last-child {
  margin-bottom: 0;
}

.static-section ul {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .static-section ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 2rem;
  }
}

.static-section li {
  position: relative;
  padding: 0 0 0 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-ink-muted);
}

.static-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-maroon);
}

.static-section a,
.static-page__body a {
  color: var(--color-maroon);
  font-weight: 600;
  text-decoration: none;
}

.static-section a:hover,
.static-page__body a:hover {
  text-decoration: underline;
}

/* Contact page layout */
.contact-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.5fr);
    gap: 3rem;
    align-items: start;
  }
}

.contact-layout__info .static-page__lead {
  margin-bottom: 1.75rem;
}

.contact-info {
  padding: 0;
  background: none;
  border: none;
}

.contact-info p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-ink-muted);
}

.contact-info p:last-child {
  margin-bottom: 0;
}

.contact-info strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-maroon);
  margin-bottom: 0.25rem;
}

.contact-info a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.15s, border-color 0.15s;
}

.contact-info a:hover {
  color: var(--color-maroon);
  border-color: var(--color-maroon);
  text-decoration: none;
}

.contact-layout__form {
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-form__grid {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 480px) {
  .contact-form__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-ink-muted);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 0.6rem 0;
  border: none;
  border-bottom: 1px solid var(--color-border-dark);
  border-radius: 0;
  color: var(--color-ink);
  background: transparent;
  transition: border-color 0.15s;
}

.contact-form select {
  padding-right: 0.5rem;
  cursor: pointer;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #bbb;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--color-maroon);
}

.contact-form textarea {
  min-height: 100px;
  resize: vertical;
  padding-top: 0.5rem;
}

.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__submit {
  width: auto;
  align-self: flex-start;
  margin-top: 0.5rem;
  background: var(--color-maroon);
  color: #fff;
  border: none;
  padding: 0.65rem 1.75rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s;
}

.contact-form__submit:hover {
  background: var(--color-maroon-light);
}

.contact-form__submit:disabled,
.contact-form__submit[aria-busy="true"] {
  opacity: 0.72;
  cursor: wait;
}

.contact-form__success {
  padding: 0.85rem 0;
  margin-bottom: 0.5rem;
  background: none;
  border: none;
  border-left: 3px solid var(--color-good);
  padding-left: 0.85rem;
  border-radius: 0;
  color: var(--color-good);
  font-size: 0.9375rem;
  font-weight: 600;
}

.contact-form__success[hidden] {
  display: none;
}

/* Visually hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Data attribute hooks for future panchangam engine — intentionally empty */

/* Language preference — swap labelled pairs only */
body.lang-en .lang-te-only { display: none !important; }
body.lang-te .lang-en-only { display: none !important; }
body:not(.lang-en):not(.lang-te) .lang-en-only { display: none !important; }

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}

