/* FIX (uniform fonts): the old import had NO Tamil/Devanagari coverage —
   Tamil poems fell back to the device's default font, which is why the
   typography looked inconsistent. Noto Sans Tamil (UI/body) + Noto Serif
   Tamil (display/poetry) + Noto Sans Devanagari (Hindi/Marathi) added. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&family=Noto+Sans:wght@400;500&family=Noto+Sans+Tamil:wght@400;500;600&family=Noto+Serif+Tamil:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;500;600&display=swap');

:root {
  --violet: #1E1B4B;
  --violet-mid: #312E81;
  --violet-light: #EEF2FF;
  --violet-pale: #F5F3FF;
  --green: #065F46;
  --green-mid: #059669;
  --green-light: #ECFDF5;
  --amber: #D97706;
  --amber-light: #FFFBEB;
  --amber-mid: #F59E0B;
  --coral: #E11D48;
  --coral-light: #FFF1F2;
  --sky: #0284C7;
  --sky-light: #F0F9FF;
  --ink: #111827;
  --ink-mid: #374151;
  --ink-soft: #6B7280;
  --ink-faint: #9CA3AF;
  --border: #E5E7EB;
  --border-dark: #D1D5DB;
  --surface: #F9FAFB;
  --white: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
  --font-display: 'Playfair Display', 'Noto Serif Tamil', 'Noto Sans Devanagari', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans Tamil', 'Noto Sans Devanagari', system-ui, sans-serif;
  --font-content: 'Noto Sans', 'Noto Sans Tamil', 'Noto Sans Devanagari', 'Inter', sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Utility ─────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ── Type badges ───────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-poem    { background: var(--violet-light); color: var(--violet-mid); }
.badge-story   { background: var(--green-light);  color: var(--green); }
.badge-article { background: var(--amber-light);  color: #92400E; }
.badge-episode { background: var(--coral-light);  color: #9F1239; }
.badge-draft   { background: #F3F4F6; color: var(--ink-soft); }
.badge-pub     { background: var(--green-light); color: var(--green); }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; border: none;
  transition: all var(--transition); white-space: nowrap;
}
.btn-primary   { background: var(--violet); color: var(--white); }
.btn-primary:hover { background: var(--violet-mid); }
.btn-green     { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-mid); }
.btn-amber     { background: var(--amber); color: var(--white); }
.btn-amber:hover { background: var(--amber-mid); }
.btn-outline   { background: transparent; color: var(--violet); border: 1.5px solid var(--violet); }
.btn-outline:hover { background: var(--violet-light); }
.btn-ghost     { background: transparent; color: var(--ink-soft); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ── Nav ─────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--violet);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 24px; max-width: 1200px; margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 20px;
  color: var(--white); font-weight: 600;
}
.nav-logo span { color: var(--amber-mid); }
.nav-links {
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.nav-links a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.75); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn-login {
  padding: 7px 16px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white); font-size: 13px; font-weight: 500;
  background: transparent; transition: all var(--transition);
}
.nav-btn-login:hover { background: rgba(255,255,255,0.1); }
.nav-btn-write {
  padding: 7px 16px; border-radius: var(--radius-sm);
  background: var(--amber); color: var(--white);
  font-size: 13px; font-weight: 600; border: none;
  transition: all var(--transition);
}
.nav-btn-write:hover { background: var(--amber-mid); }
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--amber); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.nav-hamburger { display: none; background: none; border: none; color: var(--white); font-size: 22px; padding: 4px; }
.mobile-menu {
  display: none; flex-direction: column;
  background: var(--violet); padding: 16px 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu a {
  padding: 12px 0; color: rgba(255,255,255,0.8);
  font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu.open { display: flex; }

/* ── Section headings ──────────────────── */
.section-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 6px;
}
.section-title {
  font-family: var(--font-display); font-size: 28px;
  font-weight: 700; line-height: 1.3;
}
.section-sub { font-size: 15px; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.section-header { margin-bottom: 28px; }
.section-header-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.view-all {
  font-size: 13px; font-weight: 500; color: var(--violet);
  display: flex; align-items: center; gap: 4px;
  transition: gap var(--transition);
}
.view-all:hover { gap: 8px; }

/* ── Post card ───────────────────────────── */
.post-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); display: flex; flex-direction: column;
}
.post-card:hover { border-color: var(--violet-mid); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card-cover {
  width: 100%; aspect-ratio: 16/9; background: var(--violet-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; overflow: hidden;
}
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.post-card-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.post-card-title {
  font-family: var(--font-display); font-size: 17px;
  font-weight: 600; line-height: 1.4; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-excerpt {
  font-size: 13px; color: var(--ink-soft); line-height: 1.6;
  flex: 1; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--ink-faint);
}
.post-card-author { display: flex; align-items: center; gap: 6px; }
.post-card-author-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--violet-light); color: var(--violet-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
}
.post-card-stats { display: flex; align-items: center; gap: 10px; }
.post-stat { display: flex; align-items: center; gap: 3px; }

/* ── Post card horizontal ─────────────── */
.post-card-h {
  display: flex; gap: 16px; padding: 16px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: all var(--transition);
  align-items: flex-start;
}
.post-card-h:hover { border-color: var(--violet-mid); box-shadow: var(--shadow-sm); }
.post-card-h-cover {
  width: 80px; height: 80px; border-radius: var(--radius-md);
  background: var(--violet-light); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  overflow: hidden;
}
.post-card-h-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card-h-body { flex: 1; min-width: 0; }
.post-card-h-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  line-height: 1.4; margin: 6px 0 4px;
}
.post-card-h-excerpt {
  font-size: 12px; color: var(--ink-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}
.post-card-h-meta { font-size: 11px; color: var(--ink-faint); display: flex; gap: 10px; }

/* ── Writer card ─────────────────────────── */
.writer-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; text-align: center;
  transition: all var(--transition);
}
.writer-card:hover { border-color: var(--violet-mid); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.writer-card-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  margin: 0 auto 12px; display: flex; align-items: center;
  justify-content: center; font-size: 26px; font-weight: 700;
  color: var(--white);
}
.writer-card-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.writer-card-handle { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.writer-card-bio {
  font-size: 12px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.writer-card-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 14px; }
.writer-card-tag { padding: 2px 8px; background: var(--violet-light); color: var(--violet-mid); border-radius: 20px; font-size: 11px; }
.writer-card-stats { display: flex; justify-content: center; gap: 20px; font-size: 12px; color: var(--ink-soft); }
.writer-card-stat-num { font-size: 16px; font-weight: 600; color: var(--ink); display: block; }

/* ── Tag cloud ───────────────────────────── */
.tag-pill {
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500; border: 1px solid var(--border);
  background: var(--white); color: var(--ink-mid);
  transition: all var(--transition); cursor: pointer;
}
.tag-pill:hover, .tag-pill.active {
  background: var(--violet); color: var(--white); border-color: var(--violet);
}

/* ── Filters ─────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; padding: 16px 0;
}
.filter-btn {
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  font-weight: 500; border: 1px solid var(--border);
  background: var(--white); color: var(--ink-soft); cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--violet); color: var(--violet); }
.filter-btn.active { background: var(--violet); color: var(--white); border-color: var(--violet); }

/* ── Search ──────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap input {
  width: 100%; padding: 10px 16px 10px 40px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 14px; background: var(--white); color: var(--ink);
  transition: border-color var(--transition);
}
.search-wrap input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(30,27,75,0.08); }
.search-wrap .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint); font-size: 16px;
}

/* ── Form elements ───────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-mid); }
.form-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 14px; color: var(--ink);
  background: var(--white); transition: border-color var(--transition);
}
.form-input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(30,27,75,0.08); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.form-hint { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--coral); margin-top: 4px; }

/* ── OTP input ──────────────────────────── */
.otp-wrap { display: flex; gap: 10px; justify-content: center; }
.otp-input {
  width: 52px; height: 58px; border: 2px solid var(--border);
  border-radius: var(--radius-md); text-align: center;
  font-size: 24px; font-weight: 600; color: var(--violet);
  transition: border-color var(--transition);
}
.otp-input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(30,27,75,0.08); }

/* ── Avatar colours ─────────────────────── */
.av-violet { background: var(--violet); }
.av-green  { background: var(--green); }
.av-amber  { background: var(--amber); }
.av-coral  { background: var(--coral); }
.av-sky    { background: var(--sky); }
.av-pink   { background: #9333EA; }

/* ── Sections ────────────────────────────── */
.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }
.section-lg { padding: 80px 0; }
.bg-surface { background: var(--surface); }
.bg-violet  { background: var(--violet); color: var(--white); }
.bg-green   { background: var(--green);  color: var(--white); }
.bg-stripe {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 1px,
    rgba(30,27,75,0.025) 1px,
    rgba(30,27,75,0.025) 80px
  );
}

/* ── Divider ─────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0; }
.divider-v { width: 1px; background: var(--border); align-self: stretch; }

/* ── Ranked list ─────────────────────────── */
.rank-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.rank-item:last-child { border-bottom: none; }
.rank-num {
  font-family: var(--font-display); font-size: 28px;
  font-weight: 700; color: var(--border-dark);
  line-height: 1; min-width: 28px; padding-top: 2px;
}
.rank-body { flex: 1; }
.rank-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.rank-meta { font-size: 12px; color: var(--ink-faint); display: flex; gap: 10px; }

/* ── Spotlight banner ────────────────────── */
.spotlight {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-mid) 100%);
  border-radius: var(--radius-xl); padding: 36px 40px;
  color: var(--white); position: relative; overflow: hidden;
}
.spotlight::before {
  content: '\201C'; font-family: var(--font-display);
  font-size: 220px; font-weight: 700; color: rgba(255,255,255,0.05);
  position: absolute; top: -40px; left: 20px; line-height: 1;
  pointer-events: none;
}
.spotlight-quote {
  font-family: var(--font-display); font-size: 22px;
  font-style: italic; line-height: 1.6; margin-bottom: 20px;
  position: relative; z-index: 1;
}
.spotlight-author { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.spotlight-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber); display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 700;
}
.spotlight-name { font-size: 15px; font-weight: 600; }
.spotlight-handle { font-size: 12px; color: rgba(255,255,255,0.6); }

/* ── Comment ─────────────────────────────── */
.comment {
  display: flex; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--white);
}
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.comment-name { font-size: 13px; font-weight: 600; }
.comment-time { font-size: 11px; color: var(--ink-faint); }
.comment-text { font-size: 14px; color: var(--ink-mid); line-height: 1.6; }

/* ── Dashboard sidebar ──────────────────── */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 60px); }
.dash-side {
  border-right: 1px solid var(--border);
  padding: 24px 0; position: sticky; top: 60px;
  height: calc(100vh - 60px); overflow-y: auto;
}
.dash-side-section { padding: 0 16px; margin-bottom: 8px; }
.dash-side-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 0 8px; margin: 16px 0 6px;
}
.dash-side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink-soft);
  transition: all var(--transition); cursor: pointer;
}
.dash-side-item:hover { background: var(--surface); color: var(--ink); }
.dash-side-item.active { background: var(--violet-light); color: var(--violet); font-weight: 500; }
.dash-side-item i { font-size: 17px; }
.dash-main { padding: 28px 32px; }

/* ── Editor ──────────────────────────────── */
.editor-toolbar {
  display: flex; gap: 2px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.editor-tool-btn {
  padding: 5px 10px; border-radius: var(--radius-sm);
  font-size: 13px; background: transparent;
  border: none; color: var(--ink-soft);
  transition: all var(--transition);
}
.editor-tool-btn:hover { background: var(--white); color: var(--ink); }
.editor-body {
  width: 100%; min-height: 320px;
  padding: 16px; border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-family: var(--font-content); font-size: 16px;
  line-height: 1.8; color: var(--ink); resize: vertical;
  background: var(--white);
}
.editor-body:focus { outline: none; border-color: var(--violet); }

/* ── Toast ───────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  padding: 12px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  background: var(--ink); color: var(--white);
  box-shadow: var(--shadow-lg);
  transform: translateY(80px); opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: var(--green); }
.toast-error   { background: var(--coral); }

/* ── Footer ──────────────────────────────── */
.site-footer {
  background: var(--violet); color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.footer-brand span { color: var(--amber-mid); }
.footer-desc { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer-heading { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.65); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.footer-langs { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-lang { padding: 3px 10px; border-radius: 20px; font-size: 11px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }

/* ── Post reader ─────────────────────────── */
.post-reader-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.post-body {
  font-family: var(--font-content); font-size: 18px;
  line-height: 1.9; color: var(--ink-mid);
}
.post-body p { margin-bottom: 1.4em; }
.post-body h2 { font-family: var(--font-display); font-size: 24px; margin: 1.8em 0 0.6em; color: var(--ink); }
.post-body blockquote {
  border-left: 3px solid var(--amber); padding-left: 20px;
  font-style: italic; color: var(--ink-soft); margin: 1.6em 0;
}
.post-body img { border-radius: var(--radius-md); margin: 1.4em 0; }
.post-actions {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin: 32px 0;
}
.action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: transparent;
  font-size: 14px; color: var(--ink-soft);
  transition: all var(--transition);
}
.action-btn:hover { border-color: var(--violet); color: var(--violet); background: var(--violet-light); }
.action-btn.liked { background: var(--coral-light); color: var(--coral); border-color: var(--coral); }
.action-btn.bookmarked { background: var(--amber-light); color: var(--amber); border-color: var(--amber); }
.sidebar-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
  position: sticky; top: 76px;
}
.sidebar-card-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 14px; }

/* ── Preview gate ───────────────────────── */
.preview-gate {
  background: linear-gradient(to bottom, transparent, var(--white) 60%);
  padding: 60px 0 40px; margin-top: -80px; text-align: center;
}
.gate-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px 32px;
  max-width: 440px; margin: 0 auto; box-shadow: var(--shadow-md);
}
.gate-card h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; }
.gate-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }

/* ── Series episode list ─────────────────── */
.episode-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.episode-num {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--border-dark); min-width: 32px; text-align: center;
}
.episode-body { flex: 1; }
.episode-title { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.episode-meta { font-size: 12px; color: var(--ink-faint); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-reader-layout { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side { display: none; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: block; }
  .section { padding: 40px 0; }
  .section-lg { padding: 56px 0; }
  .section-title { font-size: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .spotlight { padding: 24px; }
  .spotlight-quote { font-size: 18px; }
  .content-grid-3, .content-grid-4 { grid-template-columns: 1fr; }
  .content-grid-2 { grid-template-columns: 1fr; }
}

/* ── Grids ───────────────────────────────── */
.content-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.content-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.content-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
@media (max-width: 1024px) {
  .content-grid-4 { grid-template-columns: repeat(2,1fr); }
  .content-grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .content-grid-4, .content-grid-3, .content-grid-2 { grid-template-columns: 1fr; }
}

/* ── Scroll animations ───────────────────── */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .post-card, .writer-card { transition: none; }
}


/* ═══════════════════════════════════════════════════════════
   MOBILE OVERFLOW & LAYOUT FIX
   Prevents horizontal bleed on all screens
═══════════════════════════════════════════════════════════ */

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

* { box-sizing: border-box; }

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* ── Container safe on all screens ──────────────────────── */
.container, .container-sm {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .container, .container-sm {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── Profile hero fix ────────────────────────────────────── */
@media (max-width: 600px) {
  .profile-hero { padding: 32px 0 28px; }
  .profile-name { font-size: 22px; word-break: break-word; }
  .profile-meta-row { flex-wrap: wrap; gap: 8px; font-size: 12px; }
  .profile-actions { flex-wrap: wrap; gap: 8px; }
  .profile-stats-bar .container { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .profile-stat { flex: none; }
  .profile-stat-num { font-size: 20px; }
}

/* ── Post card fix ───────────────────────────────────────── */
@media (max-width: 600px) {
  .post-card { margin-bottom: 10px; }
  .post-card-thumb { width: 72px; height: 72px; flex-shrink: 0; }
  .post-card-title { font-size: 15px; }
}

/* ── Nav fix ─────────────────────────────────────────────── */
.site-nav { max-width: 100vw; overflow: hidden; }
.nav-inner { 
  padding: 0 16px; 
  width: 100%;
  box-sizing: border-box;
}

/* ── Section/hero full width bleeds intentionally ────────── */
.post-header, .profile-hero, .series-header,
.hero-section, .cta-banner {
  width: 100%;
  overflow: hidden;
}

/* ── Tab bar wrapping fix ────────────────────────────────── */
@media (max-width: 480px) {
  .profile-tabs { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    display: flex;
  }
  .profile-tab { flex-shrink: 0; }
}

/* ── Editor / writing area fullscreen on mobile ──────────── */
@media (max-width: 768px) {
  .editor-layout { 
    display: block !important; 
    padding: 0 !important;
  }
  .editor-main { 
    min-height: 100vh; 
    border-radius: 0 !important;
  }
  .editor-toolbar { 
    position: sticky; top: 56px; z-index: 100;
    flex-wrap: wrap; gap: 4px;
    padding: 8px 12px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
  }
  #editor-body {
    min-height: calc(100vh - 160px);
    padding: 16px !important;
    font-size: 16px !important;
  }
  .editor-sidebar { display: none !important; }
}

/* Auto fullscreen when keyboard opens (visual viewport) */
@supports (height: 100dvh) {
  @media (max-width: 768px) {
    .editor-wrap { min-height: 100dvh; }
  }
}


/* ═══════════════════════════════════════════════════════════
   READING EXPERIENCE — long stories, poems & Indic scripts
   (added in audit — pairs with the post.html reader page)
═══════════════════════════════════════════════════════════ */

/* Indic scripts need taller line boxes — Latin metrics clip the
   curves of Tamil/Devanagari glyphs and feel cramped. */
:lang(ta), [lang="ta"], .lang-tamil,
:lang(hi), [lang="hi"], .lang-hindi {
  line-height: 1.9;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: break-word;   /* never bleed long Tamil words off-screen */
}

/* Comfortable measure for long prose: ~65–72 characters per line */
.post-body {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.85;
  overflow-wrap: break-word;   /* mobile bleed guard for long words/URLs */
}
.post-body p { margin: 0 0 1.25em; }
.post-body img { border-radius: var(--radius-md); margin: 1.5em auto; }

/* Poems: preserve the writer's line breaks and stanza spacing */
.post-body.is-poem, .post-body[data-type="POEM"] {
  white-space: pre-wrap;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 2;
  text-align: left;
}

/* Reader font-size control — toggle these classes from post.html
   (A− / A / A+ buttons) */
.read-sm .post-body { font-size: 16px; }
.read-md .post-body { font-size: 18px; }   /* default */
.read-lg .post-body { font-size: 21px; }
.read-xl .post-body { font-size: 24px; }

/* Reading progress bar — fixed strip under the nav.
   post.html: update width = scrolled% on scroll. */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--amber-mid), var(--amber));
  z-index: 200; transition: width 0.1s linear;
}

/* Drop-cap option for stories (add .has-dropcap on the body wrapper) */
.has-dropcap > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.2em; line-height: 0.85;
  float: left; padding: 4px 8px 0 0; color: var(--violet);
}

/* Sticky author byline card on the post page */
.author-byline {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin: 20px 0;
}
.author-byline .byline-name { font-weight: 600; font-size: 14px; }
.author-byline .byline-meta { font-size: 12px; color: var(--ink-soft); }

/* Comment list — avatar + bubble layout */
.comment-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment-bubble { flex: 1; min-width: 0; }
.comment-name { font-size: 13px; font-weight: 600; }
.comment-name .is-writer-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  background: var(--violet-light); color: var(--violet-mid);
  border-radius: 10px; padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}
.comment-time { font-size: 11px; color: var(--ink-faint); margin-left: 8px; }
.comment-body { font-size: 14px; color: var(--ink-mid); margin-top: 3px; overflow-wrap: break-word; }

/* Fullscreen / focus compose mode (editor.html adds .focus-mode to <body>) */
body.focus-mode .site-nav,
body.focus-mode .editor-sidebar,
body.focus-mode #site-footer { display: none !important; }
body.focus-mode .editor-main {
  max-width: 720px; margin: 0 auto; min-height: 100vh;
  border: none; border-radius: 0;
}
body.focus-mode #editor-body { font-size: 19px; line-height: 1.9; }
.focus-toggle-btn {
  position: fixed; bottom: 20px; right: 20px; z-index: 150;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--violet); color: var(--white); border: none;
  box-shadow: var(--shadow-lg); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}

/* Draft autosave status chip (dashboard/editor) */
.save-status { font-size: 12px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 5px; }
.save-status.saving::before  { content: '●'; color: var(--amber-mid); animation: pulse 1s infinite; }
.save-status.saved::before   { content: '✓'; color: var(--green-mid); }
.save-status.error::before   { content: '!'; color: var(--coral); font-weight: 700; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Mobile reading refinements */
@media (max-width: 600px) {
  .post-body { font-size: 17px; padding: 0 2px; }
  .post-body.is-poem, .post-body[data-type="POEM"] { font-size: 17px; }
  .author-byline { flex-wrap: wrap; }
}
