/* RELATION detail (WordPress-first). Loaded after person-detail.css and reuses its tokens, section heads, map band and next links.
 * Subject: the time left between two people. Typography, rules, whitespace and asymmetry instead of repeated cards. */

/* ---- Hero: two names, one relation ---- */
.mta-relation__hero { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 3vw, 40px) var(--p-gutter) clamp(32px, 4vw, 56px); }
body.mta-person-surface .mta-person h1.mta-relation__names { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px clamp(18px, 2.4vw, 36px); margin: 4px 0 0; color: var(--p-blue); font: 500 clamp(36px, 4.6vw, 68px)/1.15 var(--p-serif); letter-spacing: .06em; }
.mta-relation__name { display: grid; gap: 6px; }
.mta-relation__name small { color: var(--p-muted); font: 400 13px/1.4 var(--p-en); letter-spacing: .14em; }
.mta-relation__x { align-self: center; margin-top: -.35em; color: var(--p-orange); font-family: var(--p-en); font-weight: 300; }
.mta-relation__summary { max-width: 46em; margin: 22px 0 0; padding-left: 16px; border-left: 2px solid var(--p-orange); color: #3a3f74; font-size: 15px; line-height: 2; }

.mta-relation__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 1.1fr) minmax(0, 1fr); align-items: start; gap: clamp(12px, 2vw, 32px); margin: clamp(32px, 4vw, 52px) 0 0; }
.mta-relation__person { display: grid; justify-items: center; gap: 14px; margin: 0; text-align: center; }
.mta-relation__face { position: relative; display: grid; place-items: center; width: clamp(150px, 15vw, 210px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--c, var(--p-blue)); box-shadow: 0 0 0 8px var(--p-cream), 0 0 0 9px rgba(20, 31, 180, .2); text-decoration: none; }
.mta-relation__face span { color: #fff5e6; font: 500 clamp(56px, 6vw, 84px)/1 var(--p-serif); }
.mta-relation__face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.mta-relation__person figcaption { display: grid; justify-items: center; gap: 4px; }
.mta-relation__person-name { color: var(--p-ink) !important; font: 600 19px/1.4 var(--font-jp, sans-serif); letter-spacing: .06em; }
.mta-relation__person-title { max-width: 18em; color: var(--p-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.mta-relation__person-genre { padding: 1px 10px; border: 1px solid var(--p-line); border-radius: 999px; color: var(--p-muted); font-size: 11px; }
.mta-relation__person-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; color: var(--p-blue) !important; font-size: 12px; font-weight: 600; }
/* the line between the two people is the real relation; one point per year it was recorded */
.mta-relation__bond { position: relative; height: clamp(150px, 15vw, 210px); }
.mta-relation__bond-line { position: absolute; left: -12%; right: -12%; top: 50%; height: 2px; background: linear-gradient(90deg, var(--p-blue), var(--p-orange)); }
.mta-relation__bond i { position: absolute; top: 50%; left: calc(6% + var(--p) * 88%); width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--p-cream); box-shadow: inset 0 0 0 2px var(--p-blue); }
.mta-relation__bond i:last-of-type { box-shadow: inset 0 0 0 2px var(--p-orange); background: var(--p-orange); }

.mta-relation__fact { display: grid; justify-items: center; gap: 10px; margin: clamp(28px, 3vw, 40px) auto 0; padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--p-line); text-align: center; }
.mta-relation__kind { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--p-ink); font-size: 14px; font-weight: 600; letter-spacing: .08em; }
.mta-relation__kind span { padding: 3px 14px; border-radius: 999px; background: var(--p-blue); color: #fff5e6; font: 600 12px/1.4 var(--p-en); letter-spacing: .12em; }
.mta-relation__span { display: flex; align-items: baseline; gap: 18px; margin: 4px 0 0; color: var(--p-blue); font: 500 clamp(40px, 5vw, 64px)/1.1 var(--p-en); letter-spacing: .02em; }
.mta-relation__span span { color: var(--p-orange); font-weight: 300; }
.mta-relation__line { margin: 0; color: #3a3f74; font: 500 16px/1.9 var(--p-serif); letter-spacing: .06em; }
.mta-relation__facts { justify-content: center; margin-top: 12px; }
.mta-relation__facts dd small { margin-left: 2px; font-size: 13px; }

/* ---- Timeline: years are the centre of a multi-year relation ---- */
.mta-relation__axis { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.mta-relation__axis::before { content: ""; position: absolute; left: 0; right: 0; top: 58px; height: 2px; background: linear-gradient(90deg, var(--p-orange), var(--p-blue)); opacity: .5; }
.mta-relation__axis li { position: relative; display: grid; justify-items: center; gap: 10px; }
.mta-relation__axis-year { color: var(--p-ink); font: 500 clamp(20px, 2vw, 28px)/1 var(--p-en); }
.mta-relation__axis-dot { width: calc(12px + var(--w) * 4px); aspect-ratio: 1; margin-top: calc(14px - var(--w) * 2px); border-radius: 50%; background: var(--p-blue); box-shadow: 0 0 0 6px var(--p-cream); }
.mta-relation__axis li.is-first .mta-relation__axis-dot { background: var(--p-orange); }
.mta-relation__axis-note { color: var(--p-muted); font-size: 12px; }

/* ---- A single crossing: one moment, generous whitespace ---- */
.mta-relation__once { display: grid; justify-items: center; gap: 14px; padding: clamp(28px, 5vw, 64px) 0 clamp(12px, 2vw, 24px); text-align: center; }
.mta-relation__once-date { margin: 0; color: var(--p-orange); font: 500 clamp(22px, 2.4vw, 30px)/1 var(--p-en); letter-spacing: .06em; }
.mta-relation__once-dot { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--p-orange); box-shadow: 0 0 0 8px var(--p-cream), 0 0 0 9px rgba(255, 100, 60, .35); }
.mta-relation__once-dot::before { content: ""; position: absolute; top: 50%; left: 50%; width: min(70vw, 720px); height: 1px; transform: translateX(-50%); background: linear-gradient(to right, var(--p-line) calc(50% - 22px), transparent 0 calc(50% + 22px), var(--p-line) 0); pointer-events: none; }
.mta-relation__once-title { max-width: 30em; color: var(--p-ink) !important; font: 500 clamp(18px, 1.8vw, 24px)/1.7 var(--p-serif); letter-spacing: .04em; }
.mta-relation__once-title:hover { color: var(--p-blue) !important; }
.mta-relation__once-with { margin: 0; color: var(--p-muted); font-size: 13px; }

/* ---- Events: date rule list ---- */
.mta-relation__events-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--p-line); }
.mta-relation__events-list li { display: grid; grid-template-columns: 8em minmax(0, 1fr) minmax(0, 16em); gap: 6px 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--p-line); }
.mta-relation__when { color: var(--p-blue); font: 500 16px/1.4 var(--p-en); letter-spacing: .04em; }
.mta-relation__what { color: var(--p-ink) !important; font-size: 15px; font-weight: 500; line-height: 1.7; }
.mta-relation__what:hover { color: var(--p-blue) !important; }
.mta-relation__others { color: var(--p-muted); font-size: 12px; line-height: 1.6; }

/* ---- Sources ---- */
.mta-relation__sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 36px 0 12px; color: var(--p-ink); font-size: 16px; font-weight: 600; letter-spacing: .06em; }
.mta-relation__sub span { color: var(--p-muted); font-size: 11px; font-weight: 400; letter-spacing: .1em; }
.mta-relation__sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.mta-relation__sources li { display: flex; gap: 14px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--p-line); font-size: 14px; }
.mta-relation__sources li span { color: var(--p-soft); font: 500 12px/1 var(--p-en); }
.mta-relation__sources a { color: var(--p-blue) !important; text-decoration: underline !important; text-underline-offset: .2em; overflow-wrap: anywhere; }

/* ---- Map band: the two people as two points with one line ---- */
.mta-relation__map-pair { display: flex; align-items: center; justify-content: center; gap: 0; }
.mta-relation__map-pair span { display: grid; place-items: center; width: 72px; aspect-ratio: 1; border-radius: 50%; background: var(--c, #9fc5f4); color: #fff; font: 500 28px/1 var(--p-serif); box-shadow: 0 0 26px rgba(159, 197, 244, .45); }
.mta-relation__map-pair i { width: clamp(80px, 12vw, 180px); height: 2px; background: linear-gradient(90deg, rgba(159, 197, 244, .8), var(--p-orange)); }

/* ---- Single crossing breathes more ---- */
.mta-relation.is-single .mta-relation__fact { padding-bottom: clamp(16px, 2vw, 32px); }

/* ---- Mobile 360-700: re-edited, not scaled ---- */
/* next links: equal-height cards in a row */
.mta-relation .mta-person__next-list a { box-sizing: border-box; height: 100%; align-content: start; }

@media (max-width: 700px) {
	.mta-relation__hero { padding: 14px 16px 28px; }
	body.mta-person-surface .mta-person h1.mta-relation__names { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: clamp(32px, 9.6vw, 42px); }
	.mta-relation__x { justify-self: start; margin: 0; font-size: .7em; line-height: 1.2; }
	.mta-relation__summary { margin-top: 18px; font-size: 14px; line-height: 1.95; }
	.mta-relation__pair { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 6px; margin-top: 26px; }
	.mta-relation__face { width: min(34vw, 140px); box-shadow: 0 0 0 5px var(--p-cream), 0 0 0 6px rgba(20, 31, 180, .2); }
	.mta-relation__face span { font-size: 48px; }
	.mta-relation__bond { height: min(34vw, 140px); }
	.mta-relation__bond-line { left: -40%; right: -40%; }
	.mta-relation__bond i { display: none; }
	.mta-relation__person-name { font-size: 16px; }
	.mta-relation__person-title { font-size: 11px; }
	.mta-relation__fact { margin-top: 24px; padding-top: 22px; }
	.mta-relation__span { font-size: clamp(34px, 11vw, 44px); gap: 12px; }
	.mta-relation__line { font-size: 15px; }
	.mta-relation__facts { justify-content: flex-start; }

	.mta-relation__axis { display: block; padding-left: 20px; border-left: 2px solid rgba(20, 31, 180, .3); }
	.mta-relation__axis::before { display: none; }
	.mta-relation__axis li { grid-template-columns: 4.2em minmax(0, 1fr); justify-items: start; align-items: center; padding: 10px 0; }
	.mta-relation__axis-year { font-size: 20px; }
	.mta-relation__axis-dot { position: absolute; left: calc(-27px - var(--w) * 1px); width: calc(10px + var(--w) * 2px); margin: 0; box-shadow: 0 0 0 3px var(--p-cream); }

	.mta-relation__once-dot::before { width: 86vw; }
	.mta-relation__events-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px 0; }
	.mta-relation__sources { grid-template-columns: minmax(0, 1fr); }
	.mta-relation__map-pair { order: -1; }
	.mta-relation__map-pair span { width: 56px; font-size: 22px; }
	.mta-relation__map-pair i { width: 30vw; }
	body.mta-person-surface .mta-relation .mta-person__map h2 { font-size: clamp(21px, 6.2vw, 26px); letter-spacing: .02em; }
	/* touch: the whole event row and the name line are tap targets (44px+) */
	.mta-relation__events-list li { position: relative; }
	.mta-relation__what::after { content: ""; position: absolute; inset: 0; }
	.mta-relation__person-name { display: inline-flex; align-items: center; min-height: 44px; }
}
