
.kundli-page {
  position: relative;
}

.kundli-page .starfield {
  opacity: .42;
}

.kundli-page::before,
.kundli-page::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(12px);
  opacity: .34;
}

.kundli-page::before {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -130px;
  background: radial-gradient(circle, rgba(201, 154, 67, .44) 0%, rgba(201, 154, 67, .08) 45%, transparent 74%);
}

.kundli-page::after {
  width: 380px;
  height: 380px;
  left: -160px;
  bottom: -170px;
  background: radial-gradient(circle, rgba(109, 138, 87, .38) 0%, rgba(109, 138, 87, .08) 42%, transparent 72%);
}

.kundli-page .section-shell,
.kundli-page .site-header,
.kundli-page .site-footer {
  position: relative;
  z-index: 1;
}

.kundli-page .match-hero,
.kundli-page .match-form-grid,
.kundli-page .results-shell {
  position: relative;
  z-index: 1;
}


/* Keep the standalone tool header identical to the home page header. */
.kundli-page .site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 250, 241, .82);
}

.kundli-page .brand {
  font-size: 24px;
}

.kundli-page .nav {
  gap: 10px;
  font-size: 13px;
}

.match-hero {
  display: block;
  padding: 72px 0 36px;
}

.match-intro,
.match-summary,
.results-card,
.person-card,
.profile-card {
  display: grid;
  gap: 14px;
}

.match-form-shell {
  width: 100%;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 250, 241, .98), rgba(246, 235, 219, .98));
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(79, 63, 41, .12);
  min-width: 0;
}

.match-form-shell .eyebrow {
  font-size: 13px;
  letter-spacing: .18em;
  margin-bottom: 12px;
}

.match-form-shell h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.match-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.match-person {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(184, 138, 59, 0.16);
  background: linear-gradient(180deg, rgba(255, 252, 246, .98), rgba(246, 237, 223, .96));
  box-shadow: 0 10px 24px rgba(79, 63, 41, .06);
}

.match-person .chart-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.match-person .chart-form label {
  display: grid;
  gap: 6px;
}

.match-person .chart-form input {
  width: 100%;
}

.form-subhead {
  margin: 8px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
}


.match-summary {
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 251, 246, .98), rgba(246, 237, 223, .98));
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(79, 63, 41, .12);
}

.match-summary h3,
.person-card h3,
.profile-card h3,
.results-card h3 {
  margin: 0;
}

.summary-list {
  display: grid;
  gap: 12px;
}

.summary-list div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.summary-list strong {
  display: block;
  margin-bottom: 4px;
}

.summary-list span,
.form-hint,
.field-note,
.result-note,
.profile-place {
  color: var(--muted);
  line-height: 1.6;
}

.match-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.person-card {
  padding: 24px;
}

.person-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.person-fields .full,
.match-actions {
  grid-column: 1 / -1;
}

.match-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
  grid-column: 1 / -1;
}

.results-shell {
  margin-top: 20px;
}

.results-shell .results-card {
  width: 100%;
  min-width: 0;
}

.results-card {
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 248, 239, .98), rgba(255, 255, 255, .98));
  border-color: rgba(184, 138, 59, .18);
  box-shadow: 0 14px 34px rgba(79, 63, 41, .08);
  min-width: 0;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.score-pill {
  min-width: 112px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(184, 138, 59, 0.12);
  border: 1px solid rgba(184, 138, 59, 0.18);
  font: 700 34px/1 Inter, system-ui, sans-serif;
  color: var(--gold);
  text-align: center;
}

.results-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.results-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.98);
  border: 1px solid rgba(184, 138, 59, .12);
  box-shadow: 0 10px 20px rgba(62, 46, 20, .05);
}

.match-summary-table-wrap {
  margin-top: 10px;
  overflow: auto;
}

.match-summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 250, 241, 0.98);
  border: 1px solid rgba(184, 138, 59, .18);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(79, 63, 41, .07);
}

.match-summary-table thead th {
  background: linear-gradient(180deg, rgba(248, 236, 214, .98), rgba(242, 228, 200, .98));
  color: #5b4520;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  border-bottom: 1px solid rgba(184, 138, 59, .18);
}

.match-summary-table th,
.match-summary-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(79, 63, 41, 0.08);
  text-align: left;
  font-size: 13px;
}

.match-summary-table td[colspan="2"] {
  padding: 14px;
}

.summary-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  justify-items: start;
}

.summary-pair > div {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 253, 249, .98), rgba(248, 239, 223, .98));
  border: 1px solid rgba(184, 138, 59, .16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  text-align: left;
}

.summary-pair span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.summary-pair strong {
  display: block;
  color: #23190d;
  font-size: 18px;
  line-height: 1.15;
}

.match-summary-table tbody tr:nth-child(even) td {
  background: rgba(255, 248, 239, .7);
}

.match-summary-table tbody tr:last-child td {
  border-bottom: 0;
}

.match-summary-table td:first-child {
  font-weight: 600;
  color: #33270f;
}

.match-summary-table td:last-child,
.match-summary-table th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.match-summary-table .strong-score {
  color: var(--gold);
  font-weight: 700;
}

.match-outlook {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(184, 138, 59, .16);
  background: linear-gradient(180deg, rgba(255, 252, 246, .98), rgba(246, 237, 223, .95));
  box-shadow: 0 10px 22px rgba(79, 63, 41, .06);
}

.match-outlook h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.match-outlook p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.65;
}

.match-outlook ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.breakdown-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 250, 241, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(62, 46, 20, .05);
}

.breakdown-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.breakdown-item strong {
  font-size: 18px;
}

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

.profile-card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 251, 246, .98), rgba(246, 237, 223, .98));
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(79, 63, 41, .08);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-table,
.profile-key-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-table td,
.profile-key-table td,
.profile-key-table th {
  padding: 8px 0;
  border-bottom: 1px solid rgba(79, 63, 41, 0.08);
  text-align: left;
  font-size: 13px;
}

.profile-key-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.result-note {
  padding-top: 4px;
}

@media (max-width: 900px) {
  .match-hero,
  .match-split-grid,
  .profile-grid,
  .breakdown-grid {
    grid-template-columns: 1fr;
  }

  .score-row {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .match-hero {
    padding-top: 56px;
  }

  .results-card,
  .match-form-shell,
  .match-summary,
  .profile-card,
  .match-person {
    padding: 20px;
  }

  .summary-pair {
    grid-template-columns: 1fr;
  }
}

.results-card h2 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.results-card .lead {
  max-width: 60ch;
}

.results-card .score-row {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.results-card .breakdown-grid {
  margin-top: 4px;
}

.results-card .profile-grid {
  margin-top: 6px;
}

.results-card .result-note {
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.match-form-shell .chart-form {
  margin-top: 18px;
}

.match-form-shell .chart-form > label,
.match-form-shell .chart-form > h3,
.match-form-shell .chart-form > button {
  width: 100%;
}

.match-form-shell .chart-form > button {
  margin-top: 6px;
}

.match-form-shell .chart-form input,
.match-form-shell .chart-form select {
  background: #fffaf1;
}

.match-form-shell .chart-form .full {
  grid-column: 1 / -1;
}

.match-form-shell .chart-form .form-subhead {
  grid-column: 1 / -1;
}

.match-form-shell .chart-form .btn.full {
  grid-column: 1 / -1;
}

.results-card .score-row {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.results-card .results-meta {
  padding-top: 4px;
}

.results-card .breakdown-grid,
.results-card .profile-grid {
  margin-top: 6px;
}

.results-card .result-note {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
