/* Swara Prasannam — public guide page (scoped under .sg) */
.sg {
  --sg-ink: #2a1a10;
  --sg-soft: #5b4636;
  --sg-kumkum: #8f1a1a;
  --sg-deep: #6e1010;
  --sg-brass: #b8862b;
  --sg-cream: #fdf8ee;
  --sg-line: #ead9b5;
  --sg-moon: #2f6fa8;
  --sg-sun: #c8461f;
  --sg-both: #6b4fa8;
  font-family: "Noto Sans Tamil", "Latha", "Tamil Sangam MN", system-ui, sans-serif;
  font-size: clamp(16px, 15.2px + 0.35vw, 18.4px);
  line-height: 1.75;
  color: var(--sg-ink);
}
.sg *, .sg *::before, .sg *::after { box-sizing: border-box; }

/* language switch: Tamil default */
html:not([data-glang="en"]) .sg [data-l="en"],
html[data-glang="en"] .sg [data-l="ta"] { display: none !important; }

.sg-langbar { display: flex; justify-content: flex-end; margin: 0 0 1em; }
.sg-langbar .sg-switch { display: inline-flex; border: 2px solid var(--sg-kumkum); border-radius: 999px; overflow: hidden; }
.sg-langbar button { font: inherit; font-weight: 700; border: 0; background: #fff; color: var(--sg-kumkum); padding: .35em 1.1em; cursor: pointer; min-height: 44px; }
.sg-langbar button[aria-pressed="true"] { background: var(--sg-kumkum); color: #fff; }

.sg h1 { font-family: "Noto Serif Tamil", Georgia, serif; font-size: clamp(1.55em, 1.2em + 1.4vw, 2.2em); line-height: 1.3; color: var(--sg-deep); margin: 0 0 .4em; }
.sg h2 { font-family: "Noto Serif Tamil", Georgia, serif; font-size: 1.35em; line-height: 1.35; color: var(--sg-deep); margin: 0 0 .6em; display: flex; gap: .55em; align-items: center; }
.sg h3 { font-size: 1.08em; color: var(--sg-deep); margin: 1.1em 0 .4em; line-height: 1.4; }
.sg p { margin: 0 0 .8em; }
.sg ul, .sg ol { margin: 0 0 .9em; padding-left: 1.3em; }
.sg li { margin-bottom: .45em; }
.sg strong { color: #000; }

.sg-hero {
  display: grid; gap: 1.2em; align-items: center; grid-template-columns: minmax(0, 1fr);
  background: radial-gradient(circle at 85% 30%, #fff1cf, var(--sg-cream) 60%); border: 1px solid var(--sg-line);
  border-radius: 14px; padding: clamp(1em, 3vw, 1.8em); margin-bottom: 1.6em;
}
@media (min-width: 700px) { .sg-hero { grid-template-columns: minmax(0, 1fr) 170px; } }
.sg-hero .sg-lead { font-size: 1.08em; color: var(--sg-soft); }
.sg-hero img { width: 100%; max-width: 170px; margin-inline: auto; display: block; filter: drop-shadow(0 8px 18px rgb(120 60 10 / .25)); }

.sg-cta {
  display: inline-block; background: linear-gradient(180deg, #a52020, var(--sg-deep)); color: #fff !important; font-weight: 700;
  padding: .7em 1.4em; border-radius: 999px; text-decoration: none !important; box-shadow: 0 6px 16px rgb(110 16 16 / .28); margin-top: .3em;
}
.sg-cta:hover { filter: brightness(1.08); }

.sg-toc { background: #fff; border: 1px dashed var(--sg-brass); border-radius: 12px; padding: .9em 1.1em; margin-bottom: 1.8em; }
.sg-toc ol { columns: 2 14em; margin: .3em 0 0; }
.sg-toc a { color: var(--sg-kumkum); font-weight: 700; text-decoration: none; }
.sg-toc a:hover { text-decoration: underline; }

.sg-section { margin: 0 0 2.2em; scroll-margin-top: 1em; }
.sg-num {
  display: inline-grid; place-items: center; flex-shrink: 0; width: 1.9em; height: 1.9em; border-radius: 50%;
  background: #f3d991; color: var(--sg-deep); font-size: .8em;
}

.sg-figure { margin: 1em 0 1.3em; background: #fff; border: 1px solid var(--sg-line); border-radius: 12px; padding: .8em; }
.sg-figure svg { width: 100%; height: auto; display: block; }
.sg-figure figcaption { font-size: .88em; color: var(--sg-soft); text-align: center; margin-top: .4em; }

.sg-cards { display: grid; gap: .8em; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14em), 1fr)); margin: .6em 0 1em; }
.sg-card { background: #fffaf0; border: 1px solid var(--sg-line); border-radius: 12px; padding: .85em 1em; }
.sg-card h3 { margin-top: 0; display: flex; gap: .5em; align-items: center; }
.sg-card svg { width: 2.2em; height: 2.2em; flex-shrink: 0; }
.sg-card p:last-child { margin-bottom: 0; }

.sg-three { display: grid; gap: .8em; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12em), 1fr)); margin: .6em 0 1em; }
.sg-three .sg-card { border-top: 5px solid var(--c, var(--sg-brass)); }

.sg-timeline { list-style: none; padding: 0; margin: .5em 0 1em; position: relative; }
.sg-timeline::before { content: ""; position: absolute; left: .85em; top: .3em; bottom: .3em; width: 3px; background: linear-gradient(var(--sg-brass), var(--sg-kumkum)); border-radius: 2px; }
.sg-timeline li { position: relative; padding: 0 0 .9em 2.6em; }
.sg-timeline li::before { content: ""; position: absolute; left: .35em; top: .45em; width: 1.05em; height: 1.05em; border-radius: 50%; background: #fff; border: 3px solid var(--sg-kumkum); }
.sg-timeline .when { display: block; font-weight: 700; color: var(--sg-kumkum); font-size: .92em; }

.sg-rites { counter-reset: rite; list-style: none; padding: 0; }
.sg-rites li { counter-increment: rite; position: relative; padding: .7em .9em .7em 3em; background: #fffaf0; border: 1px solid var(--sg-line); border-radius: 10px; margin-bottom: .6em; }
.sg-rites li::before { content: counter(rite); position: absolute; left: .8em; top: .7em; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--sg-kumkum); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9em; }

.sg-steps { display: grid; gap: .9em; margin: .7em 0 1em; }
.sg-step { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: .9em; align-items: start; background: #fff; border: 2px solid var(--sg-line); border-radius: 12px; padding: .9em; }
.sg-step svg { width: 4.2em; height: 4.2em; }
.sg-step h3 { margin: 0 0 .25em; }
.sg-step p { margin: 0; }
.sg-step .tip { display: block; margin-top: .4em; font-size: .9em; color: var(--sg-soft); }

.sg-table-wrap { overflow-x: auto; }
.sg-table { width: 100%; border-collapse: collapse; min-width: 30em; margin: .5em 0 1em; }
.sg-table th, .sg-table td { padding: .55em .7em; border-bottom: 1px solid var(--sg-line); text-align: left; vertical-align: top; }
.sg-table thead th { background: var(--sg-deep); color: #fff; }
.sg-table tbody tr:nth-child(even) td, .sg-table tbody tr:nth-child(even) th { background: #fffaf0; }
.sg-dot { display: inline-block; width: .85em; height: .85em; border-radius: 50%; margin-right: .4em; vertical-align: middle; border: 1px solid #0003; }

.sg-why { background: linear-gradient(135deg, #fff7e6, #fdf1dc); border: 2px solid var(--sg-brass); border-radius: 14px; padding: 1.1em 1.2em; }
.sg-why ul { list-style: none; padding: 0; }
.sg-why li { padding-left: 1.8em; position: relative; }
.sg-why li::before { content: "✔"; position: absolute; left: 0; color: #2f6b3a; font-weight: 700; }

.sg-note { background: #f4f6fb; border-left: 5px solid #4a5f8f; padding: .8em 1em; border-radius: 8px; font-size: .95em; }
.sg-warn { background: #fff1ef; border-left: 5px solid var(--sg-kumkum); padding: .8em 1em; border-radius: 8px; font-size: .95em; }

.sg details { border: 1px solid var(--sg-line); border-radius: 10px; margin-bottom: .5em; background: #fff; }
.sg summary { cursor: pointer; padding: .7em .9em; font-weight: 700; }
.sg details > div { padding: 0 .9em .8em; }

.sg-refs { font-size: .9em; color: var(--sg-soft); }
.sg-refs a { color: var(--sg-kumkum); word-break: break-word; }

.sg-final { text-align: center; background: var(--sg-cream); border: 1px solid var(--sg-line); border-radius: 14px; padding: 1.3em; }
