/* Year transits (js/transits/year-transits.js): day-by-day favourability bars for a year, below the transit workbench on
   the Transits tab (and later the guest landing pages). Reuses the workbench's stepper buttons (.tdesk-arrow, .tdesk-now)
   and section intro from css/transit-desk.css, so pages load both. Layout follows its own width (container queries). */

.year-transits { container: ytr / inline-size; display: grid; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--gold-line); }
.year-transits .transits-heading { margin-bottom: 0; }
.ytr-status { margin: 0; }

/* Grades 1 best .. 7 worst: astro-qrn's hues (greens, a light green middle, pinks to reds) in lighter, softer shades.
   Each step stays distinct: Steady a pale green, Mixed a pale pink. */
.ytr-g1 { background: #1f6e37; } /* Excellent: deeper than the other greens so it stands out */
.ytr-g2 { background: #7fc78f; }
.ytr-g3 { background: #ade0b6; }
.ytr-g4 { background: #dcf3df; }
.ytr-g5 { background: #fbe1e4; }
.ytr-g6 { background: #f4aba6; }
.ytr-g7 { background: #a33c36; } /* Very challenging: deeper than Challenging so it stands out */
/* House labels on the two deep shades stay readable. */
.ytr-seg.ytr-g1 .ytr-seg-text, .ytr-seg.ytr-g7 .ytr-seg-text { color: rgb(255 255 255 / 92%); }

.ytr-card { display: grid; gap: 14px; padding: 16px 18px; border-radius: 15px; }
.ytr-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ytr-stepper { display: flex; align-items: center; gap: 8px; }
.ytr-year { min-width: 64px; color: var(--ink); font-size: 20px; font-weight: 850; letter-spacing: -.04em; text-align: center; font-variant-numeric: tabular-nums; }
.ytr-summary { margin: 0; color: #77736b; font-size: 11px; }
.ytr-summary-good { color: #3d7a4b; font-weight: 800; }
.ytr-summary-hard { color: #a8443a; font-weight: 800; }

/* Rows: a label column and the year's track; the month axis uses the same columns. */
.ytr-chart { display: grid; gap: 7px; transition: opacity .15s ease; }
.ytr-chart.is-loading { opacity: .5; }
.ytr-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 12px; }
.ytr-label { min-width: 0; overflow: hidden; color: #5d594f; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.ytr-label-short { display: none; }
.ytr-row.is-overall .ytr-label { color: var(--ink); font-weight: 850; }
/* Thin bars (half the earlier height); Overall slightly thicker and outlined. */
.ytr-bar { position: relative; height: 9px; overflow: hidden; border-radius: 999px; background: #f1ede3; }
.ytr-row.is-overall .ytr-bar { height: 13px; box-shadow: 0 0 0 1px var(--gold-border); }
.ytr-seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ytr-seg-text { color: rgb(37 37 35 / 75%); font-size: 7.5px; font-weight: 800; line-height: 1; white-space: nowrap; }
.ytr-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); box-shadow: 0 0 0 1px rgb(255 255 255 / 80%); }
/* Month axis: dark band with gold month names, like the active houses header. */
.ytr-axis .ytr-months { display: flex; overflow: hidden; border-radius: 8px; background: var(--surface-dark-bg); }
.ytr-month { padding: 5px 0; border-left: 1px solid rgb(245 214 83 / 18%); color: #f5d653; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-align: center; }
.ytr-month:first-child { border-left: 0; }
.ytr-month-short { display: none; }

/* Retrograde / direct stations on the planet rows (and in the intro text). */
.ytr-mark { display: inline-grid; width: 14px; height: 14px; flex: 0 0 14px; place-items: center; border-radius: 50%; background: #fffefa; font-size: 8.5px; font-weight: 900; line-height: 1; box-shadow: 0 1px 2px rgb(37 37 35 / 25%); }
/* On the thin bars: a small marker that fits the bar's height. */
.ytr-bar .ytr-mark { position: absolute; top: 50%; z-index: 1; width: 11px; height: 11px; font-size: 7px; box-shadow: 0 0 0 1px rgb(37 37 35 / 18%); transform: translate(-50%, -50%); }
.ytr-mark.is-retro { color: #a8443a; }
.ytr-mark.is-direct { color: #3d7a4b; }

.ytr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #77736b; font-size: 10px; }
.ytr-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ytr-legend-item i { width: 12px; height: 12px; border-radius: 4px; }

/* Planet by planet (collapsible). */
.ytr-planets-body { display: grid; gap: 12px; padding: 0 2px; }
.ytr-planets-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ytr-planets-head .tdesk-section-intro { flex: 1 1 320px; }
.ytr-from { display: flex; align-items: center; gap: 8px; }
.ytr-planets .ytr-bar { height: 11px; }

@container ytr (max-width: 560px) {
  .ytr-card { padding: 12px; }
  .ytr-row { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; }
  .ytr-label-long { display: none; }
  .ytr-label-short { display: inline; }
  .ytr-label { font-size: 10.5px; text-align: center; }
  .ytr-month-long { display: none; }
  .ytr-month-short { display: inline; }
  .ytr-seg-text { display: none; }
  .ytr-year { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .ytr-chart { transition: none; } }
