:root {
  --ink: #1c1917;
  --muted: #6b6560;
  --accent: #9a4f24;
  --accent-soft: #c45c26;
  --line: #ddd4c8;
  --paper: #fffcf8;
  --bg: #f3efe7;
  --card-blue: #e8f0f5;
  --card-sand: #f6ead3;
  --card-gray: #f4f4f5;
  --pill-good: #fde9b8;
  --pill-bad: #ececee;
  --table-head: #f6e4b8;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(28, 25, 23, 0.06);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Mukta", "Noto Sans Devanagari", "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

body { min-height: 100vh; }

body.site {
  display: flex;
  flex-direction: column;
}

.report-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 72px;
  background: transparent;
  min-height: 60vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 22px;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  margin-bottom: 16px;
}

.card.profile { background: var(--card-blue); text-align: center; }
.card.attrs { background: var(--card-sand); }
.card.soft { background: var(--card-gray); }
.card.white { background: #fff; }

.report-page .back-link {
  margin-bottom: 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.report-page .card {
  box-shadow: none;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.card.profile-card {
  background: var(--paper);
  text-align: center;
  padding: 28px 22px 16px;
}

.profile-card .avatar-wrap {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--line);
}

.profile-card .person-name {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.profile-card .person-role {
  margin: 0 0 18px;
}

.profile-card .fact-list {
  text-align: left;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.report-page h3,
.attr-stack h3,
.dasha-block h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.person-role {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.fact-list { margin: 0; }

.fact-list > div {
  display: grid;
  grid-template-columns: 7.2em 1fr;
  gap: 6px 12px;
  padding: 7px 0;
  font-size: 14px;
}

.fact-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 3px;
}

.fact-list dd {
  margin: 0;
  font-weight: 600;
}

.luck-label {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.luck-label:first-of-type { margin-top: 0; }

.report-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.report-basics {
  position: sticky;
  top: 88px;
}

.report-basics .card { margin-bottom: 0; }

.report-tabs { position: relative; }

.report-tabs > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.tab-panel { display: none; margin-bottom: 0; }

.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tab-bar label {
  flex: 1;
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
}

.tab-bar label:hover { color: var(--ink); }

#tab-attrs:checked ~ .tab-bar label[for="tab-attrs"],
#tab-charts:checked ~ .tab-bar label[for="tab-charts"],
#tab-dasha:checked ~ .tab-bar label[for="tab-dasha"],
#tab-planets:checked ~ .tab-bar label[for="tab-planets"] {
  color: var(--ink);
  background: var(--bg);
}

#tab-attrs:checked ~ .tab-panels .panel-attrs,
#tab-charts:checked ~ .tab-panels .panel-charts,
#tab-dasha:checked ~ .tab-panels .panel-dasha,
#tab-planets:checked ~ .tab-panels .panel-planets {
  display: block;
}

.luck-grid,
.chart-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.attr-stack .attr-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.attr-cell {
  border-radius: 10px;
  padding: 12px 12px 11px;
}

.attr-cell span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.attr-cell b {
  font-size: 16px;
  font-weight: 700;
}

.luck-grid .card { margin-bottom: 0; }

.chart-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
}

.chart-card .eyebrow { margin-bottom: 6px; }

.chart-card .section-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.chart-pair .kundali-wrap,
.report-main .kundali-wrap {
  max-width: 100%;
  margin: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.dasha-block {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px 22px 10px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.dasha-block .eyebrow { margin-bottom: 6px; }

.dasha-block h3 { margin-bottom: 14px; }

.report-page .shloka {
  margin: 10px 0 16px;
  padding: 10px 0 10px 14px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.report-page .phal { margin: 12px 0 4px; font-size: 15px; color: var(--ink); }

.report-main .table-card {
  margin-bottom: 16px;
  overflow: hidden;
}

.report-page .planet-table th {
  background: var(--bg);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.report-page .pills { gap: 6px; }

.report-page .pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
}

section { margin-bottom: 22px; }

.avatar-wrap {
  width: 118px;
  height: 118px;
  margin: 4px auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: #dbe7f0;
}

.avatar-svg { width: 100%; height: 100%; display: block; }

.person-name {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
}

.person-meta {
  margin: 0;
  font-size: 15px;
  color: #2d2d2d;
}

.attr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  font-size: 15.5px;
}

.attr-grid b { font-weight: 700; }

h2.section-title {
  margin: 4px 0 14px;
  font-size: 22px;
  font-weight: 700;
}

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

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
}

.pill-good { background: var(--pill-good); }
.pill-bad { background: var(--pill-bad); }

.kundali-wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.kundali-svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: "Mukta", "Noto Sans Devanagari", sans-serif;
}

.kundali-svg .k-sign {
  font-size: 17px;
  font-weight: 700;
  fill: #111;
}

.kundali-svg .k-graha {
  font-size: 15px;
  font-weight: 700;
  fill: #111;
}

.dasha-line {
  margin: 0 0 8px;
  font-size: 16px;
}

.hl { color: var(--accent); font-weight: 700; }

.phal {
  margin: 16px 0;
  font-size: 15.5px;
  color: #222;
}

.shloka {
  margin: 14px 0;
  color: #1f1f1f;
  font-style: normal;
  border: none;
  padding: 0;
}

.update-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 16px;
}

.table-card { overflow-x: auto; padding: 0; }
.table-title {
  margin: 16px 16px 0;
}
.planet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.planet-table th {
  background: var(--table-head);
  text-align: left;
  padding: 12px 10px;
  font-weight: 700;
  white-space: nowrap;
}

.planet-table td {
  padding: 11px 10px;
  border-top: 1px solid #eee;
  white-space: nowrap;
}

.planet-table th:nth-child(n+2),
.planet-table td:nth-child(n+2) { text-align: center; }

.planet-table th:last-child,
.planet-table td:last-child { text-align: right; }

.muted { color: var(--muted); font-weight: 600; }
.retro { color: var(--accent); font-weight: 700; }

.footer-note {
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  margin-top: 8px;
}

.form-grid,
.form-stack { display: grid; gap: 14px; }

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="search"],
select {
  width: 100%;
  border: 1px solid #e5e1db;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}

input:focus, select:focus {
  outline: 2px solid #f3c9a4;
  border-color: var(--accent-soft);
}

.gender-row {
  display: flex;
  gap: 10px;
}

.gender-row label {
  flex: 1;
  margin: 0;
  font-weight: 600;
  background: #f7f5f2;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.gender-row input { accent-color: var(--accent); }

.btn {
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, #e07a3d, #c45c26);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  padding: 13px 16px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(196, 92, 38, 0.25);
}

.btn:hover { filter: brightness(1.05); }

a.btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.notice {
  background: #fff7ed;
  color: #9a3412;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 14px;
}

.form-intro {
  color: var(--muted);
  margin: 0 0 18px;
}

.form-error {
  background: #fef2f2;
  color: #991b1b;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 0 0 14px;
}

.form-grid.is-loading,
.form-stack.is-loading {
  pointer-events: none;
}

.btn .btn-wait { display: none; }

.btn.is-loading .btn-label { display: none; }
.btn.is-loading .btn-wait { display: inline; }

.btn:disabled {
  cursor: wait;
  filter: none;
  opacity: 0.85;
}

.page { position: relative; }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
}

.loading-overlay[hidden] { display: none; }

.loading-card {
  width: min(280px, 100%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px 24px;
  text-align: center;
}

.loading-mark {
  width: 46px;
  height: 46px;
  display: block;
  margin: 0 auto 14px;
  animation: kundali-spin 1.2s linear infinite;
}

.loading-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.loading-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

@keyframes kundali-spin {
  to { transform: rotate(360deg); }
}

body.is-loading { overflow: hidden; }

.place-picker { display: grid; gap: 8px; }

.place-hint {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.place-search-wrap { position: relative; }

.place-results {
  position: absolute;
  z-index: 1500;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e1db;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
}

.place-results button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}

.place-results button:hover,
.place-results button:focus {
  background: #fff7ed;
  outline: none;
}

.place-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 420px) {
  .person-name { font-size: 24px; }
  .attr-grid { font-size: 14.5px; }
  .planet-table { font-size: 13.5px; }
  .planet-table th, .planet-table td { padding: 10px 8px; }
}

/* Site chrome — editorial, wide, quiet */

.site-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 239, 231, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.nav-brand .brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.site-nav nav {
  display: flex;
  gap: 22px;
}

.site-nav nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav nav a:hover,
.site-nav nav a.is-active { color: var(--accent); }

#app { flex: 1; }

.hero {
  padding: 72px 0 64px;
}

.page-hero {
  padding: 56px 0 12px;
}

.page-hero .section-display {
  max-width: 16ch;
}

.page-hero .panchanga-date {
  margin-top: 22px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.section-display,
.story-grid h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 92px);
  max-width: 14ch;
}

.hero-lead,
.section-lead,
.story-copy p,
.tool-intro p {
  color: var(--muted);
  font-size: 18px;
  max-width: 38em;
}

.hero-lead { margin: 22px 0 28px; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.btn-inline {
  width: auto;
  display: inline-flex;
  padding: 12px 22px;
  text-decoration: none;
}

.text-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.text-link:hover { color: var(--accent); border-color: var(--accent); }

.story {
  padding: 20px 0 72px;
  border-top: 1px solid var(--line);
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.story-grid h2 {
  font-size: clamp(36px, 5vw, 56px);
}

.story-copy p { margin: 0 0 16px; font-size: 17px; }

.services { padding: 0 0 72px; }

.section-display {
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 12px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.service-card {
  padding: 22px 20px 24px;
  border-top: 1px solid var(--ink);
}

.service-card span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 28px;
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.panchanga {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.panchanga-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 28px 0;
  flex-wrap: wrap;
}

.panchanga-date {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.panchanga-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rashifal { padding: 72px 0; }
.page-hero + .rashifal { padding-top: 28px; }

.rashi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.rashi-card {
  background: var(--paper);
  padding: 22px 20px 20px;
  border-radius: 4px;
}

.rashi-latin {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.rashi-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.rashi-range {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.rashi-card p:last-child {
  margin: 0;
  font-size: 15px;
  color: #3f3a36;
}

.guide-toc {
  position: sticky;
  top: 72px;
  z-index: 20;
  background: rgba(243, 239, 231, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.guide-toc-inner {
  display: flex;
  gap: 8px 22px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.guide-toc a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.guide-toc a:hover { color: var(--accent); }

.guide-block,
.guide-split,
.guide-pair {
  padding: 56px 0 8px;
}

.guide-block:nth-of-type(odd) {
  background: transparent;
}

.guide-intro {
  max-width: 40em;
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 28px;
}

.guide-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  background: var(--paper);
  padding: 24px 22px 26px;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.guide-card.is-focus {
  background: var(--card-sand);
}

.guide-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-card h3,
.guide-pair h2,
.house-grid h3,
.graha-grid h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.guide-card p {
  margin: 0;
  color: #3f3a36;
  font-size: 15px;
}

.guide-lagna {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}

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

.lagna-wheel span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  background: var(--paper);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.lagna-wheel .is-lagna {
  background: var(--card-sand);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
}

.lagna-wheel .is-lagna em {
  font-style: normal;
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.guide-lagna-visual p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

.house-grid article,
.graha-grid article {
  background: var(--paper);
  padding: 18px 16px 16px;
  border-radius: 4px;
}

.house-grid span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
}

.house-grid h3 { font-size: 20px; margin-bottom: 6px; }

.house-grid p,
.graha-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.graha-grid h3 { font-size: 24px; margin-bottom: 2px; }

.graha-sa {
  margin: 0 0 8px !important;
  font-size: 12px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent) !important;
  font-weight: 700;
}

.guide-pair { padding-bottom: 12px; }

.guide-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.guide-pair-grid article {
  background: var(--paper);
  padding: 28px 26px 30px;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.guide-pair-grid p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 16px;
}

.guide-pair-grid p:last-child { margin-bottom: 0; }

.guide-cta {
  padding: 48px 0 88px;
}

.guide-cta .section-display { max-width: 16ch; }

.guide-cta p {
  color: var(--muted);
  font-size: 18px;
  max-width: 32em;
  margin: 0 0 22px;
}

.guide .story-copy strong { color: var(--ink); font-weight: 700; }

html { scroll-padding-top: 132px; }

.tool-section {
  padding: 24px 0 88px;
  border-top: 1px solid var(--line);
}

body.site:has(.home-tool):not(.is-report) {
  min-height: 100dvh;
}

body.site:has(.home-tool):not(.is-report) #app,
body.site:has(.home-tool):not(.is-report) #view-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
}

.home,
.home-tool {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
}

.home-tool {
  margin: 0;
  padding: 28px 0 32px;
  border-top: 0;
  justify-content: center;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 48px 64px;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
}

.home-form { min-width: 0; }

.form-head {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.form-head .eyebrow {
  margin: 0 0 4px;
}

.form-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.form-board {
  background: var(--paper);
  padding: 18px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tool-panel.form-board {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.form-board .form-error {
  flex: 0 0 auto;
  margin: 0 0 10px;
}

.form-board .form-stack {
  display: grid;
  gap: 14px;
}

.form-board label {
  margin-bottom: 4px;
  font-size: 13px;
}

.form-board input[type="text"],
.form-board input[type="date"],
.form-board input[type="time"],
.form-board input[type="search"] {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
}

.form-board .gender-row { gap: 8px; }

.form-board .gender-row label {
  padding: 9px 8px;
  font-size: 14px;
  border-radius: 10px;
}

.form-board .btn {
  padding: 11px 16px;
  font-size: 16px;
  border-radius: 10px;
}

.form-board .place-picker {
  display: grid;
  gap: 0;
}

.home-copy { min-width: 0; }

.home-copy h1 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.home-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 38em;
}

.home-copy .home-lede {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
}

.home-copy a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.home-copy a:hover { border-bottom: 1px solid var(--accent); }

.home-points {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.home-points li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.home-points li:last-child { border-bottom: 1px solid var(--line); }

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.tool-panel {
  background: var(--paper);
  padding: 28px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

body.site:has(.home-tool):not(.is-report) .site-footer {
  padding: 10px 0 12px;
  flex-shrink: 0;
}

body.site:has(.home-tool):not(.is-report) .footer-inner {
  font-size: 12px;
}

body.site:has(.home-tool):not(.is-report) .nav-inner {
  min-height: 58px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner p { margin: 0; }

body.is-report .site-footer { display: none; }

@media (max-width: 900px) {
  .story-grid,
  .tool-layout,
  .home-layout,
  .service-grid,
  .rashi-grid,
  .guide-compare,
  .guide-lagna,
  .guide-pair-grid,
  .report-layout,
  .luck-grid,
  .chart-pair {
    grid-template-columns: 1fr;
  }

  .report-basics { position: static; }

  .house-grid {
    grid-template-columns: 1fr 1fr;
  }

  .graha-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-toc { top: 62px; }

  body.site:has(.home-tool):not(.is-report) #app,
  body.site:has(.home-tool):not(.is-report) #view-form,
  .home,
  .home-tool,
  .tool-panel.form-board {
    overflow: visible;
    flex: none;
    min-height: 0;
    display: block;
  }

  .home-tool {
    padding: 20px 0 40px;
  }

  .home-copy h1 { margin-bottom: 12px; }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero { padding: 48px 0 40px; }
  .nav-inner { min-height: 62px; }
}

@media (max-width: 640px) {
  .site-wrap,
  .home-layout,
  .report-shell { width: min(1120px, calc(100% - 28px)); }
  .tab-bar { overflow-x: auto; }
  .tab-bar label { white-space: nowrap; }
  .fact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .attr-grid { grid-template-columns: 1fr; }
  .site-nav nav { gap: 14px; }
  .site-nav nav a { font-size: 11px; }
  .service-grid,
  .rashi-grid,
  .house-grid,
  .graha-grid { grid-template-columns: 1fr; }
  .tool-panel,
  .tool-panel.form-board { padding: 16px; }
  .panchanga-date { font-size: 22px; }
}
