/* «منازل القمر» — /manazil/ and /manazil/{slug}/ — "Astrolabe & Folio" (SPEC.md). Loaded only on these pages. */
.mz {
	--z-moon: #E9E6DA;
	color: var(--ink); font-family: var(--f-body);
	padding-bottom: 48px;
}
.mz .num, .mz table, .mz dd, .mz select, .mz input { font-variant-numeric: tabular-nums; }
.mz a:where(:not(.btn)) { color: var(--gold-hi); text-underline-offset: 3px; }
.mz a:focus-visible, .mz summary:focus-visible, .mz button:focus-visible, .mz select:focus-visible, .mz input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.mz-muted { color: var(--ink-3); font-size: 14px; }
.mz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mz-pill { display: inline-block; padding: 0 8px; border: 1px solid var(--rubric); border-radius: 999px; color: var(--rubric); font-size: 13px; line-height: 20px; font-weight: 500; vertical-align: 2px; }

/* header */
.mz-head { padding: 16px 0 24px; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.mz-eyebrow { margin: 0 0 8px; color: var(--rubric); font: 500 14px/22px var(--f-body); }
.mz-head h1 { margin: 0 0 12px; font: 700 32px/44px var(--f-display); color: var(--ink); text-align: start; }
.mz-lede { margin: 0; max-width: 37.2em; color: var(--ink-2); font-size: 18px; line-height: 34px; }
.mz-head--page { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.mz-medal { display: inline-grid; place-items: center; width: 72px; height: 72px; margin: 6px; border-radius: 50%; border: 1px solid var(--gold);
	box-shadow: 0 0 0 4px var(--night), 0 0 0 5px var(--rule-strong);
	background: radial-gradient(circle closest-side, var(--night-2) 0 80%, transparent 81%), repeating-conic-gradient(from -.5deg, var(--rule-strong) 0 1deg, transparent 1deg 12.857deg), var(--night-2);
	color: var(--gold-hi); font: 700 30px/1 var(--f-display); font-variant-numeric: tabular-nums; }

/* top: now card + ring */
.mz-top { display: grid; gap: 24px; margin-bottom: 48px; }
.mz-now { position: relative; background: var(--night-2); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 16px; }
.mz-now::before { content: ""; position: absolute; inset-block-start: -1px; inset-inline: 16px; height: 2px; background: var(--gold); }
.mz-now__k { margin: 0; color: var(--rubric); font: 500 14px/22px var(--f-body); }
.mz-now__name { margin: 4px 0; font: 700 40px/52px var(--f-display); }
.mz-now__name a { color: var(--ink); text-decoration: none; }
.mz-now__name a:hover { color: var(--gold-hi); }
.mz-now__sub { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 24px; }
.mz-band { position: relative; height: 10px; border: 1px solid var(--rule-strong); border-radius: 999px; overflow: hidden; margin: 16px 0;
	background: repeating-linear-gradient(to left, transparent 0 calc(10% - 1px), var(--rule) calc(10% - 1px) 10%); }
.mz-band span { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--gold); border-radius: 999px; }
.mz-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--rule); }
.mz-grid > div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mz-grid > div:nth-child(odd) { padding-inline-end: 12px; }
.mz-grid > div:nth-child(even) { padding-inline-start: 12px; border-inline-start: 1px solid var(--rule); }
.mz-grid dt { color: var(--ink-3); font-size: 13px; line-height: 20px; }
.mz-grid dd { margin: 2px 0 0; font-size: 15px; line-height: 24px; }
.mz-grid b { color: var(--gold-hi); font-weight: 600; font-size: 20px; }
.mz-now__note { margin: 12px 0 0; color: var(--ink-3); font-size: 13px; line-height: 20px; }

/* ring */
.mz-ringwrap { display: grid; justify-items: center; gap: 8px; }
.mz-ring { width: 100%; max-width: 380px; height: auto; display: block; overflow: visible; }
.mz-ring__rim { fill: none; stroke: var(--rule); stroke-width: 1; }
.mz-ring__tick { stroke: var(--rule-strong); stroke-width: 1.25; }
.mz-ring__sign { fill: var(--ink-3); font: 500 13px var(--f-body); }
.mz-ring__seg { fill: var(--night-2); stroke: var(--rule-strong); stroke-width: 1; transition: fill .15s; }
.mz-ring a:hover .mz-ring__seg, .mz-ring a:focus .mz-ring__seg { fill: var(--night-3); stroke: var(--gold); }
.mz-ring a:focus { outline: none; }
.mz-ring a:focus-visible .mz-ring__seg { stroke-width: 2.5; }
.mz-ring__seg.is-hi { fill: rgba(217,180,90,.28); stroke: var(--gold); }
.mz-ring__n { fill: var(--ink-2); font: 600 14px var(--f-body); font-variant-numeric: tabular-nums; pointer-events: none; }
.mz-ring__n.is-hi { fill: var(--gold-hi); }
.mz-ring__moonline { stroke: var(--rubric); stroke-width: 2; stroke-linecap: round; }
.mz-ring__moon { fill: var(--z-moon); stroke: var(--night); stroke-width: 1.5; }
.mz-ring__moonshade { fill: var(--night); }
.mz-ring__ck { fill: var(--rubric); font: 500 15px var(--f-body); }
.mz-ring__cn { fill: var(--ink); font: 700 30px var(--f-display); }
.mz-ring__cd { fill: var(--gold-hi); font: 600 16px var(--f-body); font-variant-numeric: tabular-nums; }
.mz-note { margin: 0 0 16px; color: var(--ink-3); font-size: 14px; line-height: 22px; max-width: 37.2em; }
.mz-ringwrap .mz-note { text-align: center; margin: 0; }

/* sections */
.mz-sec { margin-bottom: 48px; }
.mz h2 { position: relative; margin: 0 0 12px; padding-top: 16px; font: 700 24px/36px var(--f-display); color: var(--ink); }
.mz-sec > h2::before, .mz-prose h2::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 6px;
	background: linear-gradient(var(--rule), var(--rule)) bottom / 100% 1px no-repeat,
		repeating-linear-gradient(to left, var(--rule-strong) 0 1px, transparent 1px 8px) bottom / 100% 4px no-repeat; }
.mz-prose p { max-width: 37.2em; font-size: 18px; line-height: 34px; margin: 0 0 16px; }
.mz-prose h2 { margin-top: 32px; }
.mz-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

/* birth tool */
.mz-form { background: var(--night-2); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 16px; max-width: 760px; }
.mz-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.mz-fields { display: grid; grid-template-columns: 1fr 1.5fr 1.2fr; gap: 8px; }
.mz-fields .mz-field:last-child { grid-column: 1 / -1; }
.mz-field { display: grid; gap: 4px; min-width: 0; }
.mz-field span { color: var(--ink-3); font-size: 13px; line-height: 20px; }
.mz-field select, .mz-field input { width: 100%; min-height: 48px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: 10px;
	background: var(--night); color: var(--ink); font: 500 16px/1 var(--f-body); color-scheme: dark; }
.mz-field input::placeholder { color: var(--ink-3); }
.mz-field select:hover, .mz-field input:hover { border-color: var(--gold); }
.mz-submit { margin-top: 16px; }
.mz-error { margin: 12px 0 0; color: var(--rubric); font-size: 14px; }
.mz-result { position: relative; margin-top: 16px; max-width: 760px; padding: 20px 16px; border: 1px solid var(--rule-strong); border-radius: 14px; }
.mz-result::before { content: ""; position: absolute; inset-block-start: -1px; inset-inline: 16px; height: 2px; background: var(--gold); }
.mz-result__k { margin: 0; color: var(--rubric); font-size: 14px; line-height: 22px; font-weight: 500; }
.mz-result__name { margin: 4px 0; font: 700 26px/40px var(--f-display); }
.mz-result__name a { color: var(--gold-hi); }
.mz-result__d, .mz-result__u { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; line-height: 26px; }
.mz-result__m { margin: 8px 0 0; color: var(--ink-3); font-size: 13px; line-height: 20px; }

/* tables */
.mz-tablewrap { margin: 0 0 16px; }
.mz-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 24px; }
.mz-table caption { text-align: start; padding-bottom: 8px; color: var(--ink-2); font-size: 14px; }
.mz-table th, .mz-table td { text-align: start; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--rule); }
.mz-table thead th { color: var(--gold-hi); font-weight: 600; font-size: 14px; border-bottom-color: var(--rule-strong); }
.mz-table tbody th { font-weight: 600; white-space: nowrap; }
.mz-table tbody th a { color: var(--ink); }
.mz-table tr.is-now { background: var(--night-3); }
.mz-table__n { color: var(--gold); font-weight: 600; }
.mz-table td:nth-child(3) { color: var(--ink-2); }
.mz-table__stars { font-size: 14px; color: var(--ink-2); }
@media (max-width: 759px) {
	.mz-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.mz-table, .mz-table tbody, .mz-table tr, .mz-table th, .mz-table td { display: block; }
	.mz-table tr { position: relative; padding: 12px 0; padding-inline-start: 36px; border-bottom: 1px solid var(--rule); }
	.mz-table tr.is-now { border-radius: 10px; }
	.mz-table th, .mz-table td { border: 0; padding: 2px 0; }
	.mz-table tbody th { font-size: 18px; line-height: 30px; }
	.mz-table td.mz-table__n { position: absolute; inset-inline-start: 4px; top: 14px; }
	.mz-table td[data-l] { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
	.mz-table td[data-l]::before { content: attr(data-l); color: var(--ink-3); font-size: 13px; }
	.mz-table--stars tr { padding-inline-start: 0; }
	.mz-table caption { display: block; }
	.mz-medal { width: 56px; height: 56px; font-size: 24px; margin: 4px; }
}

/* mansion page */
.mz-cols { display: grid; gap: 48px; }
.mz-side { align-self: start; }
.mz-facts { margin: 0 0 24px; border-top: 1px solid var(--rule); max-width: 680px; }
.mz-facts > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.mz-facts dt { color: var(--ink-3); font-size: 13px; line-height: 20px; }
.mz-facts dd { margin: 0; font-size: 16px; line-height: 28px; }
.mz-visit { margin: 0 0 24px; padding: 4px 16px 12px; border: 1px solid var(--rule); border-inline-start: 2px solid var(--gold); border-radius: 10px; background: var(--night-2); max-width: 680px; }
.mz .mz-visit__k { padding-top: 8px; margin: 0 0 4px; font: 600 19px/30px var(--f-display); color: var(--rubric); }
.mz-visit h2::before { display: none; }
.mz-prose .mz-visit p { font-size: 16px; line-height: 28px; margin: 0; }
.mz-prose .mz-conv { margin: 16px 0; padding: 12px 0; border-block: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; line-height: 22px; }
.mz-side__h { margin: 24px 0 4px; color: var(--rubric); font-size: 14px; font-weight: 500; }
.mz-mini { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.mz-mini a { display: flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 15px; }
.mz-mini a:hover, .mz-mini a.is-cur { color: var(--gold-hi); }
.mz-mini__n { flex: none; width: 24px; text-align: center; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.mz-moon-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--z-moon); box-shadow: inset -3px -1px 0 var(--night); }
.mz-ringwrap--side .mz-ring { max-width: 300px; }
.mz-pn { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--rule); margin: 24px 0 16px; max-width: 680px; }
.mz-pn__a { display: grid; gap: 2px; padding: 12px 0; min-height: 44px; text-decoration: none; }
.mz-pn__a + .mz-pn__a { border-inline-start: 1px solid var(--rule); padding-inline-start: 12px; text-align: end; }
.mz-pn__a b { color: var(--ink); font: 700 18px/28px var(--f-display); }
.mz-pn__a:hover b { color: var(--gold-hi); }

/* FAQ + sources */
.mz-faq { border-top: 1px solid var(--rule); max-width: 680px; }
.mz-faq details, .mz-sources { border-bottom: 1px solid var(--rule); }
.mz-faq summary, .mz-sources summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 12px 0; font: 600 17px/28px var(--f-body); color: var(--ink); }
.mz-faq summary::-webkit-details-marker, .mz-sources summary::-webkit-details-marker { display: none; }
.mz-faq summary::after, .mz-sources summary::after { content: "+"; flex: none; color: var(--gold); font-size: 22px; line-height: 1; }
.mz-faq details[open] summary::after, .mz-sources[open] summary::after { content: "−"; }
.mz-faq details p, .mz-prose .mz-faq details p { margin: 0 0 16px; color: var(--ink-2); font-size: 16px; line-height: 28px; }
.mz-sources { border-top: 1px solid var(--rule); max-width: 680px; margin-top: 24px; }
.mz-sources ul { margin: 0 0 16px; padding-inline-start: 20px; }
.mz-sources li { font-size: 14px; line-height: 22px; padding: 4px 0; color: var(--ink-2); }

@media (min-width: 640px) {
	.mz-now, .mz-form, .mz-result { padding: 24px; }
	.mz-fields { grid-template-columns: 1fr 1.5fr 1.2fr 1.6fr; }
	.mz-fields .mz-field:last-child { grid-column: auto; }
	.mz-facts > div { grid-template-columns: 220px 1fr; gap: 16px; }
	.mz-medal { width: 96px; height: 96px; font-size: 40px; }
}
@media (min-width: 960px) {
	.mz { padding-bottom: 80px; }
	.mz-head h1 { font-size: 44px; line-height: 60px; }
	.mz h2 { font-size: 30px; line-height: 44px; }
	.mz-sec, .mz-top { margin-bottom: 80px; }
	.mz-top { grid-template-columns: minmax(0, 1fr) 440px; align-items: center; gap: 48px; }
	.mz-ring { max-width: 440px; }
	.mz-now__name { font-size: 56px; line-height: 72px; }
	.mz-prose p { font-size: 19px; line-height: 36px; }
	.mz-cols { grid-template-columns: minmax(0, 680px) 320px; justify-content: space-between; }
	.mz-side { position: sticky; top: 88px; }
	.mz-medal { width: 120px; height: 120px; font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) { .mz * { transition: none !important; } }
