/* Shared editorial & tabular stylesheet for /panchang/* daily pages
   Typography: Times New Roman; real responsive tables on desktop & mobile */

body {
  margin: 0;
  background: #ede8f8;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(140, 100, 230, 0.16) 0%, transparent 68%),
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(180, 140, 255, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(120, 80, 200, 0.07) 0%, transparent 55%);
  font-family: 'Times New Roman', Times, serif;
  color: #100a28;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px clamp(16px, 5vw, 80px) 72px;
  box-sizing: border-box;
}

h1 {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(2rem, 4.8vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  color: #100a28;
  margin: 4px 0 8px;
  letter-spacing: -0.01em;
}

h2 {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.38rem, 2.8vw, 1.8rem);
  font-weight: 700;
  color: #100a28;
  line-height: 1.18;
  margin: 24px 0 10px;
}

p {
  margin: 0 0 12px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.06rem;
  color: rgba(24, 16, 58, 0.84);
  line-height: 1.72;
}

.nkx-asof {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(74, 45, 138, 0.78);
}

.nkx-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e8b57;
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.18);
  flex-shrink: 0;
}

.pillRow {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3b1e78;
  text-decoration: none;
  border: 1px solid rgba(74, 45, 138, 0.22);
  background: rgba(255, 255, 255, 0.84);
  padding: 6px 13px;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.pill:hover {
  background: #fff;
  border-color: rgba(74, 45, 138, 0.45);
  transform: translateY(-1px);
}

.pill.is-active {
  background: #2d1a6b;
  color: #fff;
  border-color: #2d1a6b;
  box-shadow: 0 4px 12px rgba(45, 26, 107, 0.22);
}

.st-status {
  display: none;
  margin-top: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(74, 45, 138, 0.16);
  background: rgba(255, 255, 255, 0.82);
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.92rem;
  color: #2d1a6b;
}

.st-status.loading {
  display: block;
}

.st-status.error {
  display: block;
  border-color: rgba(192, 57, 43, 0.28);
  background: rgba(255, 244, 240, 0.88);
  color: #7f1d1d;
}

/* Hero answer card */
.wrap > .card {
  margin-top: 18px;
  background: linear-gradient(135deg, #160c38 0%, #2d1a6b 58%, #3f278f 100%);
  border: 1px solid rgba(230, 196, 106, 0.32);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: 0 16px 40px -12px rgba(28, 16, 69, 0.42);
  color: #fff;
}

.wrap > .card .lbl {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6c46a;
}

.wrap > .card .val {
  margin-top: 8px;
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.95rem, 5.2vw, 2.7rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

.wrap > .card .sub {
  margin-top: 10px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.wrap > .card .sub a {
  color: #e6c46a;
  font-weight: 700;
}

.wrap > .card strong {
  color: #fff;
}

/* Stats strip */
.nkx {
  margin-top: 18px;
}

.nkx a {
  color: #3b1e78;
}

.nkx-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 18px;
  background: #fff;
  border: 1.5px solid rgba(74, 45, 140, 0.16);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px -16px rgba(45, 26, 107, 0.18);
}

.nkx-stat {
  padding: 16px 12px;
  text-align: center;
  border-left: 1px solid rgba(74, 45, 140, 0.12);
}

.nkx-stat:first-child {
  border-left: none;
}

.nkx-stat b {
  display: block;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.05;
  color: #2d1a6b;
  font-variant-numeric: tabular-nums;
}

.nkx-stat span {
  display: block;
  margin-top: 6px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(74, 45, 138, 0.72);
}

/* Editorial sections */
.nkx-sec {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(74, 45, 140, 0.13);
  border-radius: 18px;
  padding: 28px 34px;
  box-shadow: 0 8px 28px -18px rgba(45, 26, 107, 0.16);
}

.nkx-num {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a5010;
  margin-bottom: 8px;
}

.nkx-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.42rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #100a28;
  line-height: 1.16;
  margin: 0 0 12px;
}

.nkx-body p {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.04rem;
  line-height: 1.74;
  color: rgba(24, 16, 58, 0.86);
  margin: 0 0 12px;
}

.nkx-body p:last-child {
  margin-bottom: 0;
}

/* Real HTML tables — Desktop and Mobile */
.nkx-tbl-wrap {
  margin: 14px 0 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(74, 45, 138, 0.18);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 26px -18px rgba(45, 26, 107, 0.22);
}

table.nkx-tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Times New Roman', Times, serif;
  table-layout: auto;
}

table.nkx-tbl thead th {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #3b1e78;
  padding: 12px 14px;
  text-align: left;
  background: linear-gradient(180deg, rgba(74, 45, 138, 0.085), rgba(74, 45, 138, 0.03));
  border-bottom: 2px solid rgba(74, 45, 138, 0.18);
  border-left: 1px solid rgba(74, 45, 138, 0.12);
}

table.nkx-tbl thead th:first-child {
  border-left: none;
}

table.nkx-tbl th.col-num,
table.nkx-tbl td.col-num {
  text-align: center;
  width: 52px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table.nkx-tbl tbody tr {
  border-top: 1px solid rgba(74, 45, 138, 0.10);
  transition: background 0.14s ease;
}

table.nkx-tbl tbody tr:first-child {
  border-top: none;
}

table.nkx-tbl tbody tr:nth-child(even) {
  background: rgba(74, 45, 138, 0.022);
}

table.nkx-tbl tbody tr:hover {
  background: rgba(201, 168, 76, 0.08);
}

table.nkx-tbl tbody td {
  padding: 12px 14px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #1d1045;
  border-left: 1px solid rgba(74, 45, 138, 0.09);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

table.nkx-tbl tbody td:first-child {
  border-left: none;
}

table.nkx-tbl tbody td strong {
  color: #100a28;
  font-weight: 700;
}

.nkx-tbl-link {
  color: #2d1a6b;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 45, 138, 0.25);
  transition: color 0.15s, border-color 0.15s;
}

.nkx-tbl-link:hover {
  color: #7a5010;
  border-bottom-color: #7a5010;
}

.nkx-guide-link {
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #3b1e78;
  text-decoration: none;
  white-space: nowrap;
}

.nkx-guide-link:hover {
  text-decoration: underline;
}

/* Status accents & badges */
table.nkx-tbl tbody tr.is-good > td:first-child {
  box-shadow: inset 4px 0 0 #3d9160;
}

table.nkx-tbl tbody tr.is-avoid > td:first-child {
  box-shadow: inset 4px 0 0 #b34a2a;
}

table.nkx-tbl tbody tr.is-neutral > td:first-child {
  box-shadow: inset 4px 0 0 #c9a84c;
}

.nkx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.nkx-badge.good {
  background: rgba(74, 158, 110, 0.13);
  color: #1f5c3a;
  border: 1px solid rgba(74, 158, 110, 0.28);
}

.nkx-badge.avoid {
  background: rgba(179, 74, 42, 0.11);
  color: #8c2d12;
  border: 1px solid rgba(179, 74, 42, 0.25);
}

.nkx-badge.gold {
  background: rgba(201, 168, 76, 0.15);
  color: #6b4806;
  border: 1px solid rgba(201, 168, 76, 0.36);
}

/* Active "Today" row highlight */
table.nkx-tbl tbody tr.is-today,
table.nkx-tbl tbody tr.now {
  background: linear-gradient(135deg, #25145b 0%, #3b2585 100%) !important;
  color: #fff !important;
}

table.nkx-tbl tbody tr.is-today td,
table.nkx-tbl tbody tr.now td {
  color: #fff !important;
  border-left-color: rgba(255, 255, 255, 0.15) !important;
  border-top-color: rgba(230, 196, 106, 0.45) !important;
}

table.nkx-tbl tbody tr.is-today td strong,
table.nkx-tbl tbody tr.now td strong {
  color: #fff !important;
}

table.nkx-tbl tbody tr.is-today td.col-num,
table.nkx-tbl tbody tr.now td.col-num {
  color: #e6c46a !important;
  font-weight: 700;
}

table.nkx-tbl tbody tr.is-today .nkx-tbl-link,
table.nkx-tbl tbody tr.now .nkx-tbl-link {
  color: #fff !important;
  border-bottom-color: rgba(230, 196, 106, 0.65);
}

table.nkx-tbl tbody tr.is-today .nkx-guide-link,
table.nkx-tbl tbody tr.now .nkx-guide-link {
  color: #e6c46a !important;
}

table.nkx-tbl tbody tr.is-today .nkx-badge,
table.nkx-tbl tbody tr.now .nkx-badge {
  background: rgba(230, 196, 106, 0.22);
  color: #f9e39b;
  border-color: rgba(230, 196, 106, 0.55);
}

.nkx-today-tag {
  display: none;
  margin-left: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6c46a;
  color: #1c1045;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

tr.is-today .nkx-today-tag,
tr.now .nkx-today-tag {
  display: inline-block;
}

/* CTAs */
.nkx-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.nkx-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  background: #2d1a6b;
  color: #fff !important;
  text-decoration: none;
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity 0.15s, transform 0.12s;
}

.nkx-btn.ghost {
  background: transparent;
  color: #2d1a6b !important;
  border: 1.5px solid rgba(45, 26, 107, 0.34);
}

.nkx-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* FAQ accordion */
.nkx details {
  border-top: 1px solid rgba(74, 45, 140, 0.12);
  padding: 14px 0;
}

.nkx details:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.nkx summary {
  cursor: pointer;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.16rem;
  font-weight: 700;
  color: #100a28;
  list-style: none;
  padding-right: 28px;
  position: relative;
}

.nkx summary::-webkit-details-marker {
  display: none;
}

.nkx summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 1.35rem;
  color: #7a5010;
}

.nkx details[open] summary::after {
  content: "\2212";
}

.nkx details p {
  margin: 8px 0 0;
  font-size: 1rem;
}

.note {
  margin-top: 10px;
  color: rgba(30, 15, 80, 0.70);
  font-size: 0.95rem;
}

@media (min-width: 641px) {
  table.nkx-tbl td:first-child {
    white-space: nowrap;
  }
}

/* Responsive mobile layout — keeps real HTML tables cleanly fitted without horizontal overflow */
@media (max-width: 640px) {
  .wrap {
    padding: 16px 12px 56px;
  }

  .wrap > .card {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .pillRow {
    gap: 6px;
  }

  .pill {
    font-size: 0.70rem;
    padding: 5px 10px;
  }

  .nkx-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .nkx-stat {
    padding: 13px 10px;
  }

  .nkx-stat:nth-child(odd) {
    border-left: none;
  }

  .nkx-stat:nth-child(1),
  .nkx-stat:nth-child(2) {
    border-bottom: 1px solid rgba(74, 45, 140, 0.12);
  }

  .nkx-sec {
    padding: 18px 14px;
    border-radius: 16px;
  }

  .nkx-body p,
  p {
    font-size: 0.98rem;
    line-height: 1.66;
  }

  .nkx-tbl-wrap {
    border-radius: 12px;
  }

  table.nkx-tbl thead th {
    padding: 9px 7px;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
  }

  table.nkx-tbl tbody td {
    padding: 9px 7px;
    font-size: 0.88rem;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: normal;
  }

  table.nkx-tbl th.col-num,
  table.nkx-tbl td.col-num {
    width: 34px;
    padding-left: 5px;
    padding-right: 4px;
    font-size: 0.82rem;
  }

  .nkx-badge {
    font-size: 0.70rem;
    padding: 2px 7px;
  }

  .nkx-today-tag {
    font-size: 0.58rem;
    padding: 2px 6px;
    margin-left: 4px;
  }

  .nkx-guide-link {
    font-size: 0.78rem;
  }

  .nkx-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  table.nkx-tbl thead th {
    padding: 8px 4px;
    font-size: 0.56rem;
  }

  table.nkx-tbl tbody td {
    padding: 8px 4px;
    font-size: 0.78rem;
  }

  table.nkx-tbl th.col-num,
  table.nkx-tbl td.col-num {
    width: 26px;
    padding-left: 3px;
    padding-right: 3px;
  }

  .nkx-badge {
    font-size: 0.64rem;
    padding: 2px 5px;
    white-space: normal;
    text-align: center;
  }
}
