/* Sarvam Ekam blog: same tokens as sarvamekam.in (watercolour paper, indigo ink, violet, gold). */
:root {
  color-scheme: light;
  --paper: #FDFBF7; --paper-2: #F7F2EA; --ink: #1F1752; --ink-2: #4A4566; --ink-3: #777190;
  --violet: #7B6FF5; --gold: #E2B24A; --terr: #B4532A; --navy: #122136; --sage: #6E8B5B;
  --line: rgba(31, 23, 82, 0.10); --lav-wash: #F2EEF8;
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body: "Nunito Sans", "Avenir Next", system-ui, sans-serif;
  --brand: "Sora", "Avenir Next", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { background: var(--paper); color: var(--ink-2); font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); font-weight: 500; line-height: 1.12; text-wrap: balance; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 32px; }
em.v, h1 em, .cta h2 em { font-style: italic; color: var(--violet); font-weight: 400; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 40; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 30; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--violet), var(--gold)); }

/* Header + footer (as on /voices) */
header.site { position: sticky; top: 0; z-index: 20; background: rgba(253, 251, 247, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand b { display: block; font: 700 21px/1.1 var(--brand); color: var(--ink); letter-spacing: -.01em; }
.brand small { display: block; font: 600 10px/1.6 var(--brand); letter-spacing: .22em; text-transform: uppercase; color: #6B5EAE; white-space: nowrap; }
.nav .links { display: flex; align-items: center; gap: 28px; }
.nav .links a { text-decoration: none; font: 400 18px/1 var(--display); color: var(--ink); }
.nav .links a:hover, .nav .links a[aria-current="page"] { color: var(--violet); }
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border: 0; cursor: pointer;
  font: 500 17px/1 var(--display); padding: 15px 26px; border-radius: 999px; background: var(--ink); color: #fff;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); background: #2E2470; box-shadow: 0 10px 24px rgba(31,23,82,.18); }
.nav .links a.btn { color: #fff; }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #EBC266; }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
footer.site { background: var(--navy); color: rgba(255,255,255,.75); padding: 34px 0; font-size: 15px; }
footer.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
footer.site .brand b { color: #fff; }
footer.site .brand small { color: rgba(255,255,255,.6); }
footer.site a { color: #fff; text-decoration: none; }
.f-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.f-links a { opacity: .85; } .f-links a:hover { opacity: 1; text-decoration: underline; }

.chip { display: inline-block; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: #6B5EAE; background: var(--lav-wash); padding: 7px 11px; border-radius: 999px; text-decoration: none; margin-right: 6px; }
.chip.draft { color: var(--terr); background: #FBE9DF; }
.kicker { display: inline-block; font: 700 13px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--terr); }
.draft-bar { background: #FBE9DF; color: var(--terr); text-align: center; padding: 10px 16px; font-weight: 700; font-size: 15px; }

/* Index */
.b-hero { padding: 72px 0 40px; background:
  radial-gradient(60% 80% at 92% 0%, rgba(226,178,74,.20), transparent 60%),
  radial-gradient(50% 70% at 0% 20%, rgba(123,111,245,.14), transparent 60%), var(--paper); }
.b-hero h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -.02em; margin: 14px 0 18px; max-width: 14ch; }
.b-hero p { font-size: 19px; max-width: 62ch; color: var(--ink-2); }
.filters { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; margin-top: 34px; }
.search input { width: min(340px, 100%); font: 400 16px var(--body); padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.search { flex: 0 1 340px; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats button { border: 1px solid var(--line); background: #fff; padding: 10px 16px; border-radius: 999px; cursor: pointer; font: 600 15px var(--body); color: var(--ink); }
.cats button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.list { padding: 24px 32px 88px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; margin-top: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: 0 14px 36px rgba(31,23,82,.06); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(31,23,82,.12); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-img { aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img.blank { background: linear-gradient(135deg, var(--lav-wash), #FBF0D8); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 25px; }
.card p { font-size: 16px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.card .chips .chip { margin: 0; }
.card .meta { margin-top: auto; font-size: 14px; color: var(--ink-3); }
.card.featured .card-link { display: grid; grid-template-columns: 1.25fr 1fr; }
.card.featured .card-img { aspect-ratio: auto; min-height: 340px; }
.card.featured .card-body { padding: 40px 44px; justify-content: center; gap: 14px; }
.card.featured h2 { font-size: clamp(30px, 3.2vw, 42px); }
.card.featured p { font-size: 18px; -webkit-line-clamp: 4; }
.empty { text-align: center; padding: 48px 0; color: var(--ink-3); }

/* Post */
.post-head { max-width: 880px; padding-top: 44px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink-3); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--violet); }
.post h1 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -.02em; margin: 18px 0 16px; }
.dek { font: 400 clamp(19px, 2vw, 23px)/1.5 var(--display); color: var(--ink-2); }
.byline { display: flex; align-items: center; gap: 14px; margin: 26px 0 8px; font-size: 15px; color: var(--ink-3); }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.byline a { color: var(--ink); font-weight: 700; text-decoration: none; }
.cover { margin: 30px auto 0; }
.cover img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 28px; box-shadow: 0 24px 60px rgba(31,23,82,.10); }
.cover figcaption, .prose figcaption { font-size: 14px; color: var(--ink-3); text-align: center; margin-top: 10px; }
.post-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 64px; justify-content: center; padding-top: 48px; padding-bottom: 72px; }
.toc { position: sticky; top: 104px; align-self: start; font-size: 15px; border-left: 2px solid var(--line); padding-left: 18px; }
.toc b { display: block; font: 700 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--terr); margin-bottom: 14px; }
.toc ol { list-style: none; display: grid; gap: 10px; }
.toc a { text-decoration: none; color: var(--ink-2); line-height: 1.35; display: block; }
.toc a:hover, .toc a.on { color: var(--violet); }
.prose { font-size: 19px; line-height: 1.75; color: #3A3556; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(28px, 3vw, 36px); margin-top: 1.9em; letter-spacing: -.015em; }
.prose h3 { font-size: 25px; margin-top: 1.6em; }
.prose h4 { font: 700 19px/1.3 var(--body); color: var(--ink); margin-top: 1.4em; }
.prose a { color: #4F43C9; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .45em; }
.prose li::marker { color: var(--gold); font-weight: 700; }
.prose blockquote { border-left: 4px solid var(--gold); background: #FBF5E6; padding: 18px 24px; border-radius: 0 18px 18px 0; font: italic 400 22px/1.55 var(--display); color: var(--ink); }
.prose figure img { border-radius: 20px; width: 100%; }
.prose code { background: var(--paper-2); padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.prose pre { background: var(--navy); color: #EDEAF9; padding: 18px 20px; border-radius: 16px; overflow-x: auto; font-size: 15px; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.2em 0; }
.faq { margin-top: 2.4em; }
.faq details { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 16px 22px; margin-top: 12px; }
.faq summary { cursor: pointer; font: 600 19px/1.4 var(--display); color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--violet); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; font-size: 17px; }
.tags { margin-top: 2.2em; display: flex; flex-wrap: wrap; gap: 8px; }
.letters-link { margin-top: 1.4em; font-family: var(--display); font-style: italic; font-size: 18px; }
.letters-link a { color: var(--violet, #6B5EE0); text-decoration: none; }
.letters-link a:hover { text-decoration: underline; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 1.6em; font-size: 15px; }
.share span { font-weight: 700; color: var(--ink); margin-right: 4px; }
.share a, .share button { text-decoration: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 15px; cursor: pointer; color: var(--ink); font-size: 15px; }
.share a:hover, .share button:hover { border-color: var(--violet); color: var(--violet); }
.author-box { display: flex; gap: 22px; align-items: flex-start; margin-top: 2.4em; padding: 26px 28px; background: var(--lav-wash); border-radius: 24px; }
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; }
.author-box b { font: 700 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--terr); }
.author-box h3 { font-size: 24px; margin: 6px 0 6px; }
.author-box p { font-size: 16px; margin: 0; }
.author-box a { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 15px; }
.cta { background: var(--navy); color: rgba(255,255,255,.82); padding: 72px 0; text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.cta h2 { color: #fff; font-size: clamp(32px, 4vw, 48px); }
.cta h2 em { color: #C9C2FF; }
.cta p { max-width: 620px; margin: 16px auto 28px; font-size: 18px; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.related { padding: 72px 32px 88px; }
.related h2 { font-size: 36px; }

/* WhatsApp button (same on every page) */
.wa-float { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 18;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25D366; color: #fff;
  box-shadow: 0 6px 18px rgba(18, 33, 54, .28); transition: transform .18s ease, box-shadow .18s ease; -webkit-tap-highlight-color: transparent; }
.wa-float:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 24px rgba(18, 33, 54, .32); }
.wa-float svg { width: 31px; height: 31px; }
.wa-float .wa-tip { position: absolute; right: 70px; white-space: nowrap; padding: 8px 13px; border-radius: 10px; background: #1F1752; color: #fff;
  font: 700 14px/1 var(--body); opacity: 0; transform: translateX(6px); transition: opacity .18s, transform .18s; pointer-events: none; }
.wa-float:hover .wa-tip { opacity: 1; transform: none; }

@media (max-width: 1100px) { .nav .links { gap: 20px; } .brand small { display: none; } }
@media (max-width: 980px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .toc { position: static; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 18px 20px; margin-bottom: 28px; }
  .post-grid > aside:empty { display: none; }
  .card.featured .card-link { grid-template-columns: 1fr; }
  .card.featured .card-img { min-height: 0; aspect-ratio: 16 / 9; }
  .card.featured .card-body { padding: 26px 26px 30px; }
}
@media (max-width: 920px) { .nav .links a.home:not(.blog) { display: none; } }
@media (max-width: 640px) {
  .wrap, .list, .related { padding-inline: 16px; }
  .nav { height: 64px; } .brand img { width: 36px; height: 36px; } .brand b { font-size: 18px; }
  .nav .links { gap: 14px; } .btn { padding: 12px 18px; font-size: 16px; }
  .b-hero { padding: 44px 0 24px; } .b-hero p { font-size: 17px; }
  .search { flex-basis: 100%; } .search input { width: 100%; }
  .prose { font-size: 18px; }
  .cover { padding-inline: 0; } .cover img { border-radius: 0; }
  .author-box { flex-direction: column; padding: 22px; }
  .wa-float { width: 52px; height: 52px; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .wa-float svg { width: 28px; height: 28px; } .wa-float .wa-tip { display: none; }
}
@media (max-width: 380px) { .nav .links a.btn { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { header.site, footer.site, .wa-float, .cta, .related, .share, .toc, .progress { display: none !important; } .post-grid { display: block; } }
