@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #f5f6fa; --card: #ffffff; --ink: #141a33; --muted: #5d6578; --line: #e1e4ee;
  --navy: #1d3fae; --yellow: #ffd91a; --yellow-soft: #fff8d1; --green: #1e7a46; --red: #b3261e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Mukta', 'Noto Sans Devanagari', system-ui, sans-serif; font-size: 18px; line-height: 1.6; overflow-wrap: break-word; }
a { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; text-wrap: balance; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.en { color: var(--muted); font-size: .8em; font-weight: 500; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.site-head { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.brand-mark { width: 38px; height: 38px; display: block; border-radius: 50%; box-shadow: 0 0 0 2px var(--yellow); }
.brand small { display: block; font-weight: 500; font-size: .68rem; opacity: .8; }

main.wrap { padding-top: 26px; padding-bottom: 56px; min-height: 60vh; }
.page-title { font-size: 1.9rem; font-weight: 800; }
.page-sub { color: var(--muted); margin: 2px 0 22px; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 18px 0 30px; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 48px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }

/* list */
.item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.item time, .post .meta { color: var(--muted); font-size: .88rem; }
.item h2 { font-size: 1.35rem; font-weight: 700; margin: 2px 0 6px; }
.item h2 a { color: var(--ink); text-decoration: none; }
.item h2 a:hover { color: var(--navy); text-decoration: underline; }
.item p { margin: 0 0 8px; color: #363d55; }
.more { font-weight: 700; text-decoration: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }

/* post */
.post { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 22px 26px; }
.post h1 { font-size: clamp(1.6rem, 5.5vw, 2.2rem); font-weight: 800; margin: 10px 0 6px; }
.back { font-size: .92rem; font-weight: 600; text-decoration: none; }
.prose { margin-top: 18px; font-size: 1.08rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 1.45rem; font-weight: 700; margin: 1.5em 0 .5em; padding-left: 10px; border-left: 4px solid var(--yellow); }
.prose h3 { font-size: 1.22rem; font-weight: 700; margin: 1.3em 0 .4em; }
.prose h4 { font-size: 1.08rem; font-weight: 700; margin: 1.2em 0 .3em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 0 0 1em; padding: 10px 16px; background: var(--yellow-soft); border-left: 4px solid var(--yellow); border-radius: 0 10px 10px 0; }
.prose blockquote p { margin: 0; }
.prose img { display: block; margin: 1.2em auto; border-radius: 10px; border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.prose a { overflow-wrap: anywhere; }
.share { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }

/* buttons + forms (shared with admin) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 18px; font: inherit; font-size: 1rem; font-weight: 700; min-height: 44px; text-decoration: none; touch-action: manipulation; }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid #cdd2e0; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: .9rem; border-radius: 8px; }
label { display: block; font-weight: 600; margin: 14px 0 5px; }
input[type=text], input[type=password], textarea { width: 100%; padding: 11px 12px; border: 1.5px solid #cdd2e0; border-radius: 10px; background: #fff; min-height: 46px; font: inherit; color: inherit; }
input:focus, textarea:focus { outline: 3px solid rgba(29,63,174,.22); border-color: var(--navy); }
.hint { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.msg { border-radius: 10px; padding: 11px 14px; margin-top: 14px; font-weight: 500; }
.msg.err { background: #fbe9e7; color: var(--red); border: 1px solid #f0c1bc; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 11px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill.published { background: #e3f3e8; color: var(--green); }
.pill.draft { background: #fdf3d3; color: #8a5a00; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .wrap { padding: 0 12px; }
  .post { padding: 18px 16px 22px; }
  .item { padding: 15px 16px; }
}

/* tables in posts */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 10px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .96rem; line-height: 1.5; }
.tbl th { background: var(--navy); color: #fff; text-align: left; font-weight: 700; padding: 9px 12px; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl td:first-child { white-space: nowrap; font-weight: 600; }
.tbl tbody tr:nth-child(even) td { background: #f8f9fc; }
@media (max-width: 480px) { .tbl table { font-size: .9rem; } .tbl th, .tbl td { padding: 8px 9px; } .tbl td:first-child { white-space: normal; min-width: 92px; } }
