/* Public topic pages (jee-ai-tutor, bitsat, ncert-doubt-solver, class-10).
   Same quiet look as the app: dashboard tokens, one column, no decoration. */
:root {
  --bg: #ffffff; --page: #f0f4f9; --surface: #f0f4f9; --text: #1f1f1f; --muted: #5f6368;
  --faint: rgba(31, 31, 31, 0.08); --accent: #0f9f6e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1e1f20; --page: #131314; --surface: #282a2c; --text: #e3e3e3; --muted: #9aa0a6; --faint: rgba(255, 255, 255, 0.08); --accent: #34d399; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.sp-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 16px; background: color-mix(in srgb, var(--page) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--faint); }
.sp-word { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.04em; text-decoration: none; }
.sp-word i { display: inline-block; width: 6px; height: 6px; margin-left: 2px; border-radius: 50%; background: var(--accent); }
.sp-nav { display: flex; gap: 8px; }
.sp-btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--faint);
  background: var(--bg); color: var(--text); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.sp-btn:hover { border-color: var(--muted); }
.sp-btn.primary { background: var(--text); color: var(--page); border-color: var(--text); }
.sp-btn.primary:hover { opacity: 0.88; }

main { max-width: 760px; margin: 0 auto; padding: 40px 16px 72px; }
.sp-kicker { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
h1 { margin: 0 0 16px; font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-size: clamp(2rem, 6vw, 3rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.04em; }
.sp-lead { margin: 0 0 24px; font-size: 1.1rem; color: var(--muted); max-width: 620px; }
.sp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.sp-cta .sp-btn { height: 44px; padding: 0 18px; font-size: 0.95rem; }

section { margin: 0 0 18px; padding: 26px 28px; border-radius: 16px; background: var(--bg); border: 1px solid var(--faint); }
h2 { margin: 0 0 12px; font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
section p { margin: 0 0 12px; }
section p:last-child { margin-bottom: 0; }
ul.sp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
ul.sp-list li { position: relative; padding-left: 20px; }
ul.sp-list li::before { content: ""; position: absolute; left: 2px; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
ol.sp-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.sp-example { margin-top: 6px; padding: 16px 18px; border-radius: 12px; background: var(--surface); font-size: 0.95rem; }
.sp-example b { display: block; margin-bottom: 6px; }
.sp-q { font-weight: 600; margin-bottom: 8px; }

details { border-top: 1px solid var(--faint); padding: 12px 0; }
details:first-of-type { border-top: none; padding-top: 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 8px 0 0; color: var(--muted); }

.sp-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.sp-more a { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--faint); background: var(--bg); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.sp-more a span { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.sp-more a:hover { border-color: var(--muted); }

footer { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 14px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }
@media (max-width: 560px) { section { padding: 20px 18px; } .sp-nav .sp-btn:not(.primary) { display: none; } }
