/* «رقم مسار الحياة» — /numerology/ and /numerology/{n}/ — "Astrolabe & Folio" (SPEC.md). Loaded only on these pages. */
.numr {
	color: var(--ink); font-family: var(--f-body);
	padding-bottom: 48px;
}
.numr .num-n, .num-expr, .num-medal, .num-tile__n, .num-mini__n, .numr select, .numr input { font-variant-numeric: tabular-nums; }
.numr a:where(:not(.btn)) { color: var(--gold-hi); text-underline-offset: 3px; }
.numr a:focus-visible, .numr summary:focus-visible, .numr button:focus-visible, .numr select:focus-visible, .numr input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.num-muted { color: var(--ink-3); font-size: 14px; }
.num-expr { font-weight: 600; color: var(--gold-hi); white-space: nowrap; }

/* header */
.num-head { padding: 16px 0 24px; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.num-eyebrow { margin: 0 0 8px; color: var(--rubric); font: 500 14px/22px var(--f-body); }
.num-head h1 { margin: 0 0 12px; font: 700 32px/44px var(--f-display); color: var(--ink); text-align: start; }
.num-lede { margin: 0; max-width: 37.2em; color: var(--ink-2); font-size: 18px; line-height: 34px; }
.num-lede b { color: var(--ink); font-weight: 600; }
.num-head--page { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }

/* medal: numeral inside a double ring with ticks (pure CSS) */
.num-medal { flex: none; display: inline-grid; place-items: center; width: 72px; height: 72px; 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 82%, transparent 83%), repeating-conic-gradient(from -.5deg, var(--rule-strong) 0 1deg, transparent 1deg 30deg), var(--night-2);
	color: var(--gold-hi); font: 700 32px/1 var(--f-display); margin: 6px; }
.num-medal--xl { width: 64px; height: 64px; font-size: 30px; }
@media (min-width: 640px) { .num-medal--xl { width: 96px; height: 96px; font-size: 44px; } }

/* calculator */
.num-calc { display: grid; gap: 24px; margin-bottom: 48px; }
.num-form { background: var(--night-2); border: 1px solid var(--rule); border-radius: 14px; padding: 20px 16px; }
.num-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.num-form legend { padding: 0; margin-bottom: 12px; font: 600 19px/30px var(--f-display); color: var(--ink); }
.num-fields { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; }
.num-field { display: grid; gap: 4px; min-width: 0; }
.num-field span { color: var(--ink-3); font-size: 13px; line-height: 20px; }
.num-field select, .num-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); }
.num-field input::placeholder { color: var(--ink-3); }
.num-field select:hover, .num-field input:hover { border-color: var(--gold); }
.num-submit { margin-top: 16px; }
.num-error { margin: 12px 0 0; color: var(--rubric); font-size: 14px; line-height: 22px; }
.num-error:empty { display: none; }

/* result card */
.num-card { position: relative; border: 1px solid var(--rule-strong); border-radius: 14px; padding: 20px 16px; background: var(--night-2); }
.num-card::before { content: ""; position: absolute; inset-block-start: -1px; inset-inline: 16px; height: 2px; background: var(--gold); }
.num-card:focus { outline: none; }
.num-card__k { margin: 0 0 12px; color: var(--rubric); font-size: 14px; line-height: 22px; font-weight: 500; }
.num-card__top { display: flex; gap: 12px; align-items: center; }
.num-card h2 { margin: 0; font: 700 24px/36px var(--f-display); color: var(--ink); }
.num-card h2 .num-n { color: var(--gold-hi); }
.num-card__g { margin: 2px 0 0; color: var(--ink-2); font-size: 16px; line-height: 28px; }
.num-steps { list-style: none; margin: 16px 0; padding: 0; border-top: 1px solid var(--rule); counter-reset: st; }
.num-steps li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); counter-increment: st; }
.num-steps__k { color: var(--ink-3); font-size: 14px; line-height: 24px; }
.num-steps__k::before { content: counter(st) " · "; color: var(--gold); }
.num-steps .num-expr { font-size: 18px; line-height: 24px; }
.num-card__note { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; line-height: 22px; }
.num-card__go { margin: 0; }
.num-card .share { margin-block: 16px 0; }

/* sections */
.num-sec { margin-bottom: 48px; }
.numr h2 { position: relative; margin: 0 0 12px; padding-top: 16px; font: 700 24px/36px var(--f-display); color: var(--ink); }
.num-sec > h2::before, .num-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; }
.num-prose p { max-width: 37.2em; font-size: 18px; line-height: 34px; margin: 0 0 16px; }
.num-prose h2 { margin-top: 32px; }

/* 12-number grid */
.num-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.num-tile { position: relative; display: grid; gap: 2px; height: 100%; padding: 12px; border: 1px solid var(--rule); border-radius: 14px; text-decoration: none; background: var(--night-2); transition: border-color .15s; }
.num-tile:hover, .num-tile:focus-visible { border-color: var(--rule-strong); }
.num-tile.is-mine { border-color: var(--gold); }
.num-tile__n { font: 700 32px/40px var(--f-display); color: var(--gold-hi); }
.num-tile__t { font-weight: 600; color: var(--ink); font-size: 16px; line-height: 26px; }
.num-tile__g { color: var(--ink-2); font-size: 14px; line-height: 22px; }
.num-tile__m { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; padding: 0 8px; border: 1px solid var(--rubric); border-radius: 999px; color: var(--rubric); font-size: 13px; line-height: 20px; }

/* worked example */
.num-example { margin: 8px 0 24px; padding: 16px; border: 1px solid var(--rule); border-radius: 14px; max-width: 37.2em; }
.num-example__row { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font: 600 22px/34px var(--f-body); font-variant-numeric: tabular-nums; color: var(--ink); }
.num-example__row span { padding: 0 10px; border-bottom: 1px solid var(--gold); }
.num-example__sum { margin-top: 8px; font-size: 17px; color: var(--gold-hi); }
.num-example__sum bdi + bdi::before { content: "→"; margin-inline-end: 16px; color: var(--ink-3); }
.num-example__sum b { color: var(--rubric); }
.num-example figcaption { margin-top: 8px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* lists + exercise */
.num-list { list-style: none; margin: 0 0 16px; padding: 0; max-width: 37.2em; }
.num-list li { position: relative; padding: 10px 0; padding-inline-start: 24px; border-bottom: 1px solid var(--rule); font-size: 17px; line-height: 30px; }
.num-list li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 22px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.num-list--grow li::before { background: none; border: 1px solid var(--gold); }
.num-list b { color: var(--gold-hi); font-weight: 600; }
.num-exercise { margin: 32px 0 16px; padding: 4px 16px 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--night-2); max-width: 680px; }
.num-exercise h2::before { display: none; }
.num-exercise ol { margin: 0; padding-inline-start: 22px; }
.num-exercise li { padding: 6px 0; font-size: 17px; line-height: 30px; }
.num-exercise li::marker { color: var(--gold); font-weight: 600; }

/* FAQ */
.num-faq { border-top: 1px solid var(--rule); max-width: 680px; }
.num-faq details { border-bottom: 1px solid var(--rule); }
.num-faq 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); }
.num-faq summary::-webkit-details-marker { display: none; }
.num-faq summary::after { content: "+"; flex: none; color: var(--gold); font-size: 22px; line-height: 1; }
.num-faq details[open] summary::after { content: "−"; }
.num-faq details p { margin: 0 0 16px; color: var(--ink-2); font-size: 16px; line-height: 28px; }

.num-prose > h2:first-child { margin-top: 0; }
.numr .num-honest { max-width: 680px; margin: 32px 0 0; padding: 12px 0; border-block: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; line-height: 22px; }

/* number page layout */
.num-cols { display: grid; gap: 48px; }
.num-side { align-self: start; }
.num-form--side legend { font-size: 17px; }
.num-form--side .num-fields { grid-template-columns: 1fr 1.4fr 1.2fr; }
.num-side__h { margin: 24px 0 4px; color: var(--rubric); font-size: 14px; font-weight: 500; }
.num-mini { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.num-mini a { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: 15px; }
.num-mini a:hover, .num-mini a.is-cur { color: var(--gold-hi); }
.num-mini__n { flex: none; width: 28px; text-align: center; font: 700 18px/1 var(--f-display); color: var(--gold); }
.num-pn { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--rule); margin-top: 24px; }
.num-pn__a { display: grid; gap: 2px; padding: 12px 0; min-height: 44px; text-decoration: none; }
.num-pn__a + .num-pn__a { border-inline-start: 1px solid var(--rule); padding-inline-start: 12px; text-align: end; }
.num-pn__a b { color: var(--ink); font: 700 18px/28px var(--f-display); }
.num-pn__a:hover b { color: var(--gold-hi); }

@media (min-width: 640px) {
	.num-form, .num-card { padding: 24px; }
	.num-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
	.numr { padding-bottom: 80px; }
	.num-head h1 { font-size: 44px; line-height: 60px; }
	.numr h2 { font-size: 30px; line-height: 44px; }
	.num-card h2 { font-size: 30px; line-height: 44px; }
	.num-sec { margin-bottom: 80px; }
	.num-calc { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); align-items: start; gap: 32px; margin-bottom: 80px; }
	.num-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
	.num-prose p { font-size: 19px; line-height: 36px; }
	.num-head--page { gap: 24px; }
	.num-medal--xl { width: 120px; height: 120px; font-size: 56px; }
	.num-cols { grid-template-columns: minmax(0, 680px) 320px; justify-content: space-between; }
	.num-side { position: sticky; top: 88px; }
}
@media (prefers-reduced-motion: reduce) { .numr * { transition: none !important; } }
