/**
 * Native calculator, compatibility and zodiac-year layouts.
 *
 * These pages intentionally share the theme design tokens while remaining
 * independent of the legacy static-HTML prototype styles.
 */

.csi-tool-page {
  padding-bottom: 72px;
  background:
    radial-gradient(circle at 92% 8%, rgba(201, 154, 61, .1), transparent 24rem),
    var(--page);
}

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

.csi-tool-hero {
  padding: clamp(54px, 7vw, 94px) 0 clamp(42px, 5vw, 68px);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(252, 251, 248, .96)),
    radial-gradient(circle at 50% 0, rgba(234, 213, 174, .55), transparent 36rem);
  border-bottom: 1px solid var(--border);
}

.csi-tool-hero h1 {
  max-width: 1000px;
  margin: 0 auto 18px;
  color: var(--primary);
  font-size: clamp(2.4rem, 5.2vw, 4.8rem);
  line-height: 1.04;
  text-wrap: balance;
}

.csi-tool-hero > .csi-tool-shell > p:last-child {
  max-width: 830px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.55vw, 1.2rem);
}

.csi-tool-kicker {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.csi-tool-card,
.csi-tool-section,
.csi-tool-cta,
.csi-compatibility-result,
.csi-years-control,
.csi-year-intro,
.csi-year-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.csi-calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
  padding-top: 42px;
}

.csi-tool-card {
  overflow: hidden;
}

.csi-calculator-form {
  position: sticky;
  top: 110px;
  padding: clamp(24px, 3vw, 38px);
}

.csi-tool-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.csi-tool-heading > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-weight: 800;
}

.csi-tool-heading h2 {
  margin-bottom: 6px;
}

.csi-tool-heading p {
  margin-bottom: 0;
  font-size: .92rem;
}

.csi-date-fields {
  display: grid;
  grid-template-columns: 1fr .72fr 1fr;
  gap: 12px;
}

.csi-date-fields label,
.csi-compatibility-inputs label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 750;
}

.csi-date-fields select,
.csi-compatibility-inputs input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dcd3c7;
  border-radius: 11px;
}

.csi-privacy-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 22px 0;
  padding: 14px 16px;
  background: var(--surface-warm);
  border: 1px solid rgba(201, 154, 61, .28);
  border-radius: 12px;
  font-size: .86rem;
}

.csi-privacy-note .icon {
  flex: 0 0 auto;
  margin-top: .2em;
  color: var(--accent);
}

.csi-tool-submit {
  width: 100%;
  min-height: 58px;
  font-size: 1rem;
}

.csi-form-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  color: #8f090c;
  background: #fff1f1;
  border: 1px solid #edbaba;
  border-radius: 9px;
}

.csi-result-card {
  min-width: 0;
}

.csi-result-status {
  padding: 18px 26px;
  color: var(--success);
  background: #f5faf5;
  border-bottom: 1px solid #dbe9dc;
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.csi-result-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .84fr);
  min-height: 340px;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 3.5vw, 44px);
  background: linear-gradient(125deg, #fff 5%, #fffdf8 100%);
}

.csi-result-identity > div {
  min-width: 0;
}

.csi-result-identity > div > p:first-child {
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.csi-result-identity h2 {
  margin-bottom: 0;
  color: var(--primary);
  font-size: clamp(3.4rem, 7vw, 6.5rem);
  line-height: .95;
}

.csi-result-identity strong {
  margin-right: 8px;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 2rem;
}

.csi-result-identity > div > p:last-child {
  margin: 26px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.28rem;
}

.csi-result-identity img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 16px 22px rgba(92, 58, 23, .12));
}

.csi-facts-grid,
.csi-association-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.csi-facts-grid > div,
.csi-association-grid > div {
  display: flex;
  min-width: 0;
  min-height: 82px;
  padding: 18px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--border);
}

.csi-facts-grid > div:nth-child(odd),
.csi-association-grid > div:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.csi-facts-grid dt,
.csi-association-grid dt {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.04rem;
}

.csi-facts-grid dd,
.csi-association-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.csi-calc-complete {
  margin: 26px 0 0;
  padding: 18px 24px;
  color: #357344;
  background: #f1f8ef;
  border: 1px solid #b9d6b8;
  border-radius: 14px;
}

.csi-tool-section {
  margin-top: 34px;
  padding: clamp(25px, 4vw, 48px);
}

.csi-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.csi-section-heading h2 {
  margin-bottom: 0;
}

.csi-section-heading > p {
  margin-bottom: 0;
}

.csi-association-grid {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.csi-association-grid > div:nth-child(-n+2) {
  border-top: 0;
}

.csi-personality-grid,
.csi-compatibility-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.csi-personality-grid article,
.csi-compatibility-insights article {
  padding: 22px;
  background: var(--surface-warm);
  border: 1px solid rgba(201, 154, 61, .22);
  border-radius: 14px;
}

.csi-personality-grid h3,
.csi-compatibility-insights h3 {
  margin-bottom: 10px;
}

.csi-personality-grid p,
.csi-compatibility-insights p {
  margin-bottom: 0;
}

.csi-personality-grid ul {
  display: grid;
  gap: 7px;
}

.csi-personality-grid li::before {
  content: "•";
  margin-right: 8px;
  color: var(--primary);
}

.csi-year-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 24px;
  padding-top: 2px;
}

.csi-year-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--accent);
}

.csi-year-timeline li {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.csi-year-timeline li::before {
  content: "";
  width: 28px;
  height: 28px;
  background: var(--page);
  border: 3px solid var(--accent);
  border-radius: 50%;
}

.csi-year-timeline li.is-current::before {
  background: var(--primary);
  border: 7px solid var(--primary);
  box-shadow: 0 0 0 5px #fff;
}

.csi-year-timeline li.is-current strong {
  color: var(--primary);
}

.csi-tool-cta {
  display: flex;
  margin-top: 34px;
  padding: clamp(24px, 4vw, 42px);
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: linear-gradient(120deg, #fff9ee, #fff);
}

.csi-tool-cta h2,
.csi-tool-cta p:last-child {
  margin-bottom: 0;
}

.csi-tool-disclaimer {
  margin: 26px auto 0;
  max-width: 900px;
  text-align: center;
  font-size: .86rem;
}

.csi-tool-alert {
  margin: 70px 0;
  padding: 24px;
  color: #8f090c;
  background: #fff1f1;
  border: 1px solid #edbaba;
  border-radius: 12px;
}

/* Compatibility */
.csi-compatibility-form {
  margin-top: 42px;
  padding: clamp(24px, 4vw, 46px);
}

.csi-compatibility-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.csi-compatibility-inputs > section {
  min-width: 0;
}

.csi-person-preview {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 20px;
}

.csi-person-preview img {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.csi-person-preview h2 {
  margin-bottom: 5px;
}

.csi-person-preview p {
  margin-bottom: 7px;
}

.csi-person-preview a {
  color: var(--primary);
  font-weight: 700;
}

.csi-compatibility-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #9a6718;
  background: #f9e8c7;
  border-radius: 50%;
  font-size: 1.4rem;
}

.csi-compatibility-form .csi-tool-submit {
  max-width: 520px;
  margin: 28px auto 0;
}

.csi-compatibility-result {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 28px;
  padding: clamp(26px, 4vw, 44px);
  background: linear-gradient(120deg, #1c352d, #24483d);
}

.csi-compatibility-result h2,
.csi-compatibility-result p {
  color: #fff;
}

.csi-compatibility-result .csi-tool-kicker {
  color: #efc772;
}

.csi-score-ring {
  display: grid;
  width: 150px;
  height: 150px;
  place-content: center;
  color: #fff;
  background:
    radial-gradient(circle closest-side, #24443a 75%, transparent 77% 99%),
    conic-gradient(#efc772 calc(var(--score) * 1%), rgba(255, 255, 255, .17) 0);
  border-radius: 50%;
  text-align: center;
}

.csi-score-ring strong {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
}

.csi-score-ring span {
  font-size: .78rem;
  opacity: .8;
}

.csi-relation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.csi-relation-tags span {
  padding: 5px 10px;
  color: #1c352d;
  background: #f5d995;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 750;
}

.csi-score-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.csi-score-breakdown div {
  padding: 8px 10px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border-radius: 9px;
  text-align: center;
}

.csi-score-breakdown dt {
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.csi-score-breakdown dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.csi-rule-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.csi-rule-grid article {
  display: grid;
  min-height: 120px;
  padding: 18px 10px;
  place-content: center;
  gap: 8px;
  background: var(--surface);
  text-align: center;
}

.csi-rule-grid strong {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.7rem;
}

/* Zodiac-year archive and single */
.csi-years-page .csi-tool-hero {
  padding-bottom: 52px;
}

.csi-years-control {
  margin-top: 38px;
  padding: clamp(24px, 4vw, 42px);
}

.csi-years-control__labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .88rem;
}

.csi-years-control input[type="range"] {
  width: 100%;
  height: 8px;
  margin: 18px 0;
  accent-color: var(--primary);
}

.csi-years-current {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.csi-years-current img {
  width: 170px;
  height: 150px;
  object-fit: contain;
}

.csi-years-current h2 {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.csi-years-current p {
  margin-bottom: 4px;
}

.csi-years-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.csi-year-card {
  position: relative;
  display: grid;
  min-height: 300px;
  padding: 26px 20px;
  justify-items: center;
  align-content: start;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.csi-year-card:hover,
.csi-year-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(178, 15, 18, .4);
  box-shadow: var(--shadow-lg);
}

.csi-year-card.is-current {
  border-color: var(--primary);
}

.csi-year-card__guide {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  color: #fff;
  background: var(--primary);
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.csi-year-card h2 {
  margin-bottom: 0;
  color: var(--primary);
  font-size: 2rem;
}

.csi-year-card h3 {
  margin: 4px 0 10px;
}

.csi-year-card__character {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 3.7rem;
  line-height: 1.15;
}

.csi-year-element {
  margin: 8px 0 12px;
  padding: 5px 12px;
  background: var(--surface-warm);
  border-radius: 999px;
  color: var(--muted);
  font-size: .76rem;
}

.csi-year-card small {
  color: var(--muted);
}

.csi-calendar-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.csi-calendar-guide-card {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.csi-calendar-guide-card > a {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.csi-calendar-guide-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-warm);
}

.csi-calendar-guide-card__media.is-empty {
  background:
    radial-gradient(circle at 72% 20%, rgba(213, 159, 44, .2), transparent 26%),
    linear-gradient(135deg, #fffaf0, #f3ead9);
}

.csi-calendar-guide-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

.csi-calendar-guide-card__body {
  display: flex;
  min-height: 228px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px 22px 20px;
}

.csi-calendar-guide-card__eyebrow {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.csi-calendar-guide-card__title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.65vw, 1.55rem);
  font-weight: 700;
  line-height: 1.24;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.csi-calendar-guide-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 12px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.csi-calendar-guide-card__cta {
  margin-top: auto;
  padding-top: 18px;
  color: var(--primary);
  font-size: .9rem;
  font-weight: 800;
}

.csi-calendar-guide-card:hover,
.csi-calendar-guide-card:focus-within {
  transform: translateY(-5px);
  border-color: rgba(178, 15, 18, .42);
  box-shadow: var(--shadow-lg);
}

.csi-calendar-guide-card:hover .csi-calendar-guide-card__media img,
.csi-calendar-guide-card:focus-within .csi-calendar-guide-card__media img {
  transform: scale(1.04);
}

.csi-year-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.csi-year-related-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.csi-year-related-card:hover,
.csi-year-related-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(178, 15, 18, .42);
  box-shadow: var(--shadow-lg);
}

.csi-year-related-card__image {
  display: grid;
  aspect-ratio: 3 / 2;
  max-height: 205px;
  overflow: hidden;
  place-items: center;
  background: var(--surface-warm);
}

.csi-year-related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.csi-year-related-card:hover .csi-year-related-card__image img {
  transform: scale(1.035);
}

.csi-year-related-card__fallback {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 4.25rem;
  line-height: 1;
}

.csi-year-related-card__body {
  display: flex;
  min-height: 154px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 18px 18px;
}

.csi-year-related-card__meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.csi-year-related-card h3 {
  margin: 0;
  font-size: clamp(1.08rem, 1.35vw, 1.32rem);
  line-height: 1.25;
}

.csi-year-related-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.csi-year-related-card h3 a:hover,
.csi-year-related-card h3 a:focus-visible {
  color: var(--primary);
}

.csi-year-related-card__read {
  margin-top: auto;
  padding-top: 16px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.csi-year-related-card__read:hover,
.csi-year-related-card__read:focus-visible {
  text-decoration: underline;
}

.csi-years-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 30px;
}

.csi-years-pagination a,
.csi-years-pagination span {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.csi-years-pagination a.is-current {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

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

.csi-cycle-grid article {
  padding: 24px;
  background: var(--surface-warm);
  border: 1px solid rgba(201, 154, 61, .25);
  border-radius: var(--radius-md);
}

.csi-cycle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style-position: inside;
  color: var(--muted);
}

.csi-year-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.csi-year-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
}

.csi-year-table th,
.csi-year-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.csi-year-table th {
  color: var(--ink);
  background: var(--surface-warm);
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.csi-year-table tbody tr:last-child td {
  border-bottom: 0;
}

.csi-year-table a {
  color: var(--primary);
  font-weight: 750;
}

.csi-year-single {
  padding: 28px 0 76px;
}

.csi-year-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: .86rem;
}

.csi-year-breadcrumbs a {
  color: var(--primary);
  font-weight: 700;
}

.csi-year-breadcrumbs strong {
  color: var(--ink);
}

.csi-year-guide,
.csi-year-main-column,
.csi-year-sidebar,
.csi-year-related-card {
  min-width: 0;
}

.csi-year-guide {
  max-width: 1120px;
  margin-inline: auto;
}

.csi-year-article-header {
  max-width: 790px;
  margin: 0 auto 28px;
  text-align: center;
}

.csi-year-article-header h1 {
  margin: 0 auto 14px;
  color: var(--ink);
  font-size: clamp(2.25rem, 4.3vw, 3.85rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.csi-year-article-lead {
  max-width: 820px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.7;
}

.csi-year-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.csi-year-article-meta li {
  padding: 7px 13px;
  color: #79644e;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}

.csi-year-article-header .button-row {
  justify-content: center;
}

.csi-year-cover {
  width: min(100%, 920px);
  height: clamp(300px, 39vw, 438px);
  margin: 0 auto;
  overflow: hidden;
  background: #f6ecda;
  border: 1px solid var(--border);
  border-radius: clamp(18px, 2vw, 28px);
  box-shadow: var(--shadow-lg);
}

.csi-year-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.csi-year-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(270px, 312px);
  max-width: 1068px;
  gap: clamp(22px, 3vw, 34px);
  justify-content: center;
  align-items: start;
  margin: 32px auto 0;
}

.csi-year-main-column,
.csi-year-sidebar {
  display: grid;
  gap: 24px;
}

.csi-year-sidebar {
  position: sticky;
  top: 104px;
}

.csi-year-prose,
.csi-year-boundary,
.csi-year-side-card,
.csi-year-side-cta {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.csi-year-prose {
  overflow: hidden;
  color: #4f4a43;
  font-size: clamp(.98rem, 1vw, 1.06rem);
  line-height: 1.72;
}

.csi-year-reading-intro {
  padding: clamp(30px, 4.5vw, 54px);
  background:
    radial-gradient(circle at 92% 12%, rgba(201, 149, 46, .13), transparent 28%),
    linear-gradient(145deg, #fffdf9 0%, #fff 72%);
  border-bottom: 1px solid var(--border);
}

.csi-year-reading-intro h2 {
  max-width: 17ch;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1.15;
}

.csi-year-reading-intro > p:last-child {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.csi-year-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(24px, 3.5vw, 40px) clamp(24px, 4.5vw, 52px);
  background: #fbf7ef;
  border-bottom: 1px solid var(--border);
}

.csi-year-summary-card {
  min-width: 0;
  padding: 22px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(226, 211, 188, .95);
  border-radius: 16px;
}

.csi-year-summary-card__label {
  margin: 0 0 8px !important;
  color: var(--primary);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1.25;
  text-transform: uppercase;
}

.csi-year-summary-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  line-height: 1.25;
}

.csi-year-summary-card > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
}

.csi-year-trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}

.csi-year-trait-list li {
  margin: 0 !important;
  padding: 6px 10px;
  color: #6d4c20;
  background: #fff8e9;
  border: 1px solid #ead8b9;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.2;
}

.csi-year-editorial-heading {
  padding: clamp(30px, 3.6vw, 42px) clamp(24px, 4.5vw, 52px) 0;
}

.csi-year-editorial-heading .csi-tool-kicker {
  margin: 0;
}

.csi-year-editorial-heading h2 {
  max-width: 27ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.35vw, 2.05rem);
  line-height: 1.22;
}

.csi-year-editorial-content {
  padding: 18px clamp(24px, 4.5vw, 52px) clamp(34px, 4vw, 48px);
  color: #48443e;
}

.csi-year-editorial-content > :first-child {
  margin-top: 0 !important;
}

.csi-year-editorial-content > :last-child {
  margin-bottom: 0 !important;
}

.csi-year-editorial-content h2 {
  position: relative;
  margin: 38px 0 14px;
  padding-top: 19px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  line-height: 1.24;
}

.csi-year-editorial-content h2::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 999px;
  content: "";
}

.csi-year-editorial-content h3 {
  margin: 28px 0 10px;
  color: var(--ink);
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  line-height: 1.3;
}

.csi-year-editorial-content h4 {
  margin: 28px 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.35;
}

.csi-year-editorial-content p,
.csi-year-editorial-content ul,
.csi-year-editorial-content ol,
.csi-year-editorial-content blockquote,
.csi-year-editorial-content figure,
.csi-year-editorial-content .wp-block-columns {
  margin-top: 0;
  margin-bottom: 22px;
}

.csi-year-editorial-content p {
  max-width: 74ch;
}

.csi-year-editorial-content > p:first-child {
  max-width: none;
  margin-bottom: 30px;
  padding: 18px 20px;
  color: #575048;
  background: linear-gradient(135deg, #fff9ee, #fffefb);
  border: 1px solid #eadbc3;
  border-left: 4px solid var(--gold);
  border-radius: 0 13px 13px 0;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  line-height: 1.7;
}

.csi-year-editorial-content p:empty {
  display: none;
}

.csi-year-editorial-content strong {
  color: #292622;
  font-weight: 750;
}

.csi-year-editorial-content ul,
.csi-year-editorial-content ol {
  display: grid;
  gap: 9px;
  max-width: 72ch;
  padding: 18px 22px 18px 44px;
  background: #fcfaf6;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.csi-year-editorial-content li {
  padding-left: 3px;
  line-height: 1.7;
}

.csi-year-editorial-content li::marker {
  color: var(--primary);
  font-weight: 800;
}

.csi-year-editorial-content a {
  color: var(--primary);
  font-weight: 650;
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

.csi-year-editorial-content blockquote {
  position: relative;
  padding: 22px 24px 22px 56px;
  color: #57482f;
  background: #fff9ed;
  border: 1px solid #ead8b9;
  border-radius: 14px;
}

.csi-year-editorial-content blockquote::before {
  position: absolute;
  top: 15px;
  left: 20px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 2.6rem;
  line-height: 1;
  content: "“";
}

.csi-year-editorial-content blockquote > :last-child {
  margin-bottom: 0;
}

.csi-year-editorial-content hr {
  height: 1px;
  margin: 38px 0;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  border: 0;
}

.csi-year-editorial-content figure,
.csi-year-editorial-content .wp-block-image {
  margin: 30px 0;
}

.csi-year-editorial-content figure img,
.csi-year-editorial-content .wp-block-image img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(70, 45, 20, .1);
}

.csi-year-editorial-content figcaption,
.csi-year-editorial-content .wp-element-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
  text-align: center;
}

.csi-year-editorial-content .wp-block-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.csi-year-editorial-content .wp-block-column {
  min-width: 0;
}

.csi-year-table-scroll {
  max-width: 100%;
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.csi-year-editorial-content .csi-year-table-scroll table {
  display: table;
  min-width: 620px;
  margin: 0;
  border: 0;
}

.csi-year-editorial-content table thead th {
  color: #fff;
  background: #6f1415;
  border-color: #823133;
}

.csi-year-editorial-content table tbody tr:nth-child(even) {
  background: #fcf8f0;
}

.csi-year-editorial-note {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(230px, .9fr);
  gap: 26px;
  align-items: start;
  margin: 0 clamp(24px, 4.5vw, 52px) clamp(38px, 5vw, 52px);
  padding: 24px;
  background: linear-gradient(135deg, #f7f1e6, #fffdf8);
  border: 1px solid #e6d6bd;
  border-radius: 16px;
}

.csi-year-editorial-note h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.3;
}

.csi-year-editorial-note ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.15em;
  color: #5e5549;
  font-size: .9rem;
}

.csi-year-editorial-note li::marker {
  color: var(--primary);
}

.csi-year-boundary {
  padding: clamp(24px, 3vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 249, 237, .98), rgba(255, 255, 255, .95));
}

.csi-year-boundary h2 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.csi-year-boundary p:last-child {
  margin-bottom: 0;
}

.csi-year-early-birth,
.csi-year-life-modules,
.csi-year-cycle,
.csi-year-faq,
.csi-year-source-review {
  padding: clamp(24px, 3vw, 34px);
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.csi-year-early-birth {
  background: linear-gradient(135deg, #fff7e8, #fffdfa);
  border-color: #e7cfaa;
}

.csi-year-early-birth h2,
.csi-year-life-modules h2,
.csi-year-cycle h2,
.csi-year-faq h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.csi-year-early-birth p:not(.csi-tool-kicker) {
  max-width: 68ch;
  margin-bottom: 18px;
  color: #584e43;
}

.csi-year-life-modules__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.csi-year-life-modules__grid section {
  padding: 19px;
  background: #fcfaf5;
  border: 1px solid #eadfce;
  border-radius: 14px;
}

.csi-year-life-modules__grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.08rem;
}

.csi-year-life-modules__grid p,
.csi-year-cycle__note,
.csi-year-faq p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.65;
}

.csi-year-cycle__timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 10px;
  margin: 22px 0 16px;
  padding: 0;
  list-style: none;
}

.csi-year-cycle__timeline li a {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 13px;
  color: var(--ink);
  text-decoration: none;
  background: #fcfaf5;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.csi-year-cycle__timeline li.is-current a {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.csi-year-cycle__timeline strong { font-family: var(--font-display); font-size: 1.25rem; }
.csi-year-cycle__timeline span { font-size: .75rem; line-height: 1.35; }

.csi-year-faq details { padding: 15px 0; border-top: 1px solid var(--border); }
.csi-year-faq details:first-of-type { margin-top: 18px; }
.csi-year-faq summary { cursor: pointer; color: var(--ink); font-weight: 750; }
.csi-year-faq p { margin: 10px 0 0; }

.csi-year-source-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  background: #fbf7ef;
}

.csi-year-source-review a,
.csi-year-source-review span:not(.csi-year-summary-card__label) {
  color: #554d43;
  font-size: .9rem;
}

.csi-year-side-card {
  overflow: hidden;
  padding: 28px;
}

.csi-year-side-card h2 {
  margin-bottom: 20px;
  font-size: 1.85rem;
}

.csi-year-fact-list {
  margin: 0;
}

.csi-year-fact-list > div {
  display: grid;
  gap: 5px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.csi-year-fact-list dt {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.csi-year-fact-list dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.csi-year-side-cta {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(250, 240, 218, .95), rgba(255, 255, 255, .98));
}

.csi-year-side-cta__character {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 2rem;
}

.csi-year-side-cta h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.csi-year-side-cta p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.csi-year-related-section {
  max-width: 1068px;
  margin: 42px auto 0;
}

.csi-year-related-section .csi-section-heading {
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}

.csi-year-related-footer {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  margin-top: 24px;
  text-align: right;
}

.csi-year-related-footer .text-link {
  margin-left: auto;
  padding: 8px 0;
}

/* Imported legacy guide content must never exceed the year-guide card. */
.csi-year-single .entry-content img,
.csi-year-single .entry-content video,
.csi-year-single .entry-content iframe,
.csi-year-single .entry-content embed,
.csi-year-single .entry-content object,
.csi-year-single .entry-content table {
  max-width: 100%;
}

.csi-year-single .entry-content img,
.csi-year-single .entry-content video {
  height: auto;
}

.csi-year-single .entry-content iframe,
.csi-year-single .entry-content embed,
.csi-year-single .entry-content object {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.csi-year-single .entry-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.csi-year-single .entry-content th,
.csi-year-single .entry-content td {
  min-width: 130px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

/* The wrapper provides scrolling; keep the inner table semantically intact. */
.csi-year-single .entry-content .csi-year-table-scroll table {
  display: table;
  width: max-content;
  min-width: 620px;
  overflow: visible;
}

/* Keep editorial illustrations useful without letting imported media dominate the guide. */
.csi-year-single .csi-year-editorial-content figure,
.csi-year-single .csi-year-editorial-content .wp-block-image {
  width: min(100%, 640px);
  margin-right: auto;
  margin-left: auto;
}

.csi-year-single .csi-year-editorial-content figure img,
.csi-year-single .csi-year-editorial-content .wp-block-image img {
  width: 100%;
  height: clamp(220px, 35vw, 360px);
  object-fit: cover;
}

@media (max-width: 1120px) {
  .csi-year-content-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 640px) {
  .csi-year-life-modules__grid,
  .csi-year-source-review {
    grid-template-columns: 1fr;
  }

  .csi-year-cycle__timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .csi-calculator-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .csi-year-content-layout {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .csi-year-sidebar {
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  }

  .csi-calculator-form {
    position: static;
  }

  .csi-personality-grid,
  .csi-compatibility-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .csi-cycle-list {
    grid-template-columns: 1fr;
  }
}

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

  .csi-year-single {
    padding-top: 20px;
  }

  .csi-year-breadcrumbs {
    margin-bottom: 26px;
  }

  .csi-year-article-header {
    margin-bottom: 26px;
  }

  .csi-year-article-header .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .csi-year-cover {
    height: clamp(230px, 55vw, 340px);
    border-radius: 16px;
  }

  .csi-year-content-layout {
    margin-top: 26px;
  }

  .csi-year-sidebar {
    grid-template-columns: 1fr;
  }

  .csi-year-summary-grid,
  .csi-year-editorial-note,
  .csi-year-editorial-content .wp-block-columns {
    grid-template-columns: 1fr;
  }

  .csi-year-editorial-note {
    gap: 18px;
  }

  .csi-year-related-footer {
    margin-top: 18px;
  }

  .csi-tool-hero h1 {
    font-size: clamp(2.15rem, 11vw, 3.3rem);
  }

  .csi-date-fields {
    grid-template-columns: 1fr 1fr;
  }

  .csi-date-fields label:last-child {
    grid-column: 1 / -1;
  }

  .csi-result-identity,
  .csi-compatibility-inputs,
  .csi-compatibility-result,
  .csi-years-current {
    grid-template-columns: 1fr;
  }

  .csi-result-identity img {
    max-width: 310px;
    margin: auto;
    grid-row: 1;
  }

  .csi-facts-grid,
  .csi-association-grid,
  .csi-personality-grid,
  .csi-compatibility-insights {
    grid-template-columns: 1fr;
  }

  .csi-facts-grid > div,
  .csi-association-grid > div {
    border-right: 0 !important;
  }

  .csi-association-grid > div:nth-child(2) {
    border-top: 1px solid var(--border);
  }

  .csi-section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .csi-year-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 7px;
  }

  .csi-year-timeline::before {
    top: 14px;
    bottom: 14px;
    left: 20px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .csi-year-timeline li {
    grid-template-columns: 28px 70px minmax(0, 1fr);
    min-height: 58px;
    align-items: start;
    justify-items: start;
    text-align: left;
  }

  .csi-year-timeline li::before {
    grid-column: 1;
    grid-row: 1;
  }

  .csi-year-timeline strong {
    grid-column: 2;
    grid-row: 1;
  }

  .csi-year-timeline span {
    grid-column: 3;
    grid-row: 1;
  }

  .csi-tool-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .csi-compatibility-mark {
    margin: auto;
    transform: rotate(90deg);
  }

  .csi-person-preview {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .csi-person-preview img {
    width: 105px;
    height: 105px;
  }

  .csi-compatibility-result {
    justify-items: center;
    text-align: center;
  }

  .csi-relation-tags {
    justify-content: center;
  }

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

  .csi-years-current {
    text-align: center;
  }

  .csi-years-current img {
    margin: auto;
  }

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

  .csi-year-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .csi-cycle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .csi-tool-shell {
    width: min(calc(100% - 22px), var(--container));
  }

  .csi-year-article-header h1 {
    font-size: clamp(2.05rem, 11vw, 3rem);
  }

  .csi-year-cover {
    height: 220px;
  }

  .csi-year-article-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .csi-year-article-meta li {
    text-align: center;
  }

  .csi-year-prose,
  .csi-year-side-card,
  .csi-year-side-cta,
  .csi-year-boundary {
    border-radius: 16px;
  }

  .csi-year-prose {
    padding: 0;
  }

  .csi-year-reading-intro,
  .csi-year-editorial-heading {
    padding-right: 18px;
    padding-left: 18px;
  }

  .csi-year-summary-grid {
    padding: 18px;
  }

  .csi-year-summary-card {
    padding: 18px;
  }

  .csi-year-editorial-content {
    padding: 20px 18px 30px;
  }

  .csi-year-editorial-content h2 {
    margin-top: 38px;
    padding-top: 20px;
  }

  .csi-year-editorial-content ul,
  .csi-year-editorial-content ol {
    padding: 16px 18px 16px 38px;
  }

  .csi-year-editorial-note {
    margin: 0 18px 30px;
    padding: 18px;
  }

  .csi-tool-section,
  .csi-calculator-form {
    padding: 22px 17px;
  }

  .csi-date-fields {
    grid-template-columns: 1fr;
  }

  .csi-date-fields label:last-child {
    grid-column: auto;
  }

  .csi-facts-grid > div,
  .csi-association-grid > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .csi-facts-grid dd,
  .csi-association-grid dd {
    text-align: left;
  }

  .csi-years-grid {
    grid-template-columns: 1fr;
  }

  .csi-year-related-grid {
    grid-template-columns: 1fr;
  }
}
