/* chart.css: My Chart, the interactive birth chart page. */

.chart-intro {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 40px; padding-top: 32px;
}
.chart-intro-text { flex: 1 1 640px; display: flex; flex-direction: column; gap: 12px; }

/* Wheel + "how to read" side by side */
.chart-stage { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: center; padding-block: 24px 56px; }
.wheel-area, .list-area { flex: 1 1 600px; min-width: 0; position: relative; }
.wheel-box { width: min(580px, calc(100vh - 280px), 100%); min-width: min(380px, 100%); margin: 0 auto; }

/* The little explanation box that follows your mouse or finger */
.tip {
  position: absolute; z-index: 20; width: 290px; max-width: calc(100% - 16px);
  padding: 16px 18px; background: var(--bone); color: var(--ink);
  font-size: 14px; line-height: 1.5; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.tip { max-width: min(290px, calc(100vw - 16px)); }
/* On small screens, when there's no room beside or below the wheel:
   a compact strip at the bottom (or top) edge of the screen. */
.tip.docked {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 8px; top: auto;
  width: min(460px, calc(100vw - 16px)); max-width: none; z-index: 60; padding: 12px 16px;
}
.tip.docked.docked-top { top: 8px; bottom: auto; }
.tip.docked h3 { font-size: 19px; }
.tip h3 { font: 500 22px/1.15 var(--serif); margin: 0 0 2px; }
.tip p { margin: 0 0 6px; }
.tip .tip-meta { color: #5F574F; }
.tip .tip-action { color: #6B5427; font-weight: 650; margin: 8px 0 0; }

/* How to read the wheel */
.how-to-read { flex: 1 1 280px; max-width: 380px; }
.how-title { font-size: 22px; margin-bottom: 12px; }
.how-to-read dl { margin: 0; }
.how-to-read dl > div { padding: 10px 0; border-top: 1px solid var(--line); }
.how-to-read dl > div:last-child { border-bottom: 1px solid var(--line); }
.how-to-read dt { font-weight: 650; }
.how-to-read dd { margin: 2px 0 0; color: var(--bone-soft); font-size: 15px; }
.gold { color: var(--champagne); }
.dash-key { border-bottom: 2px dashed var(--champagne); }
.solid-key { border-bottom: 2px solid var(--bone); }
.time-note { margin: 18px 0 0; font-size: 15px; color: var(--bone-soft); }

/* List view */
.table-wrap { overflow-x: auto; }
.placements-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.placements-table th {
  text-align: left; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--champagne);
  font: 650 12px/1.3 var(--serif); letter-spacing: 0.26em; text-transform: uppercase; color: var(--champagne);
}
.placements-table td { padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.placements-table .symbol { color: var(--champagne); margin-right: 8px; }
.placements-table td.quiet { color: var(--bone-soft); }

/* Your chart, explained: a slightly darker band of the same colour */
.explained { background: rgba(0, 0, 0, 0.14); border-top: 1px solid var(--line); padding-block: 56px; }
.explained .lede { margin: 12px 0 28px; }

.jump-links ul {
  display: flex; flex-wrap: wrap; gap: 4px 26px; list-style: none; margin: 0; padding: 16px 0;
  border-top: 1px solid var(--champagne); border-bottom: 1px solid var(--line);
}
.jump-links a { font-weight: 650; font-size: 15px; text-decoration: none; display: inline-block; padding: 6px 0; }
.jump-links a:hover { text-decoration: underline; }

.reading {
  display: flex; flex-wrap: wrap; gap: 20px 64px; padding: 40px 16px; margin-inline: -16px;
  border-bottom: 1px solid var(--line); scroll-margin-top: 24px;
  transition: background 0.6s;
}
.reading.flash { background: rgba(205, 187, 146, 0.14); }
.reading-head { flex: 1 1 280px; display: flex; flex-direction: column; gap: 8px; }
.reading-head .symbol { font-size: 24px; color: var(--champagne); line-height: 1; }
.reading-title { font: 500 clamp(1.6rem, 2.4vw, 2.1rem)/1.1 var(--serif); }
.reading-meta { margin: 0; color: var(--bone-soft); font-size: 15px; }
.reading-body { flex: 2 1 520px; min-width: 0; }
.reading-body p { margin: 0 0 14px; max-width: 66ch; }

/* "Your Venus (how you love) in Scorpio (how) in your 1st house (where)" */
.grammar { font: 500 clamp(1.15rem, 1.6vw, 1.35rem)/1.45 var(--serif); margin: 0 0 22px !important; }
.grammar .role { border-bottom: 1.5px solid var(--champagne); }
/* The little explanations in brackets: plain (not italic) and bright enough to read easily. */
.grammar .note { font: 550 0.65em/1 var(--sans); letter-spacing: 0.01em; color: var(--bone-soft); }

.connections-title { font: 650 15px/1.4 var(--sans); margin: 24px 0 8px; color: var(--champagne); letter-spacing: 0.04em; }
.connections-list { list-style: none; margin: 0; padding: 0; }
.connections-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.connections-list strong { font-weight: 650; }
.connections-list .maybe { color: var(--bone-soft); font-size: 14px; }

.how-we-know { margin-top: 20px; }
.how-we-know summary { cursor: pointer; font-weight: 650; font-size: 15px; color: var(--bone-soft); padding: 6px 0; }
.how-we-know ol { margin: 8px 0 0; padding-left: 20px; color: var(--bone-soft); font-size: 15px; }
.how-we-know li { margin-bottom: 4px; }

.back-to-wheel { font-size: 14px; font-weight: 650; color: var(--champagne); }

@media (max-width: 760px) {
  .how-to-read { max-width: none; }
}

/* --- "Watch your chart build" tour (js/tour.js) --- */
.replay-tour { align-self: flex-start; margin-top: 6px; }
.tour { display: flex; flex-direction: column; gap: 12px; }
.tour-title { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.tour-text { margin: 0; font-size: 16px; max-width: 38ch; display: flex; flex-direction: column; gap: 10px; }
.tour-text p { margin: 0; }
/* The bullet points: small squares, in keeping with the square style. */
.tour-text ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tour-text li { position: relative; padding-left: 18px; }
.tour-text li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; background: var(--champagne); }
.tour-text li:has(.line-sample) { padding-left: 38px; }
.tour-text li:has(.line-sample)::before { display: none; }
.tour-text strong { font-weight: 650; }
/* A tiny sample of each line style next to "Dashed" and "Solid". */
.line-sample { position: absolute; left: 0; top: 0.75em; width: 26px; border-top: 1.5px solid var(--bone); }
.line-sample.dashed { border-top-style: dashed; border-color: var(--champagne); }
.tour-dots { display: flex; gap: 6px; }
.tour-dots span { width: 18px; height: 3px; background: var(--line); }
.tour-dots span.done { background: var(--champagne); }
.tour-actions { display: flex; align-items: center; gap: 12px 24px; margin-top: 6px; }

/* While the tour runs, each layer of the wheel starts hidden and fades in
   when its step comes. Earlier layers stay, a little quieter. */
.wheel.touring > .signs, .wheel.touring > .houses,
.wheel.touring > .aspects, .wheel.touring > .planets { opacity: 0; transition: opacity 0.9s ease; }
.wheel.touring > .tour-on { opacity: 1; }
.wheel.touring > .tour-past { opacity: 0.45; }
.wheel.touring > .hover-areas { pointer-events: none; }

/* On narrow screens the column with the tour sits below the wheel, out of
   sight, so the tour becomes a card fixed to the bottom of the screen. */
@media (max-width: 960px) {
  .tour {
    position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 50;
    gap: 8px; padding: 16px 18px; max-height: 48vh; overflow-y: auto;
    background: var(--page); border: 1px solid var(--champagne);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
  }
  .tour-title { font-size: 1.5rem; }
  .tour-text { font-size: 15px; max-width: none; }
}
