:root {
  --page: #f7f4ee;
  --surface: #fff;
  --surface-muted: #f0ebe2;
  --accent: #a83e32;
  --accent-dark: #8e332a;
  --amber: #d89a32;
  --ink: #242321;
  --muted: #68645e;
  --border: #ddd5c8;
  --info-bg: #eef4f1;
  --info: #2f7764;
  --warning-bg: #fff4d9;
  --warning: #9b6416;
  --danger: #b43b3b;
  --focus: #2f7764;
  --max: 1160px;
  --reading: 780px;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(58, 45, 30, .09);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Noto Sans Bengali", "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.76;
  overflow-wrap: anywhere;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-dark); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-width { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.content-width { width: min(calc(100% - 40px), var(--reading)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 100; min-height: 68px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.header-inner { width: min(calc(100% - 40px), var(--max)); min-height: 68px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.wordmark { color: var(--ink); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 1.6rem; font-weight: 900; letter-spacing: -.045em; text-decoration: none; }
.site-logo { display: block; width: 42px; height: 42px; border-radius: 8px; }
.primary-nav .menu, .footer-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 6px; }
.primary-nav a { display: grid; place-items: center; min-height: 44px; padding: 7px 14px; color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 9px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--surface-muted); color: var(--accent-dark); }
.menu-toggle { display: none; width: 48px; height: 48px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.menu-toggle > span:not(.screen-reader-text) { display: block; width: 24px; height: 2px; margin: 5px auto; background: var(--ink); }

.article-header { padding-block: 72px 34px; }
.article-header h1, .not-found h1 { margin: 0; max-width: 18ch; font-size: clamp(2.2rem, 7vw, 3.65rem); line-height: 1.08; letter-spacing: -.025em; }
.eyebrow { display: inline-block; margin: 0 0 16px; color: var(--accent-dark); font-size: .82rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.article-content { padding-bottom: 72px; }
.article-content > p:first-child { margin-top: 0; font-size: clamp(1.07rem, 2vw, 1.2rem); line-height: 1.72; color: #373430; }
.article-content h2 { position: relative; margin: 72px 0 22px; padding-top: 4px; font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.23; letter-spacing: -.018em; }
.article-content h2::before { content: ""; display: block; width: 48px; height: 5px; margin-bottom: 14px; border-radius: 99px; background: var(--accent); }
.article-content h3 { margin: 38px 0 14px; font-size: clamp(1.35rem, 3vw, 1.6rem); line-height: 1.3; }
.article-content p, .article-content ul, .article-content ol { margin: 0 0 1.28em; }
.article-content ul, .article-content ol { padding-inline-start: 1.3em; }
.article-content li { margin-bottom: .48em; }
.article-content strong { color: #171614; }

.reading-path { margin: 28px 0 44px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); }
.reading-path strong { display: block; margin-bottom: 6px; }
.reading-path a { display: inline-block; margin-right: 14px; min-height: 44px; line-height: 44px; font-weight: 700; }
.editorial-figure { margin: 34px 0 44px; }
.editorial-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface-muted); }
.editorial-figure figcaption { margin-top: 10px; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.table-wrap { width: 100%; margin: 28px 0 38px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(58,45,30,.05); }
table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: .96rem; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--surface-muted); color: var(--ink); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

.notice { margin: 28px 0; padding: 20px 22px; border-radius: var(--radius); background: var(--info-bg); border-left: 5px solid var(--info); }
.notice.warning { background: var(--warning-bg); border-color: var(--warning); }
.notice.danger { background: #fff1f1; border-color: var(--danger); }
.notice p:last-child { margin-bottom: 0; }

.steps { margin: 30px 0 42px; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 72px; margin: 0; padding: 0 0 28px 68px; counter-increment: steps; }
.steps li::before { content: counter(steps); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 46px; height: 46px; color: #fff; background: var(--accent); border-radius: 50%; font-weight: 900; }
.steps li::after { content: ""; position: absolute; left: 22px; top: 48px; bottom: 2px; width: 2px; background: var(--border); }
.steps li:last-child::after { display: none; }
.steps strong { display: block; margin-bottom: 3px; }

.faq-list { margin: 28px 0 42px; }
.faq-list details { margin-bottom: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-list details[open] { border-left: 5px solid var(--accent); }
.faq-list summary { min-height: 54px; padding: 15px 48px 15px 18px; cursor: pointer; font-weight: 800; line-height: 1.45; }
.faq-list details p { padding: 0 18px 18px; margin: 0; }

.related-links { margin-top: 48px; padding: 26px; background: var(--surface-muted); border-radius: var(--radius); }
.related-links h2 { margin-top: 0; font-size: 1.45rem; }
.related-links h2::before { display: none; }
.related-links a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 18px; font-weight: 800; }
.page-meta { margin-top: 52px; padding-top: 20px; color: var(--muted); border-top: 1px solid var(--border); font-size: .92rem; }
.button { display: inline-grid; place-items: center; min-height: 48px; padding: 10px 20px; color: #fff; background: var(--accent); border: 2px solid var(--accent); border-radius: 10px; font-weight: 800; text-decoration: none; }
.button:hover { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); }

.contact-form { margin: 32px 0; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form label { display: block; margin-bottom: 18px; font-weight: 800; }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; min-height: 48px; margin-top: 6px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #aaa096; border-radius: 8px; font: inherit; }
.contact-form textarea { min-height: 170px; resize: vertical; }
.contact-form .checkbox { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.contact-form .checkbox input { flex: 0 0 22px; width: 22px; min-height: 22px; margin-top: 5px; }
.form-status { padding: 15px 18px; border-radius: 8px; background: var(--info-bg); border-left: 4px solid var(--info); }
.form-status.error { background: #fff1f1; border-color: var(--danger); }

.site-footer { color: #fff; background: var(--ink); }
.footer-inner { width: min(calc(100% - 40px), var(--max)); margin: auto; padding: 58px 0 42px; display: grid; grid-template-columns: 1.25fr .8fr 1fr; gap: 44px; }
.wordmark--footer { display: inline-block; margin-bottom: 12px; color: #fff; }
.footer-brand p, .footer-note p { color: #d7d1c8; font-size: .94rem; line-height: 1.7; }
.footer-menu { display: grid; gap: 2px; }
.footer-menu a, .site-footer a { color: #fff; }
.footer-menu a { display: flex; align-items: center; min-height: 42px; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); }
.footer-bottom p { width: min(calc(100% - 40px), var(--max)); margin: auto; padding: 18px 0; color: #bdb6ac; font-size: .85rem; }

.listing-shell, .not-found { padding-block: 72px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.post-card h2 { margin-top: 0; }

@media (max-width: 768px) {
  body { font-size: 16px; }
  .site-width, .content-width, .header-inner, .footer-inner, .footer-bottom p { width: min(calc(100% - 32px), var(--max)); }
  .site-header, .header-inner { min-height: 58px; }
  .js .menu-toggle { display: block; }
  .js .primary-nav { display: none; position: absolute; top: 58px; left: 0; right: 0; padding: 10px 16px 18px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .js .primary-nav.is-open { display: block; }
  .primary-nav .menu { flex-direction: column; align-items: stretch; }
  .primary-nav a { justify-content: flex-start; min-height: 48px; }
  .article-header { padding-block: 48px 24px; }
  .article-content { padding-bottom: 48px; }
  .article-content h2 { margin-top: 48px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 46px 32px; }
  .post-grid { grid-template-columns: 1fr; }
  .related-links a { display: flex; margin-right: 0; }
}

@media (max-width: 480px) {
  .site-width, .content-width, .header-inner, .footer-inner, .footer-bottom p { width: min(calc(100% - 32px), var(--max)); }
  .article-header h1 { font-size: clamp(2.05rem, 11vw, 2.6rem); }
  .reading-path a { display: flex; margin-right: 0; }
  .contact-form { padding: 20px 16px; }
  .table-wrap { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
