/* Important layer outranks old page-specific important rules without ID overrides. */
@layer nasabu-heading-hierarchy {
 :root{--reading-body-size:18px;--heading-major:clamp(30px,4vw,40px);--heading-middle:clamp(26px,3vw,32px);--heading-minor:22px;--heading-gold:#FFD76A;--heading-weight:800}
 html body main :is(h1,h2,h3,h4,h5):not(:where(.approved-chart *, .chart-zoom-dialog *, button *, [role="button"] *)){
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;height:auto!important;white-space:normal!important;word-break:keep-all!important;overflow-wrap:break-word!important;line-height:1.45!important;font-weight:var(--heading-weight)!important;letter-spacing:normal!important;
 }
 html body main h1:not(:where(.approved-chart *)){font-size:var(--heading-major)!important;margin-block:0 16px!important}
 html body main h2:not(:where(.approved-chart *)){font-size:var(--heading-middle)!important;margin-block:18px 12px!important}
 html body main :is(h3,h4,h5):not(:where(.approved-chart *, .chart-zoom-dialog *, button *, [role="button"] *)){
  font-size:var(--heading-minor)!important;color:var(--heading-gold)!important;-webkit-text-fill-color:var(--heading-gold)!important;margin-block:20px 10px!important;padding:0 0 0 10px!important;border-left:3px solid var(--heading-gold)!important;
 }
 html body main .organ-illness-title{font-size:var(--heading-middle)!important;margin-block:12px!important}
 /* The same gold remains readable on the information pages' ivory background. */
 html body:not(.premium-dark) main :is(h3,h4,h5):not(:where(.approved-chart *, .chart-zoom-dialog *, button *, [role="button"] *)){
  background:#173240!important;border-radius:0 6px 6px 0!important;padding:8px 10px!important;
 }
 @media(max-width:760px){html body main :is(h3,h4,h5):not(:where(.approved-chart *, .chart-zoom-dialog *, button *, [role="button"] *)){margin-block:18px 8px!important}}
}

/* Shared footer layout, including pages that do not load site-info.css. */
body footer.site-footer.wrap {
 width:min(1180px,calc(100% - 32px))!important;
 max-width:calc(100% - 32px)!important;
 min-width:0!important;
 margin-inline:auto!important;
 padding:20px 0!important;
 box-sizing:border-box;
 display:grid!important;
 grid-template-columns:minmax(0,2fr) minmax(0,1fr)!important;
 gap:16px 28px!important;
 color:inherit;
 text-align:left;
}
body footer.site-footer.wrap * {box-sizing:border-box;min-width:0;max-width:100%;}
body footer.site-footer.wrap :is(p,li,dt,dd,a,summary) {overflow-wrap:anywhere;word-break:keep-all;}
body footer.site-footer.wrap p {margin:0 0 8px;line-height:1.65;}
body footer.site-footer.wrap .brand {display:inline-flex;white-space:normal;color:inherit;}
body footer.site-footer.wrap a {color:inherit;text-underline-offset:3px;}
body footer.site-footer.wrap .footer-operations {margin:0;padding:0;}
body footer.site-footer.wrap .footer-operations > div {
 display:grid;grid-template-columns:4.5em minmax(0,1fr);gap:10px;margin-bottom:8px;
}
body footer.site-footer.wrap .footer-operations dt {font-weight:700;}
body footer.site-footer.wrap .footer-operations dd {margin:0!important;}
body footer.site-footer.wrap .footer-menu {
 grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:flex-start;
 gap:4px 18px;width:100%;margin:0;padding:8px 0;
 border-block:1px solid #9b895a66;
}
body footer.site-footer.wrap .footer-menu a {display:inline-flex;align-items:center;min-height:44px;}
body footer.site-footer.wrap :is(.footer-content-notice,.copyright) {grid-column:1/-1;}
body footer.site-footer.wrap .footer-content-notice h2 {font-size:17px;margin:0 0 8px;line-height:1.5;}
body footer.site-footer.wrap ul {padding-inline-start:20px;margin:0;}
body footer.site-footer.wrap .copyright {margin:0;}
@media(max-width:760px) {
 body footer.site-footer.wrap {grid-template-columns:minmax(0,1fr)!important;gap:12px!important;padding-block:16px!important;}
 body footer.site-footer.wrap .footer-menu {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;}
 body footer.site-footer.wrap .footer-menu a {width:100%;}
}

body.compatibility-site {margin:0; background:#10242f; color:#f4eddf; font-family:system-ui,sans-serif;}
body.compatibility-site #compatibility-main {width:min(1120px,100%); min-width:0; box-sizing:border-box; margin:auto; padding:20px 16px 24px;}
body.compatibility-site #compatibility-main * {box-sizing:border-box;}
body.compatibility-site .compat-hero {text-align:center; padding:16px 12px 20px;}
body.compatibility-site .compat-hero h1 {color:#efcf80!important; font-size:clamp(26px,5vw,44px)!important; line-height:1.35; margin:12px 0; border:0; word-break:keep-all; overflow-wrap:anywhere;}
body.compatibility-site #compatibility-main h2 {font-size:clamp(21px,3.5vw,28px)!important; line-height:1.45; color:#efcf80; margin:0 0 16px; word-break:keep-all;}
body.compatibility-site #compatibility-main p {font-size:16px!important; line-height:1.7; word-break:keep-all; overflow-wrap:anywhere; margin:10px 0;}
body.compatibility-site #compatibility-main .compat-small {font-size:14px!important; color:#f4eddf;}
body.compatibility-site .compat-eyebrow {color:#dcc894;}
body.compatibility-site .compat-selector,body.compatibility-site .compat-result,body.compatibility-site .compat-section {padding:24px; margin:0 0 16px; min-width:0; border:1px solid #8c7750; border-radius:14px; background:#183642;}
body.compatibility-site #compat-form {display:grid; gap:16px;}
body.compatibility-site #compat-form label {display:flex;flex-direction:column;gap:8px; font-size:16px; min-width:0;}
body.compatibility-site #compat-form select {width:100%; min-width:0; min-height:48px; font-size:16px!important; padding:10px; background:#f7f2e8; color:#172c39; border:1px solid #c8b989; border-radius:8px;}
body.compatibility-site .compat-two-selects {display:grid; grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr); gap:10px; align-items:end;}
body.compatibility-site .compat-selection-arrow {font-size:24px;text-align:center; padding-bottom:12px; color:#efcf80;}
body.compatibility-site #compatibility-main button,body.compatibility-site #compatibility-main a {min-height:48px; font-size:16px!important; line-height:1.5; touch-action:manipulation;}
body.compatibility-site #compatibility-main button,body.compatibility-site .compat-links a,body.compatibility-site .compat-return a {display:inline-flex; align-items:center;justify-content:center; padding:10px 16px; border:1px solid #ac935e; border-radius:8px; background:#efcf80; color:#172c39!important; -webkit-text-fill-color:currentColor!important; font-weight:700; text-decoration:none; cursor:pointer;}
body.compatibility-site .compat-primary {width:100%;}
body.compatibility-site .compat-section-nav {display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px;}
body.compatibility-site .compat-section-nav a {display:flex;align-items:center;padding:8px 12px;color:#efcf80; border:1px solid #8c7750;border-radius:8px;text-decoration:none;}
body.compatibility-site .compat-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:14px;}
body.compatibility-site .compat-card {display:flex;flex-direction:column;gap:12px; padding:16px; min-width:0; border:1px solid #8c7750;border-radius:10px;background:#122c38;}
body.compatibility-site .compat-pair {display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);gap:8px;align-items:center;text-align:center;}
body.compatibility-site .compat-pair strong {display:block;font-size:20px!important;line-height:1.5;word-break:keep-all;}
body.compatibility-site .compat-pair>span {font-size:26px;color:#efcf80;}
body.compatibility-site .compat-face {height:110px;width:100%;max-width:110px;margin:0 auto 8px;}
body.compatibility-site .face-portrait-view {display:block;width:100%;height:100%;}
body.compatibility-site .compat-badge {color:#efcf80;font-size:19px;font-weight:700;text-align:center;}
body.compatibility-site .compat-group {margin:16px 0;border-top:1px solid #8c7750;}
body.compatibility-site .compat-group>summary {padding:16px 0;min-height:48px;font-size:18px;font-weight:700;cursor:pointer;color:#efcf80;}
body.compatibility-site .compat-group .compat-grid {padding-bottom:12px;}
body.compatibility-site .compat-links,body.compatibility-site .compat-return {display:flex;flex-wrap:wrap;gap:10px;margin-top:18px;}
@media(max-width:760px){
 body.compatibility-site #compatibility-main {padding:16px 12px 20px;}
 body.compatibility-site .compat-hero {padding:10px 8px 16px;}
 body.compatibility-site .compat-return {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:8px;}
 body.compatibility-site .compat-return a {width:100%;max-width:100%;min-width:0;min-height:48px;text-align:center;white-space:normal;}
}
body.compatibility-site #compatibility-main :focus-visible {outline:3px solid #efcf80;outline-offset:3px;}
body.compatibility-site #compatibility-main [hidden] {display:none!important;}
@media(min-width:768px){body.compatibility-site .compat-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(min-width:1100px){body.compatibility-site .compat-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:480px){body.compatibility-site .compat-selector,body.compatibility-site .compat-section,body.compatibility-site .compat-result{padding:16px;}body.compatibility-site .compat-card{padding:12px;}body.compatibility-site .compat-pair strong{font-size:18px!important;}}
body.compatibility-site .compat-grid{align-items:start;}
body.compatibility-site .compat-why{min-width:0;border:1px solid #9f895b;border-radius:8px;margin:8px 0;color:#f4eddf;}
body.compatibility-site .compat-why>summary{padding:12px;min-height:48px;font-size:17px!important;line-height:1.5;font-weight:700;color:#efcf80;cursor:pointer;touch-action:manipulation;word-break:keep-all;}
body.compatibility-site .compat-why-body{padding:0 14px 14px;min-width:0;}
body.compatibility-site #compatibility-main .compat-why-body p{font-size:16px!important;line-height:1.8;}
body.compatibility-site .compat-why-body h4{font-size:17px!important;line-height:1.6;color:#efcf80;margin:18px 0 8px;}
body.compatibility-site .compat-why-body blockquote{margin:14px 0 0;padding:0 0 0 12px;border-left:3px solid #efcf80;}
body.compatibility-site .compat-choice-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
body.compatibility-site #compatibility-main .compat-choice-grid button {display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-width:0;min-height:64px;gap:4px;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;}
body.compatibility-site .compat-choice-grid button small {font-size:14px;line-height:1.5;font-weight:400;}
body.compatibility-site #compatibility-main .compat-choice-grid button[aria-pressed="true"] {background:#fff0be;border-color:#fff;outline:2px solid #fff;outline-offset:1px;}
body.compatibility-site #compat-match-form {display:grid;gap:12px;}
body.compatibility-site #compat-match-form label {display:flex;flex-direction:column;gap:8px;min-width:0;}
body.compatibility-site #compat-match-form select {width:100%;min-width:0;min-height:48px;padding:10px;font-size:16px;background:#f7f2e8;color:#172c39;border:1px solid #c8b989;border-radius:8px;}
body.compatibility-site .compat-type-return {width:100%;margin-bottom:10px;}
@media(min-width:768px){body.compatibility-site .compat-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
/* Only source-reviewed best matches receive the celebration treatment. */
body.compatibility-site .compat-best-card {
 position:relative; isolation:isolate; border:2px solid #f6d879;
 background:linear-gradient(145deg,#29464a,#142d39 70%);
 box-shadow:inset 0 0 0 1px #f5d88a33,0 4px 18px #d9b65a18;
}
body.compatibility-site .compat-award {
 display:flex;align-items:center;justify-content:center;gap:7px;align-self:center;
 margin:0 auto 8px;padding:8px 18px;width:fit-content;max-width:100%;border-radius:24px;
 background:linear-gradient(120deg,#f9e7ae,#e4bb5b,#fff0bb);
 color:#102b3a;font-size:18px;font-weight:800;line-height:1.4;
 box-shadow:0 2px 8px #0002;text-align:center;
}
body.compatibility-site #compatibility-main .compat-best-title {
 position:relative;margin:4px 0 8px;color:#ffe6a0;font-size:clamp(18px,2vw,24px)!important;
 font-weight:800;line-height:1.5;text-align:center;word-break:keep-all;overflow-wrap:anywhere;
}
body.compatibility-site .compat-best-title>span {display:block;}
body.compatibility-site .compat-best-title::after {content:'✦';display:inline-block;color:#ffeaaa;margin-left:6px;font-size:14px;}
body.compatibility-site .compat-pair-center {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;line-height:1;}
body.compatibility-site .compat-golden-heart {color:#f5d479;font-size:24px;line-height:1;text-shadow:0 0 8px #d9bb6555;}
body.compatibility-site .compat-confetti {position:absolute;inset:0 0 auto;height:100px;overflow:hidden;pointer-events:none;z-index:1;}
body.compatibility-site .compat-confetti i {position:absolute;top:12px;left:var(--x);width:5px;height:10px;background:#f7d276;border-radius:1px;opacity:0;}
body.compatibility-site .compat-confetti i:nth-child(3n) {background:#fff0c3;}
body.compatibility-site .is-celebrating .compat-confetti i {animation:compat-gold-burst 880ms ease-out var(--delay) 1 both;}
body.compatibility-site .is-celebrating .compat-best-title::after {animation:compat-gold-spark 900ms ease-out 1 both;}
@keyframes compat-gold-burst {0%{opacity:0;transform:translateY(0) rotate(0)}15%{opacity:1}100%{opacity:0;transform:translateY(75px) rotate(var(--turn))}}
@keyframes compat-gold-spark {0%,100%{opacity:.7;transform:scale(1)}45%{opacity:1;transform:scale(1.35)}}
@media(max-width:480px){body.compatibility-site .compat-award{font-size:16px;padding:7px 14px;}body.compatibility-site .compat-best-card .compat-face{height:100px;max-width:100px;}}
@media(prefers-reduced-motion:reduce){body.compatibility-site .compat-confetti{display:none;}body.compatibility-site .is-celebrating .compat-confetti i,body.compatibility-site .is-celebrating .compat-best-title::after{animation:none!important;}}
/* The first entry gets a distinct gold finish; other menu cards stay unchanged. */
body.compatibility-site .compat-case-buttons {
 display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;
}
body.compatibility-site .compat-case-buttons button {
 flex:1 1 80px;min-height:48px;white-space:nowrap;text-align:center;
}
body.compatibility-site .compat-case-buttons button[aria-pressed="true"] {
 background:#edca72!important;color:#102b3a!important;border-color:#ffe7a0!important;
}
body.compatibility-site .compat-case-picker [hidden] {display:none!important;}
body.compatibility-site .compat-case-picker {min-width:0;max-width:100%;}
body.compatibility-site .compat-case-picker p {word-break:keep-all;overflow-wrap:anywhere;}
body.compatibility-site .compat-saju-guide {
 margin-top:20px;padding:16px;border:1px solid #bda36c;border-radius:10px;
 background:#142d39;min-width:0;max-width:100%;
}
body.compatibility-site .compat-saju-guide h3 {font-size:20px;line-height:1.5;margin:0 0 8px;color:#efcf80;}
body.compatibility-site .compat-saju-guide a {
 display:inline-flex;align-items:center;justify-content:center;min-height:48px;
 padding:10px 16px;border-radius:8px;background:#efcf80;color:#172c39!important;text-decoration:none;
}
body.compatibility-site .compat-score-note {margin-top:16px!important;}
@media(max-width:760px){body.compatibility-site .compat-saju-guide a{width:100%;max-width:100%;}}
body.compatibility-site #compatibility-main #compat-choose button.compat-best-entry {
 background:linear-gradient(125deg,#fff0bc 0%,#edca72 45%,#f9e6a8 100%);
 border:2px solid #ffe7a0;
 box-shadow:inset 0 0 0 1px #fff5ce88,0 3px 12px #dfbb5d22;
 color:#102b3a!important;
 min-width:0;max-width:100%;box-sizing:border-box;
}
body.compatibility-site .compat-best-entry-title {
 display:flex;flex-wrap:wrap;gap:2px 6px;align-items:center;
 width:100%;min-width:0;max-width:100%;font-size:18px;font-weight:800;line-height:1.5;
}
body.compatibility-site .compat-best-entry-title>span {
 display:inline-block;max-width:100%;min-width:0;
 word-break:keep-all;overflow-wrap:anywhere;white-space:normal;
}
body.compatibility-site #compatibility-main #compat-choose button.compat-best-entry[aria-pressed="true"] {
 border-color:#fff4cb;outline:2px solid #fff1ba;outline-offset:2px;
}
@media(max-width:480px){body.compatibility-site .compat-best-entry-title{font-size:17px;line-height:1.5;}}
/* Keep the direction arrow attached to the target name, even when titles wrap. */
body.compatibility-site .compat-pair-title {display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px;max-width:100%;vertical-align:middle;}
body.compatibility-site .compat-pair-title-target {display:inline-flex;align-items:center;gap:6px;max-width:100%;min-width:0;}
body.compatibility-site .compat-pair-title-target>span:first-child {flex:none;}
body.compatibility-site .compat-pair-title-target>span:last-child {min-width:0;word-break:keep-all;overflow-wrap:anywhere;}
