/* Zodiac compatibility (zodiac-compatibility-calculator.js). Two slots, a 12-sign grid, a result hero, details,
   best matches and the 144-pair chart. Tokens only, so dark mode works. */
.tool .zc-slots { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); align-items: start; gap: 6px; }
.tool .zc-amp { display: grid; place-items: center; height: 76px; color: rgb(var(--ink) / .35); }
.tool .zc-amp .tool-icon { width: 18px; height: 18px; }
.tool .zc-slot { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool .zc-slot-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 76px; padding: 10px 12px; border-radius: 22px; text-align: left;
  background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 2px transparent; transition: box-shadow .2s ease, transform .16s var(--ease-out);
  touch-action: manipulation;
}
.tool .zc-slot-btn:active { transform: scale(.98); }
.tool .zc-slot.is-active .zc-slot-btn { box-shadow: var(--shadow), inset 0 0 0 2px rgb(var(--accent)); }
.tool .zc-slot.is-empty .zc-slot-btn { box-shadow: var(--shadow), inset 0 0 0 1.5px rgb(var(--ink) / .14); }
.tool .zc-slot.is-empty.is-active .zc-slot-btn { box-shadow: var(--shadow), inset 0 0 0 2px rgb(var(--accent)); }
.tool .zc-slot-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: rgb(var(--ink)); }
.tool .zc-slot.is-empty .zc-slot-icon { background: transparent; box-shadow: inset 0 0 0 1.5px rgb(var(--ink) / .14); color: rgb(var(--ink) / .4); }
.tool .zc-slot-icon .tool-icon { width: 18px; height: 18px; }
.tool .zc-slot-icon .fun-glyph { width: 26px; height: 26px; }
.tool .zc-slot-text { display: flex; flex-direction: column; min-width: 0; }
.tool .zc-slot-who { font-size: 12px; line-height: 16px; font-weight: 850; color: rgb(var(--ink) / .55); }
.tool .zc-slot-name { font-size: 18px; line-height: 24px; font-weight: 950; letter-spacing: -.01em; color: rgb(var(--ink)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .zc-slot.is-empty .zc-slot-name { color: rgb(var(--ink) / .4); }
.tool .zc-slot-sub { font-size: 12px; line-height: 16px; font-weight: 650; color: rgb(var(--ink) / .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool .zc-date-btn { align-self: center; min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 14px; font-weight: 800; color: var(--link); background: transparent; }
@media (hover: hover) and (pointer: fine) { .tool .zc-date-btn:hover { background: rgb(var(--accent) / .1); } }
.tool .zc-date input { min-height: 44px; font-size: 16px; padding: 8px; text-align: center; }
.tool .zc-grid-hint { font-size: 15px; line-height: 20px; font-weight: 800; color: rgb(var(--ink) / .65); margin-bottom: -6px; }

.tool .zc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tool .zc-sign {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; min-height: 76px; padding: 10px; border-radius: 18px; text-align: left;
  background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .06); transition: box-shadow .2s ease, background-color .2s ease, transform .16s var(--ease-out);
  touch-action: manipulation; user-select: none;
}
.tool .zc-sign:active { transform: scale(.96); }
.tool .zc-sign[aria-pressed="true"] { background: rgb(var(--accent) / .14); box-shadow: inset 0 0 0 2px rgb(var(--accent)); }
@media (hover: hover) and (pointer: fine) { .tool .zc-sign:hover { box-shadow: inset 0 0 0 2px rgb(var(--accent) / .35); } }
.tool .zc-sign .fun-glyph { margin-bottom: 2px; }
.tool .zc-sign-name { font-size: 15px; line-height: 20px; font-weight: 850; color: rgb(var(--ink)); max-width: 100%; overflow-wrap: anywhere; }
.tool .zc-sign-dates { font-size: 11px; line-height: 15px; font-weight: 650; color: rgb(var(--ink) / .5); white-space: nowrap; letter-spacing: -.01em; }

/* Result: hero (score, pair, actions) then details */
.tool .zc-result { display: grid; gap: 16px; scroll-margin-top: 96px; }
.tool .zc-result.is-new { animation: card-in .45s var(--ease-out) both; }
.tool .zc-hero, .tool .zc-details { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.tool .zc-score { display: flex; align-items: center; gap: 16px; }
.tool .zc-score-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tool .zc-hero-pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; font-weight: 850; color: rgb(var(--ink) / .6); }
.tool .zc-hero-plus { color: rgb(var(--ink) / .35); margin: 0 2px; }
.tool .zc-title { font-size: 26px; line-height: 30px; font-weight: 950; letter-spacing: -.02em; color: rgb(var(--ink)); outline: 0; text-wrap: balance; }
.tool .zc-line { font-size: 15px; line-height: 21px; font-weight: 650; color: rgb(var(--ink) / .75); }
.tool .zc-aspect { font-size: 15px; line-height: 22px; font-weight: 600; color: rgb(var(--ink) / .65); padding-top: 12px; border-top: 1px solid rgb(var(--ink) / .08); }
.tool .zc-result .tool-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool .zc-result .tool-actions .btn-primary { grid-column: 1 / -1; }
.tool .zc-result .tool-actions .btn { width: 100%; padding-left: 12px; padding-right: 12px; white-space: nowrap; height: 52px; }
.tool .zc-jump { display: flex; gap: 20px; justify-content: center; }
.tool .zc-jump a { font-size: 15px; font-weight: 800; min-height: 32px; display: inline-flex; align-items: center; }

.tool .zc-read { display: grid; gap: 14px; }
.tool .zc-sec { display: grid; gap: 4px; }
.tool .zc-sec-head { font-size: 13px; line-height: 18px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
.tool .zc-sec-text { font-size: 16px; line-height: 24px; font-weight: 600; color: rgb(var(--ink) / .8); }
.tool .zc-try { padding: 16px; border-radius: 20px; background: rgb(var(--accent) / .08); display: grid; gap: 10px; }
.tool .zc-try-list { display: grid; gap: 12px; }
.tool .zc-try-list li { display: grid; gap: 2px; }
.tool .zc-try-list li.zc-q { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.tool .zc-try-list li > div { display: grid; gap: 2px; }
.tool .zc-try-list b { font-size: 13px; line-height: 18px; font-weight: 900; color: rgb(var(--ink) / .55); }
.tool .zc-try-list span { font-size: 17px; line-height: 24px; font-weight: 750; color: rgb(var(--ink)); }
.tool .zc-planets { display: grid; gap: 12px; }
.tool .zc-planet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool .zc-planet-card { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 18px; background: var(--surface-2); }
.tool .zc-planet-who { font-size: 13px; font-weight: 900; color: rgb(var(--ink) / .55); }
.tool .zc-planet-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: rgb(var(--ink) / .75); }
.tool .zc-planet-row b { color: rgb(var(--ink)); font-weight: 850; }
.tool .zc-planet-row .fun-glyph { margin-top: 1px; }
.tool .zc-plan-btn { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 22px; background: rgb(var(--accent) / .12); color: var(--link); font-size: 15px; font-weight: 850; }
.tool .zc-plan-btn .tool-icon { width: 16px; height: 16px; }
.tool .zc-how summary, .tool .zc-chart-box summary {
  display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 16px; cursor: pointer; list-style: none;
  background: var(--surface-2); font-size: 15px; font-weight: 850; color: var(--link);
}
.tool .zc-how summary::-webkit-details-marker, .tool .zc-chart-box summary::-webkit-details-marker { display: none; }
.tool .zc-how p { margin-top: 10px; font-size: 15px; line-height: 22px; color: rgb(var(--ink) / .7); }

.tool .zc-best-box { display: grid; gap: 10px; scroll-margin-top: 96px; }
.tool .zc-best { display: grid; gap: 6px; }
.tool .zc-best-row {
  display: grid; grid-template-columns: 20px 18px 96px minmax(0, 1fr) 44px; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 16px; text-align: left;
  background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .05); transition: transform .16s var(--ease-out);
}
.tool .zc-best-row:active { transform: scale(.98); }
.tool .zc-best-row.is-on { box-shadow: inset 0 0 0 2px rgb(var(--accent)); }
.tool .zc-best-rank { font-size: 14px; font-weight: 850; color: rgb(var(--ink) / .4); font-variant-numeric: tabular-nums; }
.tool .zc-best-name { font-size: 16px; font-weight: 800; color: rgb(var(--ink)); }
.tool .zc-best-bar { height: 8px; border-radius: 4px; background: rgb(var(--ink) / .08); overflow: hidden; }
.tool .zc-best-bar span { display: block; height: 100%; border-radius: 4px; background: var(--ramp); }
.tool .zc-best-s { font-size: 15px; font-weight: 900; text-align: right; color: rgb(var(--ink) / .75); font-variant-numeric: tabular-nums; }

.tool .zc-chart-box { scroll-margin-top: 96px; }
.tool .zc-chart-box summary { background: var(--surface); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .06); }
.tool .zc-chart-box[open] summary { margin-bottom: 12px; }
.tool .zc-chart-scroll { overflow-x: auto; margin: 0 -4px; padding: 4px; overscroll-behavior-x: contain; }
.tool .zc-chart { display: grid; gap: 3px; min-width: 520px; }
.tool .zc-row { display: grid; grid-template-columns: 36px repeat(12, minmax(0, 1fr)); gap: 3px; }
.tool .zc-ch, .tool .zc-rh { font-size: 11px; line-height: 14px; font-weight: 850; color: rgb(var(--ink) / .6); display: grid; place-items: center; min-height: 24px; }
.tool .zc-rh { justify-items: start; }
.tool .zc-cell { min-height: 34px; padding: 0; border-radius: 6px; font-size: 11px; font-weight: 850; font-variant-numeric: tabular-nums; color: rgb(var(--ink) / .8); }
.tool .zc-l1 { background: rgb(var(--accent) / .08); } .tool .zc-l2 { background: rgb(var(--accent) / .2); }
.tool .zc-l3 { background: rgb(var(--accent) / .4); } .tool .zc-l4 { background: rgb(var(--accent) / .7); color: #fff; }
.tool .zc-cell.is-on { box-shadow: 0 0 0 2px rgb(var(--ink)); }
@media (hover: hover) and (pointer: fine) { .tool .zc-cell:hover { box-shadow: 0 0 0 2px rgb(var(--accent)); } }

@media (min-width: 600px) {
  .tool .zc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tool .zc-slots { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); }
  .tool .zc-sign { padding: 12px; }
  .tool .zc-sign-name { font-size: 16px; }
  .tool .zc-sign-dates { font-size: 12px; }
}
/* Desktop: hero stays in view on the left while the details scroll on the right. */
@media (min-width: 900px) {
  .tool .zc-result { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .tool .zc-hero { position: sticky; top: 100px; }
}
@media (max-width: 599px) {
  .tool .zc-hero, .tool .zc-details { padding: 16px; }
  .tool .zc-score { gap: 14px; }
  .tool .fun-ring { width: 120px; height: 120px; }
  .tool .fun-ring-mid { padding-top: 36px; }
  .tool .fun-ring-num { font-size: 40px; line-height: 44px; }
  .tool .zc-title { font-size: 22px; line-height: 27px; }
  .tool .zc-best-row { grid-template-columns: 18px 18px 88px minmax(0, 1fr) 40px; gap: 8px; padding: 0 12px; }
  .tool .zc-planet-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tool .zc-result.is-new { animation: none; } }
@media (max-width: 599px) {
  .tool .zc-sign-name { font-size: 14px; letter-spacing: -.01em; overflow-wrap: normal; }
  .tool .zc-slot-icon { width: 32px; height: 32px; }
  .tool .zc-slot-icon .fun-glyph { width: 22px; height: 22px; }
  .tool .zc-slot-btn { gap: 8px; padding: 10px; }
  .tool .zc-slot-name { font-size: 16px; line-height: 22px; }
}
/* Round 3: gradient hero (engine) on the left with actions and best matches; compact sign grid; swap button. */
.tool .zc-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tool .zc-details { gap: 18px; }
.tool .zc-aspect { padding-top: 0; border-top: 0; font-size: 16px; line-height: 24px; color: rgb(var(--ink) / .75); }
.tool .zc-swap { align-self: start; margin-top: 16px; width: 36px; height: 44px; border-radius: 18px; }
.tool .zc-swap .tool-icon { width: 18px; height: 18px; }
.tool .zc-slots { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); }
.tool .zc-sign { display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; align-items: center; min-height: 58px; padding: 8px 10px; }
.tool .zc-sign .fun-glyph { grid-row: 1 / span 2; margin: 0; }
.tool .zc-sign-dates { grid-column: 2; }
.tool .zc-best-box { padding: 4px 0 0; }
@media (min-width: 900px) {
  .tool .zc-result { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .tool .zc-left { position: static; }
  .tool .zc-hero { position: static; }
}
@media (max-width: 599px) {
  .tool .zc-sign { grid-template-columns: 18px minmax(0, 1fr); column-gap: 6px; padding: 8px; min-height: 54px; }
  .tool .zc-sign .fun-glyph { width: 18px; height: 18px; }
  .tool .zc-slots { grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 4px; }
  .tool .zc-swap { width: 32px; }
}
.tool .zc-sign { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "g n" "d d"; justify-items: start; }
.tool .zc-sign .fun-glyph { grid-area: g; grid-row: auto; }
.tool .zc-sign-name { grid-area: n; }
.tool .zc-sign-dates { grid-area: d; grid-column: auto; }
@media (max-width: 599px) { .tool .zc-sign-dates { font-size: 10.5px; letter-spacing: -.015em; } }
.tool .fun-hero-foot { font-size: 11px; overflow-wrap: anywhere; }
.tool .zc-sign { grid-template-columns: 22px minmax(0, 1fr); }
@media (max-width: 599px) { .tool .zc-sign { grid-template-columns: 18px minmax(0, 1fr); } }
@media (max-width: 599px) { .tool .zc-sign-name { font-size: 13.5px; } .tool .zc-sign { column-gap: 5px; } }
/* Round 4: phone order hero, details, best matches; desktop hero and best on the left, details on the right. */
.tool .zc-result { scroll-margin-top: 104px; }
.tool .zc-best-box, .tool .zc-chart-box { scroll-margin-top: 104px; }
.tool .zc-slot-sub { white-space: normal; }
.tool .zc-slot-sub:empty { display: none; }
@media (min-width: 900px) {
  .tool .zc-result { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "l d" "b d"; }
  .tool .zc-left { grid-area: l; }
  .tool .zc-details { grid-area: d; }
  .tool .zc-best-box { grid-area: b; align-self: start; }
}
.tool .zc-slot.is-empty .zc-slot-name { font-size: 15px; }
.tool .zc-grid[hidden] { display: none; }
.tool .tool-setup > .tool-chips { justify-content: center; }
