/* ============================================================
   Agastya Leaves — interactive Nadi reading widget
   Scoped under .agl / .agl-* to avoid clashing with contents.css.
   Dark palm-leaf panel embedded in the (light) SEO article page.

   Shares the gold accent of the Oracle widget so the two features read as
   one family, but leans warm/earthen (palm leaf, ink, temple lamplight)
   rather than the Oracle's violet starfield.
   ============================================================ */

.agl {
  --agl-gold: #e9c46a;
  --agl-gold-deep: #c9a227;
  --agl-ink: #f3ead9;
  --agl-muted: #b8a894;
  --agl-line: rgba(233, 196, 106, 0.22);
  --agl-radius: 14px;

  position: relative;
  margin: 32px 0 40px;
  padding: 40px 22px 46px;
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 50% -10%, #4a3520 0%, rgba(74, 53, 32, 0) 62%),
    linear-gradient(160deg, #1d1710 0%, #2a2016 50%, #16110c 100%);
  box-shadow: 0 18px 50px rgba(30, 20, 8, 0.45), inset 0 0 0 1px rgba(233, 196, 106, 0.12);
  color: var(--agl-ink);
  text-align: center;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* faint drifting motes, like dust in lamplight */
.agl::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 26%, rgba(255, 236, 200, 0.5), transparent),
    radial-gradient(1px 1px at 72% 18%, rgba(255, 236, 200, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 58% 68%, rgba(255, 236, 200, 0.35), transparent),
    radial-gradient(1px 1px at 30% 82%, rgba(255, 236, 200, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 86% 74%, rgba(255, 236, 200, 0.4), transparent);
  opacity: 0.55;
  pointer-events: none;
}

.agl > * { position: relative; z-index: 1; }

/* ── Shared type ─────────────────────────────────────────── */

.agl__eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--agl-gold);
  margin: 0 0 6px;
}

.agl__title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(22px, 4.4vw, 30px);
  font-weight: 600;
  margin: 0 0 12px;
  color: #fff;
  line-height: 1.35;
}

.agl__lede {
  max-width: 46em;
  margin: 0 auto 22px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--agl-muted);
}

.agl__hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--agl-muted);
  opacity: 0.85;
}

/* ── Buttons ─────────────────────────────────────────────── */

.agl__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 30px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--agl-gold) 0%, var(--agl-gold-deep) 100%);
  color: #241a0c;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.agl__btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(233, 196, 106, 0.3);
}

.agl__btn:disabled { opacity: 0.5; cursor: not-allowed; }

.agl__btn--ghost {
  background: transparent;
  border: 1.5px solid rgba(233, 196, 106, 0.5);
  color: var(--agl-gold);
  font-weight: 600;
}

.agl__btn--ghost:hover {
  background: rgba(233, 196, 106, 0.08);
  color: var(--agl-gold);
}

.agl :focus-visible {
  outline: 2px solid var(--agl-gold);
  outline-offset: 3px;
}

/* ── Step header: back + progress ────────────────────────── */

.agl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  text-align: left;
}

.agl-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(233, 196, 106, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--agl-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.agl-back:hover {
  color: var(--agl-gold);
  border-color: rgba(233, 196, 106, 0.55);
  background: rgba(233, 196, 106, 0.06);
}

.agl-progress {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--agl-muted);
  opacity: 0.8;
  white-space: nowrap;
}

/* ── Rite banner ─────────────────────────────────────────── */
/* Marks the threshold of each stage. Named after what the stage actually does rather than
   numbered, so it carries meaning the "Step N of 4" counter cannot. */

.agl-rite {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  margin: 4px 0 22px;
  padding: 14px 22px;
  border: 1px solid rgba(233, 196, 106, 0.4);
  border-radius: 12px;
  background: rgba(233, 196, 106, 0.05);
}

.agl-rite__line {
  flex: 1;
  height: 1px;
  background: rgba(233, 196, 106, 0.3);
}

.agl-rite__label {
  flex: 0 1 auto;
  font-size: 15px;
  letter-spacing: 0.3em;
  /* the tracking above adds a trailing gap; pull it back so the label stays centred */
  text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--agl-gold);
  white-space: nowrap;
}

/* ── Step 1: thumbprints ─────────────────────────────────── */

.agl-prints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 360px;
  margin: 0 auto;
}

.agl-print {
  position: relative;
  aspect-ratio: 1;
  padding: 12px;
  border: 1px solid rgba(233, 196, 106, 0.16);
  border-radius: var(--agl-radius);
  background: rgba(233, 196, 106, 0.04);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}

.agl-print img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(1.05) sepia(0.2);
  transition: filter 0.3s ease;
}

.agl-print:hover {
  transform: scale(1.06);
  border-color: rgba(233, 196, 106, 0.42);
  box-shadow: 0 0 18px rgba(233, 196, 106, 0.15);
}

.agl-print.is-picked {
  border-color: var(--agl-gold);
  border-width: 2px;
  transform: scale(1.1);
  box-shadow: 0 0 26px rgba(233, 196, 106, 0.4), 0 0 60px rgba(233, 196, 106, 0.15);
}

.agl-print.is-picked img { filter: brightness(1.05) sepia(1) saturate(2.2); }
.agl-print.is-dimmed { opacity: 0.25; transform: scale(0.96); }

.agl-print__glow {
  position: absolute;
  inset: 0;
  border-radius: var(--agl-radius);
  background: radial-gradient(circle at center, rgba(233, 196, 106, 0.2) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.agl-print.is-picked .agl-print__glow { opacity: 1; }

/* ── Step 2: yes / no ────────────────────────────────────── */

.agl-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 20px;
}

.agl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(233, 196, 106, 0.35);
  transition: background 0.4s ease, transform 0.3s ease;
}

.agl-dot.is-current {
  background: var(--agl-gold);
  border-color: var(--agl-gold);
  transform: scale(1.25);
  box-shadow: 0 0 9px rgba(233, 196, 106, 0.5);
}

.agl-dot.is-done { background: rgba(233, 196, 106, 0.4); border-color: rgba(233, 196, 106, 0.4); }

.agl-qnum {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--agl-muted);
}

.agl-question {
  max-width: 24em;
  margin: 0 auto 30px;
  min-height: 3.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(17px, 3.4vw, 21px);
  line-height: 1.75;
  color: #fff;
}

.agl-yn {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.agl-yn__btn {
  min-width: 132px;
  min-height: 50px;
  padding: 14px 0;
  border-radius: 999px;
  border: 1.5px solid;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease, background 0.25s ease;
}

.agl-yn__btn:disabled { cursor: default; }

.agl-yn__yes { background: transparent; border-color: rgba(233, 196, 106, 0.5); color: var(--agl-gold); }
.agl-yn__yes:hover:not(:disabled) { background: rgba(233, 196, 106, 0.1); transform: translateY(-2px); }
.agl-yn__yes.is-chosen {
  background: linear-gradient(135deg, var(--agl-gold), var(--agl-gold-deep));
  color: #241a0c;
  font-weight: 700;
  transform: scale(1.04);
}

.agl-yn__no { background: transparent; border-color: rgba(184, 168, 148, 0.4); color: var(--agl-muted); }
.agl-yn__no:hover:not(:disabled) { background: rgba(184, 168, 148, 0.08); transform: translateY(-2px); }
.agl-yn__no.is-chosen {
  background: rgba(150, 134, 112, 0.28);
  border-color: rgba(184, 168, 148, 0.7);
  color: #e2d6c4;
  font-weight: 700;
  transform: scale(1.04);
}

.agl-yn__btn.is-faded { opacity: 0.25; transform: scale(0.97); }

/* ── Step 3: chapters ────────────────────────────────────── */

.agl-chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  text-align: left;
}

.agl-chapter {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border: 1px solid rgba(233, 196, 106, 0.16);
  border-radius: var(--agl-radius);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.22s, background 0.22s, transform 0.18s, box-shadow 0.22s;
}

.agl-chapter:hover {
  border-color: rgba(233, 196, 106, 0.42);
  background: rgba(233, 196, 106, 0.06);
  transform: translateX(4px);
}

.agl-chapter.is-picked {
  border-color: var(--agl-gold);
  background: rgba(233, 196, 106, 0.1);
  transform: translateX(4px);
  box-shadow: 0 2px 20px rgba(233, 196, 106, 0.15);
}

.agl-chapter__num {
  flex: 0 0 56px;
  height: 56px;
  display: grid;
  place-content: center;
  gap: 1px;
  border: 1px solid rgba(233, 196, 106, 0.25);
  border-radius: 10px;
  background: rgba(233, 196, 106, 0.05);
  color: #d8b45c;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.agl-chapter__num b { font-size: 17px; letter-spacing: 0; color: var(--agl-gold); }

.agl-chapter__body { flex: 1; display: grid; gap: 4px; min-width: 0; }
.agl-chapter__name { font-size: 17px; color: #f0e6d4; }
.agl-chapter__desc { font-size: 13px; line-height: 1.55; color: var(--agl-muted); }

.agl-chapter__check { flex: 0 0 auto; color: var(--agl-gold); opacity: 0; transition: opacity 0.22s; }
.agl-chapter.is-picked .agl-chapter__check { opacity: 1; }

/* ── Step 4: concern ─────────────────────────────────────── */

.agl-field { text-align: left; margin-bottom: 20px; }

.agl-field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--agl-muted);
}

.agl-field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid rgba(233, 196, 106, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--agl-ink);
  /* 16px minimum: anything smaller makes iOS Safari zoom the page on focus. */
  font-size: 16px;
  font-family: inherit;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s;
}

.agl-field__input::placeholder { color: #8c7f6e; }

.agl-field__input:focus {
  border-color: rgba(233, 196, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(233, 196, 106, 0.1);
}

.agl-field__count {
  margin: 6px 2px 0;
  text-align: right;
  font-size: 12px;
  color: #8c7f6e;
}

.agl-field__count.is-warn { color: #d99a4e; }

.agl-examples { display: grid; gap: 8px; margin-bottom: 24px; text-align: left; }

.agl-examples__hint {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--agl-muted);
  opacity: 0.85;
}

.agl-example {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(233, 196, 106, 0.3);
  border-radius: 10px;
  background: rgba(233, 196, 106, 0.07);
  color: #ecd9a8;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.agl-example:hover { transform: translateY(-2px); background: rgba(233, 196, 106, 0.12); }
.agl-example.is-active { border-color: var(--agl-gold); background: rgba(233, 196, 106, 0.18); }

/* ── Loading ─────────────────────────────────────────────── */

.agl-loading { display: grid; justify-items: center; gap: 20px; padding: 40px 0 30px; }

.agl-loading__leaf { width: 62px; height: 72px; animation: agl-float 2.6s ease-in-out infinite; }
.agl-loading__leaf svg { width: 100%; height: 100%; }

@keyframes agl-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-12px) rotate(5deg); }
}

.agl-loading__phrase {
  margin: 0;
  min-height: 1.6em;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #e0cfa8;
}

.agl-fade-enter-active, .agl-fade-leave-active { transition: opacity 0.55s ease; }
.agl-fade-enter-from, .agl-fade-leave-to { opacity: 0; }

/* ── Result ──────────────────────────────────────────────── */

.agl-reading { text-align: left; }

.agl-reading__badge {
  margin: 0 0 8px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--agl-gold);
  opacity: 0.85;
}

.agl-reading__title {
  margin: 0 0 8px;
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(23px, 4.6vw, 31px);
  font-weight: 600;
  color: #fff;
}

.agl-reading__ref {
  margin: 0 0 26px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #c0a878;
}

.agl-reading__concern {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-left: 2px solid rgba(233, 196, 106, 0.4);
  border-radius: 0 10px 10px 0;
  background: rgba(233, 196, 106, 0.05);
}

.agl-reading__clabel {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--agl-muted);
}

.agl-reading__ctext { margin: 0; font-size: 15px; line-height: 1.75; color: #e7dbc6; }

.agl-rule {
  height: 1px;
  margin: 30px 0;
  background: linear-gradient(to right, transparent, rgba(233, 196, 106, 0.32), transparent);
}

.agl-rule--thin { margin: 26px 0; background: linear-gradient(to right, transparent, rgba(233, 196, 106, 0.15), transparent); }

.agl-chapter-block { display: grid; gap: 10px; }

.agl-chapter-block__roman {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(26px, 5vw, 34px);
  font-style: italic;
  line-height: 1;
  color: var(--agl-gold);
  opacity: 0.9;
}

.agl-chapter-block__name {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #c8a95e;
}

/* The reading itself, set as if inked on the leaf. */
.agl-chapter-block__text {
  margin: 6px 0 0;
  padding: 22px 24px;
  border: 1px solid rgba(160, 118, 44, 0.42);
  border-radius: 10px;
  background: linear-gradient(160deg, #efe2c6 0%, #e6d6b4 55%, #efe3c8 100%);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.32);
  color: #2a1d0c;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 2;
  white-space: pre-wrap;
}

.agl-remaining {
  margin: 28px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--agl-muted);
}

.agl-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.agl-disclaimer {
  margin: 26px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  color: #8c7f6e;
}

/* ── Notices (limit / error) ─────────────────────────────── */

.agl-notice { display: grid; justify-items: center; gap: 18px; padding: 30px 0 14px; }
.agl-notice__icon { font-size: 34px; }
.agl-notice__text { max-width: 34em; margin: 0; font-size: 15px; line-height: 1.85; color: var(--agl-muted); }

/* ── Small screens ───────────────────────────────────────── */

@media (max-width: 480px) {
  .agl { padding: 30px 16px 36px; border-radius: 16px; }
  .agl-rite { padding: 11px 14px; gap: 10px; margin-bottom: 18px; }
  .agl-rite__label { font-size: 12px; letter-spacing: 0.2em; text-indent: 0.2em; }
  .agl-prints { gap: 9px; max-width: 100%; }
  .agl-print { padding: 8px; border-radius: 10px; }
  .agl-yn { gap: 12px; }
  .agl-yn__btn { min-width: 118px; font-size: 15px; }
  .agl-chapter { padding: 13px 14px; gap: 12px; }
  .agl-chapter__num { flex-basis: 48px; height: 48px; }
  .agl-chapter__name { font-size: 15px; }
  .agl-chapter__desc { font-size: 12px; }
  .agl-chapter-block__text { padding: 16px 16px; font-size: 15px; line-height: 1.95; }
  .agl-actions .agl__btn { width: 100%; }
}

@media (max-width: 340px) {
  .agl-yn { flex-direction: column; align-items: stretch; }
  .agl-yn__btn { width: 100%; min-width: 0; }
}

/* ── Reduced motion ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .agl *,
  .agl *::before,
  .agl *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   SEO article styling (outside the widget, on the light page)
   ============================================================ */

.agastya-lead {
  font-size: 17px;
  line-height: 1.9;
}

.agastya-steps {
  margin: 0 0 24px;
  padding-left: 22px;
  line-height: 1.9;
}

.agastya-steps li { margin-bottom: 10px; }

.agastya-note {
  padding: 12px 16px;
  border-left: 3px solid #ffd700;
  background: #2a2a2a;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
}

.agastya-table-wrap { overflow-x: auto; margin: 18px 0 26px; }

.agastya-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.agastya-table th,
.agastya-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  line-height: 1.7;
}

.agastya-table th {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  font-weight: 700;
  white-space: nowrap;
}

.agastya-faq { margin-top: 8px; }

.agastya-faq__q {
  margin: 22px 0 8px;
  font-size: 17px;
  line-height: 1.6;
}

.agastya-faq__a {
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
}

.agastya-disclaimer {
  margin-top: 32px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.85;
}
