/* Panchangly - site stylesheet. System font stack, no external assets. */

:root {
  --max-w: 1100px;
  --ink: #241a12;
  --ink-soft: #5b4a3a;
  --brand: #7a3b12;
  --brand-ink: #ffffff;
  --line: #e4d8c9;
  --bg: #fdfbf7;
  --card: #ffffff;
  --ok: #1f6b3a;
  --bad: #8c2f1f;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  background: var(--card);
  padding: 6px 10px;
  z-index: 10;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-head {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand);
}
.nav-btn {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  color: var(--ink);
}
.site-nav { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--ink); font-weight: 500; }
.site-nav a[aria-current="page"] { color: var(--brand); }

/* Content */
main { padding: 18px 16px 30px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.2rem; margin: 1.6em 0 0.5em; }
h3 { font-size: 1rem; margin: 0 0 0.4em; }

.answer {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 18px;
}

.crumb { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 6px; }
.crumb a { color: var(--ink-soft); }

/* Tables collapse into cards on small screens: no horizontal scrolling */
.tbl { margin: 0 0 8px;  overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
thead th {
  background: #f4ede2;
  border-bottom: 2px solid var(--line);
  font-weight: 600;
}
tbody th { font-weight: 600; color: var(--ink-soft); width: 40%; }
td[data-field] { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  thead { display: none; }
  table, tbody, tr, td, tbody th { display: block; width: 100%; }
  table, .tbl { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  tbody tr { border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  tbody th { width: auto; background: #f4ede2; border-bottom: 1px solid var(--line); }
  td { border-bottom: 0; }
}

/* Cards and chips */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 0 0 10px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
}
.card:hover { border-color: var(--brand); text-decoration: none; }
.card-t { font-weight: 650; color: var(--brand); }
.card-d { color: var(--ink-soft); font-size: 0.94rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.chips .chip { padding: 4px 12px; min-height: 32px; display: inline-flex; align-items: center; }
.chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.92rem;
  color: var(--ink);
}
.chip:hover { border-color: var(--brand); text-decoration: none; }

/* Ad slot (reserved, empty during development) */
.responsive { min-height: 0; }

/* Footer */
.site-foot {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 20px 0 26px;
  margin-top: 20px;
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.foot-col a { display: block; color: var(--ink); font-size: 0.94rem; padding: 2px 0; }
.foot-note { color: var(--ink-soft); font-size: 0.88rem; max-width: 70ch; }
.foot-copy { color: var(--ink-soft); font-size: 0.9rem; }
.foot-copy a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.foot-copy a:hover { color: var(--ink); }
.foot-sep { margin: 0 6px; opacity: 0.6; }

@media (max-width: 720px) {
  .nav-btn { display: block; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    margin-left: 0;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0 2px;
  }
  .site-nav.open { display: flex; }
}

/* Staleness banner (injected by app.js when build date < visitor date) */
.stale-note{background:#fef3c7;border:1px solid #eed48d;color:#7a4b0a;border-radius:8px;padding:10px 14px;font-size:14px;margin:0 0 14px}

/* Visible FAQ block (rendered from the same Q&A as the FAQPage JSON-LD) */
.faq-block { margin: 22px 0; }
.faq-block h2 { margin-bottom: 10px; }
.faq-block dt { font-weight: 700; color: var(--ink); margin-top: 12px; }
.faq-block dd { margin: 4px 0 0 0; color: var(--ink-soft); }

/* Current Choghadiya segment highlight */
tr.now-active td, tr.now-active th { background: #e9f6ee; }
tr.now-active .now-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 10px; background: #0d7a4f; color: #fff; font-size: 0.72rem; font-weight: 700; }
