/* Mangrove — default theme */
:root {
    --bg: #fbfcfa;
    --surface: #ffffff;
    --text: #1d2621;
    --muted: #5e6b64;
    --border: #e2e8e4;
    --brand: #15803d;
    --brand-strong: #166534;
    --header: #10231a;
    --header-text: #e7f3ec;
    --radius: 10px;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", "Noto Serif Bengali", serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Bengali", sans-serif;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1512;
        --surface: #151d19;
        --text: #e2eae5;
        --muted: #98a79f;
        --border: #26332c;
        --brand: #4ade80;
        --brand-strong: #86efac;
        --header: #0a100d;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--sans); }
a { color: var(--brand); text-underline-offset: .15em; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.muted { color: var(--muted); }
.inline { display: inline; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

/* Header */
.site-header { background: var(--header); color: var(--header-text); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.site-title { color: #fff; font: 700 1.6rem/1.2 var(--serif); text-decoration: none; }
.site-title:hover { color: #bbf7d0; }
.site-tagline { margin: .2rem 0 0; color: #a7c4b4; font-size: .95rem; }
.menu { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.site-nav .menu a { color: var(--header-text); text-decoration: none; font-weight: 500; padding: .2rem 0; border-bottom: 2px solid transparent; }
.site-nav .menu a:hover, .site-nav .menu .current a { border-bottom-color: #4ade80; color: #fff; }
.admin-strip { background: #1f2f27; font-size: .85rem; }
.admin-strip .wrap { display: flex; gap: 1.25rem; padding-top: .35rem; padding-bottom: .35rem; }
.admin-strip a, .admin-strip button { color: #cfe3d7; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; padding-top: 2.5rem; padding-bottom: 3rem; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 2rem; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.75rem; }
.card.sticky { border-color: var(--brand); }
.card-image img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.card-body { padding: 1.4rem 1.6rem 1.6rem; }
.card-title { font: 700 1.55rem/1.25 var(--serif); margin: 0 0 .35rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: .3rem; }
.meta { color: var(--muted); font-size: .88rem; margin: 0 0 .9rem; }
.meta a { color: inherit; }
.excerpt { margin: 0 0 .8rem; }
.more { font-weight: 600; text-decoration: none; }

.archive-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.archive-header h1 { font: 700 1.9rem/1.25 var(--serif); margin: 0; }
.archive-header p { color: var(--muted); margin: .4rem 0 0; }
.empty { color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); font-size: .9rem; margin-top: 1rem; }
.pager a { font-weight: 600; }

/* Single */
.entry-header h1 { font: 700 2.3rem/1.2 var(--serif); margin: 0 0 .5rem; letter-spacing: -.01em; }
.featured { margin: 1.5rem 0; }
.featured img { border-radius: var(--radius); display: block; }
.featured figcaption, .entry-content figcaption { color: var(--muted); font-size: .88rem; text-align: center; margin-top: .4rem; }
.entry-content { font-size: 1.06rem; overflow-wrap: break-word; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--serif); line-height: 1.3; margin: 2rem 0 .6rem; }
.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content img { border-radius: 6px; }
.entry-content blockquote { margin: 1.5rem 0; padding: .2rem 1.25rem; border-left: 4px solid var(--brand); font-family: var(--serif); font-style: italic; color: var(--muted); }
.entry-content pre { background: #0f1a14; color: #d9f2e2; padding: 1rem 1.2rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; line-height: 1.55; }
.entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.entry-content :not(pre) > code { background: rgba(21, 128, 61, .1); padding: .1em .35em; border-radius: 4px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: .5rem .75rem; text-align: left; }
.entry-content th { background: rgba(21, 128, 61, .07); }
.entry-content iframe { max-width: 100%; border: 0; border-radius: 8px; aspect-ratio: 16 / 9; width: 100%; height: auto; }
.entry-content hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.tags a { font-size: .85rem; text-decoration: none; padding: .15rem .65rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.tags a:hover { border-color: var(--brand); color: var(--brand); }
.notice { background: rgba(21, 128, 61, .08); border: 1px solid rgba(21, 128, 61, .3); padding: .65rem 1rem; border-radius: 8px; font-size: .95rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3rem 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post-nav a { text-decoration: none; font-weight: 600; color: var(--text); }
.post-nav a:hover { color: var(--brand); }
.post-nav small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.post-nav .next { text-align: right; }

/* Comments */
.comments { margin-top: 2.5rem; }
.comments h2 { font: 700 1.35rem/1.3 var(--serif); }
.comment-list, .children { list-style: none; padding: 0; margin: 0; }
.children { margin-left: 1.5rem; padding-left: 1rem; border-left: 2px solid var(--border); }
.comment { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.children .comment:last-child { border-bottom: 0; }
.comment-meta { font-size: .9rem; }
.comment-meta time { color: var(--muted); margin-left: .5rem; font-size: .82rem; }
.comment-body p { margin: .4rem 0; }
.reply { font-size: .85rem; color: var(--brand); text-decoration: none; }
.respond { margin-top: 2rem; }

/* Forms */
input:not([type=checkbox]):not([type=hidden]), textarea, select {
    width: 100%; font: inherit; font-size: 1rem; padding: .6rem .75rem; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: .92rem; margin: .8rem 0 .3rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
label small { font-weight: 400; color: var(--muted); }
button[type=submit]:not(.linklike) {
    font: inherit; font-weight: 600; padding: .6rem 1.3rem; margin-top: 1rem; border: 0; border-radius: 8px;
    background: var(--brand); color: #fff; cursor: pointer;
}
@media (prefers-color-scheme: dark) { button[type=submit]:not(.linklike) { color: #062612; } }
button[type=submit]:not(.linklike):hover { background: var(--brand-strong); }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .comment-form .row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; }
.search-form { display: flex; gap: .5rem; }
.search-form button { margin-top: 0 !important; }
.search-form.big { margin-bottom: 2rem; }
.form-page { max-width: 460px; }
.form-page h1 { font: 700 2rem/1.2 var(--serif); }
.field-error, .errors { color: #b42318; font-size: .88rem; }
.errors ul { padding-left: 1.2rem; margin: 0; }
.validation-summary-valid { display: none; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: .25rem 1rem 1rem; margin-top: 1.25rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.notfound h1 { font: 700 2.2rem/1.2 var(--serif); }

/* Sidebar */
.widget { margin-bottom: 2.25rem; }
.widget-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .6rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .35rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.widget li a { color: var(--text); text-decoration: none; }
.widget li a:hover { color: var(--brand); }
.widget .search-form input { font-size: .95rem; padding: .5rem .7rem; }
.widget .search-form button { padding: .5rem .9rem; font-size: .9rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-inner { padding-top: 1.75rem; padding-bottom: 2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }
.menu-footer a { color: var(--muted); text-decoration: none; }
