/* «الأبراج الصينية» — Astrolabe & Folio. Loaded only on /chinese-zodiac/ pages. Tokens fall back to SPEC values. */
.cz {
	--cz-el-wood: #A9C98F; --cz-el-fire: #E58A6B; --cz-el-earth: #C2B47A; --cz-el-metal: #C9CED8; --cz-el-water: #8FB0E6;
	--accent: var(--gold);
	color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.75;
	padding-bottom: 48px;
}
.cz *, .cz *::before, .cz *::after { letter-spacing: 0; }
.cz .num, .cz table, .cz-facts dd { font-variant-numeric: tabular-nums; }
.cz a:where(:not(.btn)) { color: var(--gold-hi); text-underline-offset: 3px; }
.cz a:focus-visible, .cz button:focus-visible, .cz summary:focus-visible, .cz select:focus-visible, .cz input:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 4px; }

/* type */
.cz-h1 { font-family: var(--f-display); font-weight: 700; font-size: 32px; line-height: 44px; margin: 0; color: var(--ink); background: none; -webkit-text-fill-color: currentColor; }
.cz-h2 { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 36px; margin: 8px 0 16px; color: var(--ink); }
.cz-h2__n { font-family: var(--f-body); font-weight: 600; font-size: 14px; color: var(--rubric); font-variant-numeric: tabular-nums; }
.cz-h2__n { margin-inline-end: 10px; white-space: nowrap; vertical-align: 2px; }
.cz-h2__n::after { content: ' ·'; }
.cz-h3 { font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 30px; margin: 20px 0 8px; color: var(--gold-hi); }
.cz-lead { font-size: 18px; line-height: 34px; color: var(--ink); }
.cz-prose p { font-size: 18px; line-height: 34px; margin: 0 0 16px; max-width: 37.2em; color: var(--ink); }
.cz-note { font-size: 14px; line-height: 22px; color: var(--ink-2); margin: 0 0 16px; max-width: 37.2em; }
.cz-meta { margin: 6px 0 0; font-size: 14px; line-height: 22px; font-weight: 500; color: var(--ink-2); }

/* ornaments */
.cz-ticks { height: 9px; margin-top: 40px; border-bottom: 1px solid var(--rule);
	background: repeating-linear-gradient(to left, var(--rule-strong) 0 1px, transparent 1px 40px) bottom / 100% 9px no-repeat,
		repeating-linear-gradient(to left, var(--rule) 0 1px, transparent 1px 8px) bottom / 100% 4px no-repeat; }
.cz-ticks--accent { margin-top: 20px; border-bottom-color: var(--accent);
	background: repeating-linear-gradient(to left, var(--accent) 0 1px, transparent 1px 40px) bottom / 100% 9px no-repeat,
		repeating-linear-gradient(to left, var(--rule-strong) 0 1px, transparent 1px 8px) bottom / 100% 4px no-repeat; }
.cz-sec { margin-top: 8px; }

/* seal */
.cz-seal { display: block; flex: none; color: var(--gold-hi); fill: none; }
.cz-seal__o { stroke: var(--accent); stroke-width: 1.25; }
.cz-seal__i { stroke: var(--rule-strong); stroke-width: 1; }
.cz-seal__t { stroke: var(--gold); stroke-width: 1.25; stroke-linecap: round; }
.cz-seal--sm { width: 40px; height: 40px; }
.cz-seal--md { width: 56px; height: 56px; }
.cz-seal--lg { width: 72px; height: 72px; }
.cz-seal--xl { width: 96px; height: 96px; }

/* hero (animal + year) */
.cz-hero { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.cz-hero__t { min-width: 0; }

/* hub top */
.cz-head { margin-top: 16px; }
.cz-head .cz-lead { color: var(--ink-2); margin: 12px 0 0; }
.cz-calc { margin-top: 24px; background: var(--night-2); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 16px; }
.cz-calc__t { font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 30px; margin: 0 0 12px; color: var(--gold-hi); }
.cz-form__row { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 8px; }
.cz-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cz-field label { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--ink-2); }
.cz-field select, .cz-field input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--rule-strong);
	background: var(--night); color: var(--ink); font: 500 16px/1 var(--f-body); font-variant-numeric: tabular-nums; appearance: none; -webkit-appearance: none; }
.cz-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23D9B45A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-position: left 12px center; background-size: 12px 8px; background-repeat: no-repeat; padding-left: 32px; }
.cz-field input::placeholder { color: var(--ink-3); }
.cz-field [aria-invalid="true"] { border-color: var(--rubric); box-shadow: inset 0 0 0 1px var(--rubric); }
.cz-field__err { margin: 0; font-size: 13px; line-height: 20px; color: var(--rubric); }
.cz-field__hint { margin: 8px 0 12px; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.cz-form__sum { margin: 0 0 12px; padding: 8px 12px; border-inline-start: 2px solid var(--rubric); color: var(--ink); font-size: 14px; background: var(--night-3); border-radius: 4px; }

.cz-btn--block { width: 100%; }

/* result */
.cz-result { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule-strong); display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.cz-result[hidden] { display: none; }
.cz-result__seal .cz-seal { width: 72px; height: 72px; }
.cz-result__k { margin: 0; font-size: 13px; line-height: 20px; color: var(--rubric); font-weight: 500; }
.cz-result__h { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 40px; margin: 0; color: var(--ink); }
.cz-result__h:focus { outline: none; }
.cz-result__label { margin: 0 0 12px; color: var(--gold-hi); font-weight: 500; }
.cz-result__note { font-size: 14px; line-height: 22px; color: var(--ink-2); margin: 12px 0; padding-inline-start: 12px; border-inline-start: 2px solid var(--gold); }
.cz-result .btn { margin-top: 12px; }

/* fact grid */
.cz-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--rule); }
.cz-facts > div { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.cz-facts > div:nth-child(odd):not(.cz-facts__wide) { padding-inline-end: 12px; }
.cz-facts__wide { grid-column: 1 / -1; }
.cz-facts dt { font-size: 13px; line-height: 20px; color: var(--ink-3); }
.cz-facts dd { margin: 0; font-weight: 500; color: var(--ink); }
.cz-facts--tight > div { padding: 6px 0; }

/* tables */
.cz-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cz-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 24px; }
.cz-table th, .cz-table td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.cz-table thead th { font-weight: 500; font-size: 13px; color: var(--gold-hi); border-bottom-color: var(--rule-strong); white-space: nowrap; }
.cz-table tbody th { font-weight: 600; }
.cz-table tr.is-now { background: var(--night-3); }
.cz-table--animals td.cz-years { color: var(--ink-2); }
.cz-animal-link { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; white-space: nowrap; }
.cz-animal-link span { color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.cz-animal-link:hover span { color: var(--gold-hi); }
.cz-tag { display: inline-block; font: 500 12px/20px var(--f-body); padding: 0 8px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--gold-hi); vertical-align: middle; white-space: nowrap; }
.cz-tag--clash { border-color: rgba(229, 138, 107, .5); color: var(--rubric); }
.cz-tag--self { background: var(--gold); color: var(--night); border-color: var(--gold); }

/* elements */
.cz-elements { margin: 16px 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.cz-el { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.cz-el dt { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); padding-inline-start: 12px; border-inline-start: 3px solid var(--el, var(--gold)); }
.cz-el__d { display: block; font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--ink-3); }
.cz-el dd { margin: 0; color: var(--ink-2); }
.cz-el--wood { --el: var(--cz-el-wood); } .cz-el--fire { --el: var(--cz-el-fire); } .cz-el--earth { --el: var(--cz-el-earth); }
.cz-el--metal { --el: var(--cz-el-metal); } .cz-el--water { --el: var(--cz-el-water); }

/* animal: element combos */
.cz-combos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.cz-combo { padding: 14px 0 14px; padding-inline-start: 14px; border-bottom: 1px solid var(--rule); border-inline-start: 3px solid var(--el); }
.cz-combo__t { font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 30px; margin: 0; color: var(--ink); }
.cz-combo__y { margin: 0 0 4px; font-size: 14px; color: var(--gold-hi); font-weight: 500; }
.cz-combo p:last-child { margin: 0; color: var(--ink-2); }

.cz-pair { display: grid; gap: 8px; }
.cz-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.cz-list li { padding: 8px 0; padding-inline-start: 18px; border-bottom: 1px solid var(--rule); position: relative; }
.cz-list li::before { content: ''; position: absolute; inset-inline-start: 2px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: 1px solid var(--gold); transform: rotate(45deg); }

/* relations */
.cz-rel { display: grid; gap: 8px; margin-bottom: 16px; }
.cz-rel ul { list-style: none; margin: 0; padding: 0; }
.cz-rel li a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: border-color .15s; }
.cz-rel li a:hover { border-bottom-color: var(--rule-strong); }
.cz-rel b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.cz-rel small { display: block; font-size: 13px; line-height: 20px; color: var(--ink-3); }
.cz-rel .cz-h3 { margin-top: 8px; }

/* year: list of 12 */
.cz-yr-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.cz-yr { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 80px; }
.cz-yr:target { background: var(--night-2); }
.cz-yr__t { font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 30px; margin: 0 0 4px; }
.cz-yr__t a { color: var(--ink); text-decoration: none; }
.cz-yr__t a:hover { color: var(--gold-hi); }
.cz-yr p { margin: 0; color: var(--ink); font-size: 17px; line-height: 30px; max-width: 37.2em; }

/* side */
.cz-side { margin-top: 40px; }
.cz-panel { background: var(--night-2); border: 1px solid var(--rule); border-radius: 14px; padding: 16px; }
.cz-panel__t { margin: 0 0 8px; font-family: var(--f-display); font-weight: 600; font-size: 19px; color: var(--gold-hi); }
.cz-links { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.cz-links a { display: flex; align-items: center; min-height: 48px; padding: 4px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-weight: 500; }
.cz-links a::after { content: '←'; margin-inline-start: auto; padding-inline-start: 12px; color: var(--gold); }

/* feature (year teaser) */
.cz-feature { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 16px; border: 1px solid var(--rule-strong); border-radius: 14px; text-decoration: none; transition: border-color .15s; }
.cz-feature:hover { border-color: var(--gold); }
.cz-feature__k { display: block; font-size: 13px; color: var(--rubric); font-weight: 500; }
.cz-feature strong { display: block; font-family: var(--f-display); font-size: 22px; line-height: 34px; color: var(--ink); }
.cz-feature__m { display: block; font-size: 14px; color: var(--ink-2); }

/* faq */
.cz-faq { border-top: 1px solid var(--rule); }
.cz-faq details { border-bottom: 1px solid var(--rule); }
.cz-faq summary { cursor: pointer; list-style: none; min-height: 48px; padding: 12px 0; padding-inline-end: 28px; position: relative; font-weight: 600; color: var(--ink); }
.cz-faq summary::-webkit-details-marker { display: none; }
.cz-faq summary::after { content: '+'; position: absolute; inset-inline-end: 4px; top: 12px; color: var(--gold); font-weight: 400; font-size: 20px; }
.cz-faq details[open] summary::after { content: '−'; }
.cz-faq details p { margin: 0 0 16px; color: var(--ink-2); max-width: 37.2em; }

/* ring */
.cz-ring { margin-top: 48px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cz-ring ul { list-style: none; margin: 0; padding: 8px 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.cz-ring a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 6px 4px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: 13px; }
.cz-ring a:hover { color: var(--ink); }
.cz-ring a[aria-current="page"] { background: var(--night-3); color: var(--gold-hi); }
.cz-ring a[aria-current="page"] .cz-seal__o { stroke: var(--gold-hi); stroke-width: 2; }

/* ≥640 */
@media (min-width: 640px) {
	.cz-pair, .cz-rel { grid-template-columns: 1fr 1fr; gap: 24px; }
	.cz-seal--xl { width: 120px; height: 120px; }
	.cz-calc { padding: 24px; }
}
/* ≥960 */
@media (min-width: 960px) {
	.cz { padding-bottom: 80px; }
	.cz-h1 { font-size: 44px; line-height: 60px; }
	.cz-h2 { font-size: 30px; line-height: 44px; }
	.cz-h3 { font-size: 22px; line-height: 34px; }
	.cz-prose p, .cz-lead { font-size: 19px; line-height: 36px; }
	.cz-ticks { margin-top: 64px; }
	.cz-hub__top { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
	.cz-hub__top .cz-calc { margin-top: 16px; }
	.cz-body { max-width: 760px; }
	.cz-layout { display: grid; grid-template-columns: minmax(0, 680px) 320px; gap: 64px; justify-content: space-between; }
	.cz-side { margin-top: 32px; position: sticky; top: 88px; align-self: start; }
	.cz-ring ul { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .cz * { transition: none !important; } }
.cz-years span { display: inline-block; margin-inline-end: 12px; white-space: nowrap; }
.cz-years span:last-child { margin-inline-end: 0; }
