/* Personal forecast (inc/personal-forecast.php): the box on the monthly and daily sign pages
   (template-parts/personal-forecast.php, .pfc) and the /personal-forecast/ page (.pfl-*) */

.pfc,
.pfl-page {
  --pf-night: #1a0f2e;
  --pf-night-2: #2a1845;
  --pf-gold: #D4A574;
  --pf-gold-light: #E8C9A1;
  --pf-bronze: #7A5230;
  --pf-cream: #FBF4EC;
  --pf-ink: #2D2A32;
  --pf-muted: #6B6670;
  --pf-line: #E8E4DF;
}

/* ───────── The box ───────── */

.pfc {
  container-type: inline-size;
  position: relative;
  margin: 8px 0 32px;
  padding: 30px 30px 26px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(212, 165, 116, 0.24), transparent 55%),
    linear-gradient(150deg, var(--pf-night-2), var(--pf-night) 70%);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(26, 15, 46, 0.18);
}

.pfc .pfc__eyebrow {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-gold);
}

.pfc .pfc__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.6rem, 3.2vw, 2rem);
  font-weight: 600;
  line-height: 1.12;
  color: #fff;
  text-wrap: balance;
}

/* Shared sign → your chart → your feedback */
.pfc .pfc__points {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.pfc .pfc__points li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.pfc__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--pf-gold-light);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 50%;
}

.pfc__glyph { font-size: 1.25rem; line-height: 1; }

.pfc .pfc__point {
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
}

.pfc .pfc__point strong {
  display: block;
  font-size: 0.98rem;
  color: #fff;
}

.pfc__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 22px;
}

.pfc .pfc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--pf-night);
  text-align: center;
  text-decoration: none;
  background: var(--pf-gold);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(212, 165, 116, 0.3);
  transition: background-color 0.15s, transform 0.15s;
}

.pfc .pfc__btn:hover {
  color: var(--pf-night);
  text-decoration: none;
  background: var(--pf-gold-light);
  transform: translateY(-1px);
}

.pfc .pfc__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.pfc .pfc__fine {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.62);
}

/* Wide enough: the three points side by side */
@container (min-width: 600px) {
  .pfc .pfc__points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .pfc .pfc__points li {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 10px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 165, 116, 0.18);
    border-radius: 14px;
  }
}

/* A member whose chart has no Rising sign yet: one light strip */
.pfc--member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 20px 24px;
  color: var(--pf-ink);
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.16), rgba(212, 165, 116, 0.05));
  border: 1px solid rgba(212, 165, 116, 0.4);
  box-shadow: none;
}

.pfc--member .pfc__body { flex: 1 1 320px; }
.pfc--member .pfc__eyebrow { color: var(--pf-bronze); }
.pfc--member .pfc__title { font-size: 1.5rem; color: var(--pf-night); }
.pfc--member .pfc__lead { margin: 6px 0 0; font-size: 0.94rem; line-height: 1.55; color: var(--pf-ink); }
.pfc--member .pfc__btn { box-shadow: none; }
.pfc--member .pfc__btn:focus-visible { outline-color: var(--pf-night); }

/* Daily page: the box sits between full-width sections */
.dy-page .pfc { margin: 8px 0 36px; }

@media (max-width: 560px) {
  .pfc { padding: 24px 18px 22px; border-radius: 16px; }
  .pfc__actions { flex-direction: column; align-items: stretch; text-align: center; }
  .pfc--member .pfc__btn { width: 100%; }
}

/* ───────── The page ───────── */

.pfl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 26px;
}

.pfl-hero .nf-btn { min-height: 48px; }
.pfl-hero .nf-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pfl-hero__fine { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }

/* The three steps, linked */
.pfl-rail ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pfl-rail li { margin: 0; }

.pfl-rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--pf-night);
  text-decoration: none;
  background: var(--pf-cream);
  border: 1px solid #EFDCC7;
  border-radius: 14px;
}

.pfl-rail a:hover { color: var(--pf-night); text-decoration: none; border-color: var(--pf-gold); }
.pfl-rail a:focus-visible { outline: 3px solid var(--pf-gold); outline-offset: 2px; }

.pfl-num {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--pf-night);
  background: var(--pf-gold);
  border-radius: 50%;
}

.pfl-step {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--pf-line);
  scroll-margin-top: 96px;
}

.pfl-step > p { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.7; color: var(--pf-ink); }

.pfl-step .pfl-step__kicker {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-bronze);
}

.pfl-step .pfl-step__title {
  margin: 0 0 12px;
  padding: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--pf-night);
  border: 0;
}

.pfl-step .pfl-step__title::before,
.pfl-step .pfl-step__title::after { content: none; }

.pfl-step .pfl-note {
  padding: 12px 16px;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--pf-muted);
  background: #F7F5F2;
  border-left: 3px solid var(--pf-gold);
  border-radius: 0 10px 10px 0;
}

.pfl-card { margin-top: 20px; }
.pfl-card .rt-chart { background: #FDFBF8; }

/* Step 2: today's planets in two sets of houses */
.pfl-sky { margin-top: 18px; }

.pfl-sky .pfl-sky__summary {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pf-ink);
}

.pfl-sky .pfl-sky__summary:empty { display: none; }

.pfl-sky .pfl-sky__empty {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 22px 20px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--pf-muted);
  border: 1.5px dashed #DCCBB8;
  border-radius: 14px;
}

.pfl-sky__empty svg { flex-shrink: 0; color: var(--pf-gold); }
.pfl-sky__empty[hidden] { display: none; }

.pfl-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
  border: 1px solid var(--pf-line);
  border-radius: 14px;
}

/* Rounded corners on the corner cells (overflow: hidden would clip the caption) */
.pfl-table thead th:first-child { border-top-left-radius: 13px; }
.pfl-table thead th:last-child { border-top-right-radius: 13px; }
.pfl-table tbody tr:last-child > :first-child { border-bottom-left-radius: 13px; }
.pfl-table tbody tr:last-child > :last-child { border-bottom-right-radius: 13px; }

.pfl-table caption {
  padding: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--pf-muted);
}

.pfl-table th,
.pfl-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--pf-line);
}

.pfl-table tbody tr:last-child > * { border-bottom: 0; }

.pfl-table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pf-muted);
  background: #F7F5F2;
}

.pfl-table thead th.is-chart { color: var(--pf-bronze); background: #F6EBDD; }

.pfl-table tbody th { font-weight: 700; color: var(--pf-night); white-space: nowrap; }
.pfl-table .is-chart { background: rgba(212, 165, 116, 0.09); }

.pfl-glyph { display: inline-block; width: 1.3em; color: var(--pf-bronze); }
.pfl-rx { margin-left: 4px; font-size: 0.85em; color: var(--pf-bronze); text-decoration: none; cursor: help; }
.pfl-h { display: block; font-weight: 700; color: var(--pf-night); }
.pfl-t { display: block; font-size: 0.88rem; line-height: 1.45; color: var(--pf-muted); }

.pfl-step .pfl-fine { margin: 10px 0 0; font-size: 0.84rem; line-height: 1.55; color: var(--pf-muted); }

/* Step 3: chart + transits + feedback */
.pfl-step .pfl-eq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0;
}

.pfl-eq__term {
  padding: 9px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pf-night);
  background: var(--pf-cream);
  border: 1px solid #EFDCC7;
  border-radius: 999px;
}

.pfl-eq__term--result { color: #fff; background: var(--pf-night); border-color: var(--pf-night); }
.pfl-eq__op { font-weight: 700; color: var(--pf-bronze); }

.pfl-now {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pfl-now__col {
  padding: 20px 22px;
  background: #F7F5F2;
  border-radius: 14px;
}

.pfl-now__col h3 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2E6B45;
}

.pfl-now__col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.pfl-now__col li {
  position: relative;
  margin: 0;
  padding-left: 22px;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--pf-ink);
}

.pfl-now__col li::before {
  content: '';
  position: absolute;
  top: 0.45em;
  left: 2px;
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #2E6B45;
  border-left: 2px solid #2E6B45;
  transform: rotate(-45deg);
}

.pfl-now__col p { margin: 0; font-size: 0.93rem; line-height: 1.6; color: var(--pf-ink); }

.pfl-now__col--next { background: #fff; border: 1.5px dashed #DCCBB8; }
.pfl-now__col--next h3 { color: var(--pf-bronze); }

.pfl-cta .pfl-cta__login { margin-top: 8px; font-size: 0.9rem; }
.pfl-cta .pfl-cta__login a { font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pfl-cta .nf-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.pfl-faq { margin-top: 48px; }

@media (max-width: 760px) {
  .pfl-rail ol { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pfl-rail a { padding: 10px 12px; }
  .pfl-now { grid-template-columns: minmax(0, 1fr); }
  .pfl-step { margin-top: 32px; padding-top: 26px; }
}

/* Phones: each planet becomes a small card, the column names move into the cells */
@media (max-width: 560px) {
  /* The step headings carry the order; the form comes up sooner */
  .pfl-rail { display: none; }
  .pfl-rail + .pfl-step { margin-top: 0; padding-top: 0; border-top: 0; }
  .pfl-hero__actions { flex-direction: column; align-items: stretch; text-align: center; }
  .pfl-hero .nf-btn { justify-content: center; }

  .pfl-table,
  .pfl-table tbody,
  .pfl-table tr,
  .pfl-table th,
  .pfl-table td { display: block; }
  .pfl-table { border: 0; border-radius: 0; }
  .pfl-table caption { display: block; }
  .pfl-table tbody tr:last-child > * { border-radius: 0; }
  .pfl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pfl-table tbody { display: grid; gap: 10px; }
  .pfl-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--pf-line); border-radius: 12px; overflow: hidden; }
  .pfl-table tbody th { grid-column: 1 / -1; background: #F7F5F2; }
  .pfl-table td { border-bottom: 0; }
  .pfl-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pf-muted);
  }
  .pfl-table tr > td:only-of-type { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .pfc .pfc__btn { transition: none; }
  .pfc .pfc__btn:hover { transform: none; }
}
