/* Vastu Shastra public guides — aligned with books / guide-system */

.vs-page {
  --vs-ink: #1c1917;
  --vs-muted: #57534e;
  --vs-line: rgba(28, 25, 23, 0.12);
  --vs-accent: #0f766e;
  --vs-deep: #134e4a;
  --vs-surface: #f4f7f6;
  --vs-card: #ffffff;
  --vs-display: Fraunces, "Noto Serif Devanagari", Georgia, serif;
  --vs-body: Outfit, "Noto Sans Devanagari", system-ui, sans-serif;
  font-family: var(--vs-body);
  color: var(--vs-ink);
  background:
    linear-gradient(180deg, #e8f0ee 0%, var(--vs-surface) 12rem, #eef2f1 100%);
}

.vs-wrap { max-width: 54rem; }

.vs-hero h1 {
  font-family: var(--vs-display);
  color: var(--vs-deep);
}

.vs-block {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--vs-line);
}

.vs-block h2 {
  font-family: var(--vs-display);
  font-size: 1.55rem;
  color: var(--vs-deep);
  margin: 0 0 0.65rem;
}

.vs-block h3 {
  font-size: 1.05rem;
  margin: 1rem 0 0.35rem;
  color: var(--vs-deep);
}

.vs-lede,
.vs-muted {
  color: var(--vs-muted);
  line-height: 1.65;
}

.vs-principles {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.7;
}

.vs-mandala-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.vs-mandala-grid article {
  padding: 0.85rem 1rem;
  background: var(--vs-card);
  border: 1px solid var(--vs-line);
  border-top: 3px solid var(--vs-accent);
}

.vs-mandala-grid strong { display: block; font-family: var(--vs-display); }
.vs-mandala-grid span { display: block; font-size: 0.85rem; color: var(--vs-accent); font-weight: 600; }
.vs-mandala-grid em { display: block; font-style: normal; font-size: 0.9rem; color: var(--vs-muted); margin-top: 0.35rem; }

.vs-zone-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}

.vs-zone {
  padding: 1rem;
  background: var(--vs-card);
  border: 1px solid var(--vs-line);
  border-radius: 0.35rem;
}

.vs-zone header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.65rem;
}

.vs-zone-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--vs-deep);
  border-radius: 0.25rem;
}

.vs-zone header strong { font-family: var(--vs-display); }
.vs-zone header em { font-style: normal; color: var(--vs-muted); font-size: 0.9rem; }
.vs-zone ul { margin: 0.25rem 0 0.5rem; padding-left: 1.1rem; font-size: 0.92rem; }
.vs-avoid { color: #9a3412; }

.vs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 0.75rem 0 1rem;
}

.vs-toolbar input[type="search"] {
  min-width: min(100%, 18rem);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--vs-line);
  border-radius: 0.35rem;
  font: inherit;
}

.vs-count { margin: 0; color: var(--vs-muted); font-size: 0.9rem; }

.vs-topic-grid {
  display: grid;
  gap: 0.85rem;
}

.vs-topic-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.85rem;
  row-gap: 0.25rem;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  background: var(--vs-card);
  border: 1px solid var(--vs-line);
  border-left: 4px solid var(--vs-accent);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vs-topic-card:hover {
  border-color: color-mix(in srgb, var(--vs-accent) 45%, var(--vs-line));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.vs-topic-num {
  grid-row: 1 / span 2;
  align-self: start;
  font-weight: 700;
  color: var(--vs-accent);
  font-variant-numeric: tabular-nums;
}

.vs-topic-card strong {
  font-family: var(--vs-display);
  font-size: 1.05rem;
  color: var(--vs-deep);
}

.vs-topic-card em {
  grid-column: 2;
  font-style: normal;
  font-size: 0.92rem;
  color: var(--vs-muted);
  line-height: 1.5;
}

.vs-topic-card.is-hidden { display: none; }

.vs-remedy-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.vs-remedy-grid article {
  padding: 0.9rem 1rem;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.vs-remedy-grid strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--vs-display);
  color: var(--vs-deep);
}

.vs-more { margin-top: 1rem; }
.vs-more a { color: var(--vs-accent); font-weight: 600; text-decoration: none; }
.vs-more a:hover { text-decoration: underline; }

.vs-kv-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.vs-kv-grid article {
  padding: 0.85rem 1rem;
  background: var(--vs-card);
  border: 1px solid var(--vs-line);
}

.vs-kv-grid strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--vs-deep);
  font-size: 0.95rem;
}

.vs-rule { margin-bottom: 1.5rem; }

.vs-zone-mini-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.vs-zone-mini-grid article {
  padding: 0.85rem;
  background: var(--vs-card);
  border: 1px solid var(--vs-line);
  font-size: 0.92rem;
}

.vs-zone-mini-grid header {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.vs-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vs-muted);
}

.vs-faq details {
  margin-bottom: 0.65rem;
  padding: 0.75rem 1rem;
  background: var(--vs-card);
  border: 1px solid var(--vs-line);
}

.vs-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--vs-deep);
}

.vs-verdict {
  margin-top: 0.65rem;
  color: var(--vs-accent);
}

.vs-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--vs-line);
}

.vs-pager a {
  color: var(--vs-accent);
  font-weight: 600;
  text-decoration: none;
}

.vs-pager a:hover { text-decoration: underline; }

.vs-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vs-related-links a {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--vs-line);
  border-radius: 999px;
  color: var(--vs-deep);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--vs-card);
}

.vs-related-links a:hover {
  border-color: var(--vs-accent);
  color: var(--vs-accent);
}

@media (max-width: 560px) {
  .vs-topic-card {
    grid-template-columns: 1fr;
  }
  .vs-topic-num { grid-row: auto; }
  .vs-topic-card em { grid-column: 1; }
}

/* —— Interactive diagrams —— */
.vs-diagram-block .vs-lede { margin-bottom: 1rem; }

.vs-diagram {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(12rem, 0.85fr);
  align-items: start;
}

.vs-diagram-stage {
  padding: 0.75rem;
  background: var(--vs-card);
  border: 1px solid var(--vs-line);
  border-radius: 0.75rem;
}

.vs-diagram-stage svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 26rem;
}

.vs-diagram-panel {
  padding: 1rem 1.1rem;
  background: rgba(15, 118, 110, 0.07);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 0.75rem;
  border-top: 3px solid var(--vs-accent);
  min-height: 10rem;
}

.vs-diagram-panel h3 {
  margin: 0 0 0.5rem;
  font-family: var(--vs-display);
  font-size: 1.1rem;
  color: var(--vs-deep);
}

.vs-diagram-panel p {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--vs-ink);
}

.vs-diagram-status {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--vs-muted);
}

.vs-compass-slice {
  cursor: pointer;
  opacity: 0.88;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.vs-compass-slice:hover,
.vs-compass-slice:focus-visible,
.vs-compass-slice.is-active {
  opacity: 1;
  filter: brightness(1.08) saturate(1.1);
  outline: none;
}

.vs-compass-slice.is-active {
  stroke: #0f172a;
  stroke-width: 2.5;
}

.vs-compass-label {
  fill: #fff;
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke fill;
  stroke: rgba(15, 23, 42, 0.45);
  stroke-width: 2.5px;
}

.vs-compass-core { fill: #fef08a; stroke: #ca8a04; stroke-width: 2; }
.vs-compass-core-label {
  fill: #713f12;
  font-size: 14px;
  font-weight: 700;
  font-family: "Noto Serif Devanagari", Fraunces, serif;
}
.vs-compass-core-sub { fill: #92400e; font-size: 10px; font-weight: 600; }
.vs-compass-tick { stroke: #134e4a; stroke-width: 2; }
.vs-compass-cardinal {
  fill: var(--vs-deep);
  font-size: 12px;
  font-weight: 700;
}

.vs-house-cell {
  cursor: pointer;
  opacity: 0.9;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.vs-house-cell:hover,
.vs-house-cell:focus-visible,
.vs-house-cell.is-active {
  opacity: 1;
  filter: brightness(1.1);
  stroke: #0f172a;
  stroke-width: 3;
  outline: none;
}

.vs-house-cell.is-core { stroke: #ca8a04; stroke-width: 2; }
.vs-house-label {
  fill: #0f172a;
  font-size: 14px;
  font-weight: 700;
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 3px;
}
.vs-house-north {
  fill: var(--vs-deep);
  font-size: 12px;
  font-weight: 700;
}

.vs-zone {
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.vs-zone.is-active {
  border-color: var(--vs-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--vs-accent) 35%, transparent);
}

/* Topic figure mount */
.vs-figure-mount { margin-top: 0.5rem; }

.vs-fig {
  border: 1px solid var(--vs-line);
  border-radius: 0.85rem;
  background: var(--vs-card);
  overflow: hidden;
}

.vs-fig-head {
  padding: 0.9rem 1.1rem 0.35rem;
  text-align: center;
}

.vs-fig-head h3 {
  margin: 0;
  font-family: var(--vs-display);
  font-size: 1.2rem;
  color: var(--vs-deep);
}

.vs-fig-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--vs-muted);
}

.vs-fig-body {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(11rem, 0.8fr);
}

.vs-fig-svg-wrap {
  padding: 0.75rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(15, 118, 110, 0.06), transparent 55%),
    #f8faf9;
}

.vs-fig-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 28rem;
}

.vs-fig-panel {
  padding: 1rem 1.1rem;
  border-left: 1px solid var(--vs-line);
  background: rgba(15, 118, 110, 0.06);
  min-height: 12rem;
}

.vs-fig-panel h3 {
  margin: 0 0 0.45rem;
  font-family: var(--vs-display);
  font-size: 1.05rem;
  color: var(--vs-deep);
}

.vs-fig-panel p {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.vs-fig-hit {
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.vs-fig-hit:hover,
.vs-fig-hit:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.vs-fig-hit.is-active {
  filter: brightness(1.12) saturate(1.15);
  stroke: #0f172a !important;
  stroke-width: 3px;
}

.vs-fig-label {
  fill: #0f172a;
  font-size: 18px;
  font-weight: 700;
}
.vs-fig-sublabel {
  fill: #334155;
  font-size: 14px;
  font-weight: 600;
}
.vs-fig-label-sm {
  fill: #0f172a;
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 3px;
}
.vs-fig-callout {
  fill: #134e4a;
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .vs-diagram,
  .vs-fig-body {
    grid-template-columns: 1fr;
  }
  .vs-fig-panel {
    border-left: 0;
    border-top: 1px solid var(--vs-line);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vs-compass-slice,
  .vs-house-cell,
  .vs-fig-hit,
  .vs-zone {
    transition: none;
  }
}
