:root {
  --paper: #f8f6ef;
  --surface: #ffffff;
  --surface-soft: #f0eee5;
  --ink: #20241f;
  --muted: #666b63;
  --line: #dad8cf;
  --red: #a62c2b;
  --red-dark: #7f1f20;
  --red-soft: #f5e7e4;
  --green: #265a48;
  --green-soft: #e2ece6;
  --gold: #b98638;
  --shadow: 0 12px 32px rgba(33, 36, 31, 0.08);
  --container: 1180px;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
summary {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(38, 90, 72, 0.35);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(248, 246, 239, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  position: relative;
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--red);
  border-radius: 50%;
}

.brand__mark::before {
  content: "";
  position: absolute;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
}

.brand__mark span {
  position: absolute;
  z-index: 1;
  width: 20px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  transform: translate(6px, -3px);
}

.brand__text {
  display: grid;
  line-height: 1.1;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--red-dark);
}

.brand__text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.primary-nav {
  justify-self: center;
}

.primary-nav ul,
.site-footer nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav a {
  display: block;
  padding: 24px 0 21px;
  border-bottom: 3px solid transparent;
  color: #3d413b;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  border-bottom-color: var(--red);
  color: var(--red-dark);
}

.icon-button {
  display: inline-grid;
  width: 42px;
  aspect-ratio: 1;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.icon-button:hover {
  background: var(--surface);
  border-color: #bab8b0;
}

.nav-toggle {
  display: none;
}

.search-panel {
  padding: 15px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.search-form {
  display: flex;
  width: min(100%, 680px);
  min-height: 48px;
  margin-inline: auto;
  border: 1px solid #b9b8b0;
  border-radius: 4px;
  background: #fff;
}

.search-form input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  background: transparent;
}

.search-form button {
  display: grid;
  width: 48px;
  flex: 0 0 48px;
  padding: 0;
  place-items: center;
  border: 0;
  background: var(--red);
  color: #fff;
}

.calendar-hero {
  padding: 46px 0 56px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.calendar-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}

.eyebrow,
.article-kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-heading h1,
.archive-header h1,
.article-header h1,
.not-found h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
}

.calendar-heading h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.calendar-heading__date {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.today-summary {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  min-width: 190px;
  padding: 12px 18px;
  border-left: 3px solid var(--red);
}

.today-summary span,
.today-summary small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.today-summary strong {
  grid-row: span 2;
  margin-left: 16px;
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.calendar-panel {
  min-width: 0;
  padding: 24px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 42px 1fr 42px auto;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  margin-bottom: 18px;
}

.calendar-title-wrap {
  position: relative;
  text-align: center;
}

.calendar-title-wrap h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.month-picker-label {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
}

.month-picker-label input {
  width: 24px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid var(--red);
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  background: var(--red-dark);
}

.button--quiet {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.button--quiet:hover {
  background: #e6e3d9;
}

.button--outline {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
}

.button--outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  border-block: 1px solid var(--line);
}

.calendar-weekdays span {
  padding: 10px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-weekdays span:last-child {
  color: var(--red);
}

.calendar-grid {
  border-left: 1px solid var(--line);
}

.calendar-day {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1.23;
  min-height: 68px;
  padding: 9px;
  align-content: space-between;
  justify-items: start;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.calendar-day:nth-child(-n+7) {
  border-top: 0;
}

.calendar-day:hover {
  z-index: 1;
  background: #fbfaf5;
  box-shadow: inset 0 0 0 2px var(--green);
}

.calendar-day strong {
  font-size: 18px;
  line-height: 1;
}

.calendar-day small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.calendar-day.is-sunday strong {
  color: var(--red);
}

.calendar-day.is-today::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
}

.calendar-day.is-selected {
  background: var(--red-soft);
  box-shadow: inset 0 0 0 2px var(--red);
}

.calendar-day--outside {
  background: #f8f7f2;
  color: #9b9b95;
}

.calendar-day--outside small {
  color: #aaa9a3;
}

.calendar-day--empty {
  min-height: 68px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8f7f2;
}

.calendar-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend i {
  display: block;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.legend-today {
  background: var(--red);
}

.legend-lunar {
  border: 1px solid var(--muted);
}

.day-detail {
  display: flex;
  min-width: 0;
  padding: 28px;
  flex-direction: column;
  background: var(--green);
  color: #fff;
}

.day-detail__top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.day-detail__top > p {
  margin: 4px 0 0;
  color: #d9e7df;
  font-size: 13px;
  font-weight: 700;
}

.day-detail__top > div {
  display: grid;
  justify-items: end;
}

.day-detail__top strong {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
}

.day-detail__top span {
  color: #d9e7df;
  font-size: 12px;
}

.lunar-disc {
  display: grid;
  width: 104px;
  aspect-ratio: 1;
  margin: 27px auto 20px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  box-shadow: inset -20px 0 0 rgba(255, 255, 255, 0.08);
}

.lunar-disc::before {
  content: "";
  position: absolute;
  width: 86px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.lunar-disc span {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
}

.day-detail__lunar {
  text-align: center;
}

.day-detail__lunar > span {
  color: #bcd2c6;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.day-detail__lunar h2 {
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.day-detail__lunar p {
  margin: 0;
  color: #d9e7df;
  font-size: 14px;
}

.day-facts {
  margin: 24px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.22);
}

.day-facts div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.day-facts div:last-child {
  border-bottom: 0;
}

.day-facts dt {
  color: #bcd2c6;
}

.day-facts dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.section {
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.section-heading h2,
.editorial-band__content h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.2;
}

.section-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.event-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.event-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 14px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.event-item time {
  display: grid;
  padding-right: 13px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.event-item time strong {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
}

.event-item time span,
.event-item p,
.event-item h3 {
  overflow-wrap: anywhere;
}

.event-item time span {
  color: var(--muted);
  font-size: 11px;
}

.event-item h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.event-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.editorial-band {
  background: var(--green-soft);
  border-block: 1px solid #cadbd1;
}

.editorial-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: clamp(36px, 7vw, 86px);
}

.editorial-band__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e9e4d8;
}

.editorial-band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-band__content p:not(.eyebrow) {
  margin: 18px 0;
  color: #4b5d53;
}

.text-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--red-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.posts-section {
  background: var(--surface);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.post-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.post-card__media {
  display: block;
  aspect-ratio: 18 / 11;
  overflow: hidden;
  background: var(--surface-soft);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.post-card:hover .post-card__media img {
  transform: scale(1.025);
}

.post-card__body {
  padding: 21px;
}

.post-card__meta {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-card__title {
  margin: 9px 0;
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.28;
}

.post-card__title a {
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

.post-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.feng-shui-section {
  background: var(--paper);
}

.compact-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.compact-post-grid article {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.compact-post-grid article:nth-child(odd) {
  padding-right: 28px;
}

.compact-post-grid article:nth-child(even) {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.compact-post-grid span {
  color: var(--muted);
  font-size: 12px;
}

.compact-post-grid h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.35;
}

.compact-post-grid a {
  text-decoration: none;
}

.compact-post-grid a:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

.site-footer {
  padding-top: 56px;
  background: #202d27;
  color: #dbe3de;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.3fr) repeat(3, minmax(145px, 0.72fr));
  gap: clamp(30px, 4vw, 64px);
  padding-bottom: 44px;
}

.footer-column {
  min-width: 0;
}

.brand--footer .brand__text strong,
.brand--footer {
  color: #fff;
}

.brand--footer .brand__text small,
.footer-intro > p {
  color: #abbab2;
}

.brand--footer .brand__mark span {
  background: #202d27;
}

.footer-intro > p {
  max-width: 360px;
  margin: 17px 0 0;
  font-size: 13px;
  line-height: 1.7;
}

.footer-intro .footer-timezone {
  margin-top: 14px;
  padding-left: 13px;
  border-left: 2px solid #d26b57;
  color: #c7d2cc;
}

.footer-heading {
  margin: 3px 0 18px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.3;
}

.site-footer .footer-links {
  display: grid;
  align-items: start;
  gap: 11px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer .footer-links li {
  margin: 0;
}

.site-footer nav a {
  color: #c7d2cc;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 150ms ease;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #99aba1;
  font-size: 12px;
}

.breadcrumbs {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: center;
  padding: 25px 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.breadcrumbs a,
.breadcrumbs span {
  flex: 0 0 auto;
}

.breadcrumbs span[aria-current="page"] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs a:hover {
  color: var(--red-dark);
}

.archive-main,
.single-main,
.page-main {
  padding-bottom: 80px;
  background: var(--surface);
}

.archive-header {
  max-width: 800px;
  padding: 28px 0 46px;
}

.archive-header h1 {
  font-size: clamp(38px, 6vw, 62px);
}

.archive-description {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
}

.archive-description p {
  margin: 0;
}

.post-grid--archive {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.navigation.pagination {
  margin-top: 44px;
}

.nav-links {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.page-numbers {
  display: grid;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.empty-state {
  padding: 36px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  text-align: center;
}

.empty-state h2 {
  margin-top: 0;
  font-family: var(--font-display);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 770px) minmax(250px, 310px);
  justify-content: space-between;
  gap: 64px;
}

.article {
  min-width: 0;
}

.article-header {
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  font-size: clamp(38px, 6vw, 64px);
  overflow-wrap: anywhere;
}

.article-deck {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  gap: 20px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

.article-cover {
  margin: 30px 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-soft);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  color: #30332f;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.82;
}

.article-content > * {
  max-width: 100%;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  scroll-margin-top: 100px;
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.3;
}

.article-content h2 {
  margin: 2em 0 0.6em;
  font-size: 30px;
}

.article-content h3 {
  margin: 1.6em 0 0.5em;
  font-size: 23px;
}

.article-content a {
  color: var(--red-dark);
}

.article-content blockquote {
  margin: 30px 0;
  padding: 18px 24px;
  border-left: 4px solid var(--red);
  background: var(--red-soft);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 14px;
}

.article-content th,
.article-content td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
}

.article-content th {
  background: var(--surface-soft);
}

.article-content img {
  height: auto;
}

.article-footer {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.article-tags a {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 34px;
}

.post-navigation > div {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.post-navigation > div:last-child {
  text-align: right;
}

.post-navigation span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.post-navigation a {
  font-family: var(--font-display);
  font-weight: 700;
}

.article-sidebar {
  min-width: 0;
  padding-top: 22px;
}

.content-toc,
.sidebar-widget {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.content-toc {
  position: sticky;
  top: 94px;
}

.content-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  font-size: 14px;
  font-weight: 800;
  list-style: none;
}

.content-toc summary::-webkit-details-marker {
  display: none;
}

.content-toc summary svg {
  transition: transform 180ms ease;
}

.content-toc[open] summary svg {
  transform: rotate(180deg);
}

.content-toc nav {
  max-height: calc(100vh - 180px);
  padding: 0 17px 16px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.content-toc ol {
  padding: 12px 0 0;
  margin: 0;
  list-style: none;
  counter-reset: toc;
}

.content-toc li {
  counter-increment: toc;
  margin: 8px 0;
}

.content-toc li::before {
  content: counter(toc, decimal-leading-zero) ".";
  margin-right: 7px;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
}

.content-toc li.toc-h3 {
  padding-left: 15px;
}

.content-toc a {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}

.content-toc a:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

.sidebar-widget {
  padding: 17px;
}

.sidebar-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 19px;
}

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

.sidebar-posts li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.sidebar-posts a {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.sidebar-posts time {
  color: var(--muted);
  font-size: 11px;
}

.page-container {
  max-width: 900px;
}

.article--page .article-header {
  padding-top: 30px;
}

.not-found {
  display: grid;
  min-height: 65vh;
  padding: 80px 0;
  place-items: center;
  background: var(--surface);
  text-align: center;
}

.not-found .container {
  max-width: 650px;
}

.error-code {
  margin: 0;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 70px;
  line-height: 1;
}

.not-found h1 {
  margin-top: 12px;
  font-size: 46px;
}

.not-found .search-form {
  margin-block: 28px 18px;
}

@media (max-width: 980px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .site-header__inner {
    grid-template-columns: auto auto 1fr auto;
    gap: 12px;
  }

  .nav-toggle {
    display: grid;
    grid-column: 3;
    justify-self: end;
  }

  .header-search {
    grid-column: 4;
  }

  .primary-nav {
    position: fixed;
    inset: 73px 0 auto;
    display: none;
    max-height: calc(100vh - 73px);
    padding: 12px 16px 24px;
    overflow-y: auto;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .primary-nav a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--line);
  }

  .calendar-layout {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

  .calendar-panel {
    padding: 18px;
  }

  .calendar-day {
    min-height: 62px;
  }

  .day-detail {
    padding: 22px;
  }

  .event-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 36px;
  }
}

@media (max-width: 760px) {
  .site-header__inner {
    min-height: 64px;
  }

  .primary-nav {
    inset-block-start: 65px;
  }

  .brand__text small {
    display: none;
  }

  .brand__text strong {
    font-size: 20px;
  }

  .calendar-hero {
    padding: 30px 0 38px;
  }

  .calendar-heading {
    align-items: center;
  }

  .calendar-heading h1 {
    font-size: 40px;
  }

  .calendar-heading__date {
    font-size: 14px;
  }

  .today-summary {
    display: none;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .day-detail {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
  }

  .day-detail__top {
    grid-column: 1 / -1;
  }

  .lunar-disc {
    width: 90px;
    margin: 5px 0;
  }

  .lunar-disc::before {
    width: 74px;
  }

  .lunar-disc span {
    font-size: 40px;
  }

  .day-detail__lunar {
    text-align: left;
  }

  .day-facts,
  .day-detail .button {
    grid-column: 1 / -1;
  }

  .section {
    padding: 54px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .editorial-band__inner,
  .site-footer__grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .editorial-band__inner {
    gap: 30px;
  }

  .post-grid,
  .post-grid--archive {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .site-footer__grid {
    gap: 28px;
  }

  .article-layout {
    gap: 20px;
  }

  .article-sidebar {
    order: -1;
    padding-top: 0;
  }

  .content-toc {
    position: static;
  }

  .sidebar-widget {
    display: none;
  }

  .article-header {
    padding-top: 8px;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .site-header__inner {
    grid-template-columns: minmax(0, auto) 1fr auto auto;
  }

  .brand__mark {
    width: 34px;
  }

  .icon-button {
    width: 38px;
  }

  .calendar-heading h1 {
    font-size: 34px;
  }

  .calendar-heading__date {
    margin-top: 6px;
    font-size: 13px;
  }

  .calendar-panel {
    padding: 12px;
  }

  .calendar-toolbar {
    grid-template-columns: 38px 1fr 38px;
    gap: 7px;
  }

  .calendar-title-wrap h2 {
    font-size: 20px;
  }

  .calendar-today {
    grid-column: 1 / -1;
    justify-self: center;
    min-height: 34px;
    padding: 5px 12px;
  }

  .calendar-day,
  .calendar-day--empty {
    min-height: 52px;
  }

  .calendar-day {
    aspect-ratio: auto;
    padding: 7px 5px;
  }

  .calendar-day strong {
    font-size: 16px;
  }

  .calendar-day small {
    font-size: 10px;
  }

  .calendar-day.is-today::after {
    top: 5px;
    right: 5px;
    width: 5px;
  }

  .calendar-legend {
    gap: 10px;
  }

  .day-detail {
    padding: 20px;
  }

  .event-strip,
  .post-grid,
  .post-grid--archive,
  .compact-post-grid {
    grid-template-columns: 1fr;
  }

  .compact-post-grid article:nth-child(odd),
  .compact-post-grid article:nth-child(even) {
    padding-inline: 0;
    border-left: 0;
  }

  .editorial-band__inner {
    width: 100%;
  }

  .editorial-band__content {
    width: calc(100% - 24px);
    margin-inline: auto;
  }

  .article-header h1,
  .archive-header h1 {
    font-size: 38px;
  }

  .article-content {
    font-size: 17px;
  }

  .article-content h2 {
    font-size: 26px;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-navigation > div:last-child {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Primary navigation submenu. */
.primary-nav > ul > .menu-item-has-children > a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-nav > ul > .menu-item-has-children > a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.primary-nav .current-menu-parent > a,
.primary-nav .current-menu-ancestor > a {
  border-bottom-color: var(--red);
  color: var(--red-dark);
}

@media (min-width: 981px) {
  .primary-nav > ul > li {
    position: relative;
  }

  .primary-nav .sub-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% - 1px);
    left: -16px;
    display: grid;
    min-width: 210px;
    gap: 0;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  }

  .primary-nav li:hover > .sub-menu,
  .primary-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .primary-nav .sub-menu a {
    padding: 9px 11px;
    border: 0;
    border-radius: 3px;
    white-space: nowrap;
  }

  .primary-nav .sub-menu a:hover,
  .primary-nav .sub-menu .current-menu-item > a {
    background: var(--red-soft);
    color: var(--red-dark);
  }
}

@media (max-width: 980px) {
  .primary-nav .sub-menu {
    position: static;
    display: grid;
    gap: 0;
    padding: 0 0 7px 18px;
    border-bottom: 1px solid var(--line);
    background: transparent;
  }

  .primary-nav > ul > .menu-item-has-children > a {
    border-bottom: 0;
    font-weight: 750;
  }

  .primary-nav .sub-menu a {
    padding: 10px 4px;
    color: var(--muted);
    font-size: 13px;
  }

  .primary-nav .sub-menu .current-menu-item > a {
    color: var(--red-dark);
  }
}

@media (max-width: 980px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .site-footer {
    padding-top: 42px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 34px;
  }

  .footer-heading {
    margin-bottom: 14px;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}