/* Desi Drip blog: same brand tokens as the app, tuned for long reading */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0c0c0c; --cream: #F6F1E7; --yellow: #FFD23F;
  --bg: var(--cream); --surface: #fffdf7; --surface-2: #ECE5D6;
  --text: var(--ink); --text-2: #2b2823; --muted: #5b554a;
  --border: rgba(12, 12, 12, 0.14); --line: var(--ink); --shadow: var(--ink);
  --link: #8a5a00;
  --font: 'Outfit', system-ui, sans-serif;
  --font-read: 'Literata', Georgia, serif;
  --font-mono: 'Space Grotesk', ui-monospace, monospace;
  --font-deva: 'Mukta', 'Noto Sans Devanagari', sans-serif;
  --radius: 16px; --measure: 68ch;
}
[data-theme="dark"] {
  --bg: var(--ink); --surface: #151515; --surface-2: #1f1f1f;
  --text: var(--cream); --text-2: #e6e0d4; --muted: #a8a196;
  --border: rgba(246, 241, 231, 0.14); --line: var(--cream); --shadow: var(--yellow);
  --link: var(--yellow);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 12px; z-index: 300; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---- Progress bar ---- */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 200; background: transparent; }
.progress span { display: block; height: 100%; width: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }

/* ---- Header / logo ---- */
.site-header { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: var(--bg); border-bottom: 2px solid var(--line); }
.logo { text-decoration: none; font-size: 1.3rem; }
.logo-mark { display: inline-flex; align-items: baseline; gap: .18em; background: var(--ink); padding: .28em .5em .22em; border-radius: .4em; line-height: 1; }
.logo-desi { font-family: var(--font-deva); font-weight: 800; font-size: 1.15em; color: var(--yellow); }
.logo-drip { font-weight: 900; font-size: .86em; color: var(--cream); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { font-weight: 700; font-size: .95rem; text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a.is-active { background: var(--text); color: var(--bg); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--text); color: var(--bg); }
.i-sun { display: none; } [data-theme="dark"] .i-sun { display: block; } [data-theme="dark"] .i-moon { display: none; }

/* ---- Pills ---- */
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 2px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); font: 700 .88rem var(--font); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.pill:hover { border-color: var(--line); }
.pill.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---- Post hero ---- */
.post { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.post-hero { max-width: 860px; margin: 0 auto; padding: 48px 0 32px; text-align: left; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 600 .78rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); text-decoration: underline; }
.kicker { display: inline-block; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; font: 700 .75rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.post-hero h1 { margin: 16px 0 14px; font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; line-height: 1.02; letter-spacing: -.035em; }
.dek { font-size: clamp(1.1rem, 2.4vw, 1.35rem); line-height: 1.5; color: var(--muted); max-width: 60ch; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; font: 600 .82rem var(--font-mono); letter-spacing: .04em; color: var(--muted); }

/* ---- Layout: TOC + body ---- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 48px; border-top: 2px solid var(--line); padding-top: 32px; }
@media (min-width: 1000px) { .post-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; } }
.toc { font-size: .9rem; }
@media (min-width: 1000px) { .toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; } }
.toc details { border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.toc summary { font: 700 .75rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.toc ol { list-style: none; margin-top: 10px; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); line-height: 1.35; border-left: 3px solid transparent; }
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.is-current { color: var(--text); font-weight: 700; border-left-color: var(--yellow); background: var(--surface-2); }

.post-body { min-width: 0; max-width: var(--measure); }

/* ---- Quick answer ---- */
.quick-answer { background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px 22px; box-shadow: 5px 5px 0 var(--ink); margin-bottom: 36px; }
.qa-label { display: block; font: 700 .72rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.quick-answer p { font: 500 1.12rem/1.6 var(--font-read); }
.quick-answer a { color: var(--ink); }

/* ---- Prose ---- */
.prose { font-family: var(--font-read); font-size: 1.14rem; line-height: 1.78; color: var(--text-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2, .faq h2, .brand-strip h2, .related h2 { font-family: var(--font); font-weight: 900; font-size: clamp(1.6rem, 3.6vw, 2.1rem); line-height: 1.12; letter-spacing: -.02em; color: var(--text); margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h3 { font-family: var(--font); font-weight: 800; font-size: 1.3rem; line-height: 1.25; color: var(--text); margin-top: 1.8em; scroll-margin-top: 90px; }
.anchor { position: absolute; margin-left: -1.1em; width: 1.1em; opacity: 0; text-decoration: none; color: var(--muted); font-weight: 400; transition: opacity .15s; }
h2:hover > .anchor, h3:hover > .anchor, .anchor:focus { opacity: 1; }
@media (max-width: 700px) { .anchor { display: none; } }
.prose a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 600; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; } .prose li + li { margin-top: .45em; } .prose li::marker { color: var(--muted); font-weight: 700; }
.prose blockquote { font-family: var(--font); font-size: 1.05rem; line-height: 1.6; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 16px 20px; color: var(--text); }
.prose blockquote p + p { margin-top: .6em; }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.prose hr { border: none; border-top: 2px dashed var(--border); margin: 2.5em 0; }
.table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 4px; }
table { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: .95rem; line-height: 1.45; }
th { text-align: left; background: var(--text); color: var(--bg); font: 700 .78rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 10px 14px; white-space: nowrap; }
td { padding: 11px 14px; border-top: 1px solid var(--border); vertical-align: top; }
tbody tr:hover td { background: var(--surface-2); }

/* ---- FAQ ---- */
.faq { margin-top: 1rem; }
.faq h2 { margin-bottom: 18px; }
.faq details { border: 2px solid var(--border); border-radius: 12px; background: var(--surface); margin-top: 10px; transition: border-color .15s; }
.faq details[open] { border-color: var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 700; font-size: 1.05rem; line-height: 1.4; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; transition: transform .2s; }
.faq details[open] summary::after { content: '−'; background: var(--yellow); color: var(--ink); }
.faq-a { padding: 0 18px 18px; font: 1.05rem/1.7 var(--font-read); color: var(--text-2); }
.faq-a p + p { margin-top: .6em; }

/* ---- Share bar ---- */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding: 18px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.share-bar > span { font: 700 .78rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }

/* ---- Brand strip ---- */
.brand-strip { margin-top: 40px; }
.brand-strip h2 { margin-top: 0; margin-bottom: 16px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.brand-chip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.brand-chip:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--shadow); }
.brand-dot { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-weight: 800; text-transform: uppercase; font-size: .9rem; }
.brand-text span { font: 500 .75rem var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-arrow { margin-left: auto; font-weight: 800; }
.see-all { display: inline-block; margin-top: 14px; font-weight: 800; color: var(--link); }

/* ---- Cards (index + related) ---- */
.card-grid, .card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.post-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.post-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--accent); }
.post-card:hover { transform: translate(-4px, -4px); box-shadow: 6px 6px 0 var(--shadow); }
.card-kicker { margin-top: 6px; font: 700 .72rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-card h3 { font-size: 1.45rem; font-weight: 900; line-height: 1.12; letter-spacing: -.02em; }
.post-card p { color: var(--muted); line-height: 1.55; font-size: .98rem; flex: 1; }
.card-meta { font: 600 .75rem var(--font-mono); color: var(--muted); }
.related { max-width: 1180px; margin: 0 auto; padding: 8px 20px 64px; }
.related h2 { margin: 0 0 18px; }

/* ---- Blog index ---- */
.blog-index { max-width: 1180px; margin: 0 auto; padding: 0 20px 72px; }
.index-hero { padding: 56px 0 28px; }
.index-hero h1 { margin: 16px 0 12px; font-size: clamp(3rem, 10vw, 6.5rem); font-weight: 900; line-height: .92; letter-spacing: -.045em; text-transform: uppercase; }
.index-hero mark { background: var(--yellow); color: var(--ink); padding: 0 .1em; border-radius: .08em; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; padding-top: 20px; border-top: 2px solid var(--line); }
.post-card[hidden] { display: none; }

/* ---- Back to top + toast ---- */
.to-top { position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); color: var(--ink); font-size: 1.3rem; font-weight: 900; cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; }
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--cream); padding: 10px 18px; border-radius: 999px; font-weight: 700; opacity: 0; transition: opacity .2s, transform .2s; z-index: 300; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--cream); border-top: 2px solid var(--line); padding: 48px 20px; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: grid; gap: 10px; font-size: .95rem; color: #cfc8ba; }
.footer-inner .logo { font-size: 1.8rem; margin-bottom: 6px; }
.footer-inner a { color: var(--yellow); }

@media (max-width: 560px) {
  .site-header { padding: 10px 16px; }
  .post, .blog-index, .related { padding-left: 16px; padding-right: 16px; }
  .post-hero { padding-top: 32px; }
  .prose { font-size: 1.08rem; }
}
