/* Bangladesh research site. One file, no external requests. */
/* Self-hosted Bangla fonts (SIL OFL, see fonts/OFL.txt) */
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/NotoSansBengali-var-bengali.woff2) format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: "Noto Serif Bengali"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/NotoSerifBengali-var-bengali.woff2) format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+200C-200D, U+20B9, U+25CC; }

:root {
  --bg: #fcfcfa; --bg-soft: #f3f5f3; --text: #1f2933; --muted: #56616d; --line: #dfe4e2; --line-strong: #9aa5a0;
  --accent: #006a4e; --accent-soft: #e3f3ec; --link: #00604a;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --green-bg: #e3f3ec; --green-bd: #79bd9d; --green-fg: #0b4a37;
  --blue-bg: #e4eefb; --blue-bd: #8fb3e6; --blue-fg: #1d3f73;
  --amber-bg: #fdf1d9; --amber-bd: #deb25a; --amber-fg: #664405;
  --rose-bg: #fbe6e8; --rose-bd: #e49aa4; --rose-fg: #7a2230;
  --violet-bg: #eee8fa; --violet-bd: #b19be0; --violet-fg: #44307a;
  --slate-bg: #eceff3; --slate-bd: #aab4c2; --slate-fg: #2e3a48;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171b; --bg-soft: #1a2127; --text: #e6eaed; --muted: #a2adb6; --line: #2d363d; --line-strong: #5d6a73;
    --accent: #4cc9a0; --accent-soft: #14312a; --link: #6fd8b4;
    --green-bg: #123428; --green-bd: #2f7a5c; --green-fg: #bfe8d6;
    --blue-bg: #17263f; --blue-bd: #3c68a8; --blue-fg: #c5d9f5;
    --amber-bg: #3a2d12; --amber-bd: #8a6a22; --amber-fg: #f1d9a3;
    --rose-bg: #3d1a20; --rose-bd: #94444f; --rose-fg: #f4c9cf;
    --violet-bg: #2a2147; --violet-bd: #6b57a6; --violet-fg: #d9ccf5;
    --slate-bg: #1f2630; --slate-bd: #4d5b6d; --slate-fg: #d5dbe3;
  }
}
.tone-green { --bg: var(--green-bg); --bd: var(--green-bd); --fg: var(--green-fg); }
.tone-blue { --bg: var(--blue-bg); --bd: var(--blue-bd); --fg: var(--blue-fg); }
.tone-amber { --bg: var(--amber-bg); --bd: var(--amber-bd); --fg: var(--amber-fg); }
.tone-rose { --bg: var(--rose-bg); --bd: var(--rose-bd); --fg: var(--rose-fg); }
.tone-violet { --bg: var(--violet-bg); --bd: var(--violet-bd); --fg: var(--violet-fg); }
.tone-slate { --bg: var(--slate-bg); --bd: var(--slate-bd); --fg: var(--slate-fg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.05rem/1.7 var(--serif); }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 0.5rem; top: -4rem; background: var(--accent); color: #fff; padding: 0.5rem 1rem; z-index: 20; font-family: var(--ui); }
.skip:focus { top: 0.5rem; }
.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 1rem; }
.wrap.narrow { max-width: 50rem; }
.muted { color: var(--muted); }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; font-family: var(--ui); }
.bar { display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 650; color: var(--text); text-decoration: none; font-size: 1rem; line-height: 1.2; margin-right: auto; }
.brand .mark { width: 1.6rem; height: 1.6rem; flex: none; }
.nav { display: flex; gap: 0.15rem 0.2rem; flex-wrap: wrap; font-size: 0.93rem; }
.nav a { color: var(--text); text-decoration: none; padding: 0.35rem 0.6rem; border-radius: 6px; }
.nav a:hover { background: var(--bg-soft); }
.nav a[aria-current] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 6px 6px 0 0; }
.hsearch { display: none; }
.hsearch input { font: 0.9rem var(--ui); width: 11rem; padding: 0.4rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--text); }
.hsearch-icon { color: var(--text); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; }
.hsearch-icon:hover { background: var(--bg-soft); }
@media (min-width: 760px) { .hsearch { display: block; } .hsearch-icon { display: none; } }
@media (max-width: 520px) { .bar { padding-top: 0.5rem; } .nav { order: 3; width: 100%; margin: 0 -0.4rem; } }

/* hero + search box */
.hero { padding: 3.5rem 0 2rem; text-align: center; }
.hero h1 { font: 700 clamp(1.9rem, 5vw, 2.9rem)/1.15 var(--ui); margin: 0 0 0.6rem; letter-spacing: -0.02em; }
.tagline { font-size: 1.2rem; color: var(--muted); margin: 0 auto 1.8rem; max-width: 36rem; }
.bigsearch { display: flex; gap: 0.5rem; max-width: 40rem; margin: 0 auto; font-family: var(--ui); }
.bigsearch input { flex: 1; min-width: 0; font: 1.05rem var(--ui); padding: 0.85rem 1.2rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / 0.06); }
.bigsearch input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 6px rgb(0 0 0 / 0.1); }
.bigsearch button { font: 600 0.95rem var(--ui); padding: 0 1.3rem; border: 0; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer; }
@media (prefers-color-scheme: dark) { .bigsearch button { color: #06241b; } }
.bigsearch button:hover { filter: brightness(1.1); }
@media (max-width: 420px) { .bigsearch button { display: none; } }

/* panels and cards */
.panels { display: grid; gap: 1rem; margin: 1rem 0 2.5rem; font-family: var(--ui); }
@media (min-width: 860px) { .panels { grid-template-columns: repeat(3, 1fr); } }
.panel { background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--bd); border-radius: 10px; padding: 1.1rem 1.25rem 1.2rem; display: flex; flex-direction: column; }
.panel .layer-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.panel h2 { margin: 0.1rem 0 0.4rem; font-size: 1.3rem; }
.panel h2 a { color: var(--text); text-decoration: none; }
.panel h2 a:hover { color: var(--link); }
.panel p { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.panel ul { list-style: none; margin: 0 0 0.8rem; padding: 0; font-size: 0.95rem; line-height: 1.4; }
.panel li { padding: 0.3rem 0; border-top: 1px solid var(--line); }
.panel li.soon { color: var(--muted); }
.panel .more { margin-top: auto; font-size: 0.9rem; font-weight: 600; }
.page-head { padding: 2.2rem 0 1rem; }
.page-head h1, .article-head h1 { font: 700 clamp(1.7rem, 4.5vw, 2.4rem)/1.2 var(--ui); margin: 0.3rem 0 0.5rem; letter-spacing: -0.015em; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 0.8rem; line-height: 1.55; }
.cards { display: grid; gap: 1rem; padding-bottom: 3rem; font-family: var(--ui); }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; background: var(--bg); }
.card:hover { border-color: var(--line-strong); }
.card h3 { margin: 0 0 0.3rem; font-size: 1.1rem; line-height: 1.3; }
.card h3 a { text-decoration: none; }
.card p { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.card ul { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; line-height: 1.5; }

.badge { display: inline-block; font: 600 0.72rem/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.3rem 0.6rem; border-radius: 999px; background: var(--bg); color: var(--fg); border: 1px solid var(--bd); }
.badge.draft { --bg: var(--rose-bg); --bd: var(--rose-bd); --fg: var(--rose-fg); }

/* article */
.article-grid { display: block; padding-bottom: 3rem; }
@media (min-width: 1080px) { .article-grid { display: grid; grid-template-columns: minmax(0, 46rem) 15rem; gap: 3.5rem; justify-content: center; } }
.side-col { display: none; }
@media (min-width: 1080px) { .side-col { display: block; } }
.crumbs { font: 0.88rem var(--ui); color: var(--muted); padding-top: 1.4rem; }
.crumbs a { color: var(--muted); }
.article-head { padding-bottom: 0.4rem; }
.badges { margin: 1rem 0 0; display: flex; gap: 0.4rem; }
.meta { font: 0.88rem var(--ui); color: var(--muted); margin: 0; }
.keybox { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 4px 10px 10px 4px; padding: 0.9rem 1.2rem 0.5rem; margin: 1.4rem 0; font-family: var(--ui); font-size: 0.98rem; line-height: 1.55; }
.keybox h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.4rem; color: var(--accent); }
.keybox ul { padding-left: 1.2rem; margin: 0 0 0.5rem; }
.toc { font: 0.9rem/1.4 var(--ui); }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { padding: 0.25rem 0; }
.toc li.l3 { padding-left: 0.9rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }
.toc.side { position: sticky; top: 5rem; padding-top: 1.6rem; max-height: calc(100vh - 6rem); overflow: auto; }
.toc.side h2 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.5rem; }
.toc.narrow { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 1rem; margin: 1rem 0; }
.toc.narrow summary { cursor: pointer; font-weight: 600; }
.toc.narrow ol { margin-top: 0.5rem; }
@media (min-width: 1080px) { .toc.narrow { display: none; } }

/* prose */
.prose { max-width: 70ch; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font: 650 1.5rem/1.3 var(--ui); margin: 2.4rem 0 0.6rem; letter-spacing: -0.01em; }
.prose h3 { font: 650 1.15rem/1.35 var(--ui); margin: 1.8rem 0 0.4rem; }
.prose h4 { font: 650 1rem/1.4 var(--ui); margin: 1.4rem 0 0.3rem; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 1.05rem; }
.prose li { margin: 0.25rem 0; }
.prose blockquote { margin: 1.2rem 0; padding: 0.1rem 1.1rem; border-left: 3px solid var(--line-strong); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose code { font: 0.88em var(--mono); background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { background: var(--bg-soft); padding: 0.9rem 1rem; border-radius: 8px; overflow-x: auto; font-size: 0.88rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; }
.prose dt { font-weight: 650; font-family: var(--ui); }
.prose dd { margin: 0 0 0.8rem 1.2rem; }
a.ext::after { content: "\2197"; font: 0.72em var(--ui); margin-left: 0.15em; opacity: 0.65; text-decoration: none; display: inline-block; }
.table-wrap { overflow-x: auto; margin: 1.3rem 0; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; font: 0.92rem/1.45 var(--ui); min-width: 100%; }
.prose th { text-align: left; font-weight: 650; border-bottom: 2px solid var(--line-strong); }
.prose th, .prose td { padding: 0.5rem 0.8rem 0.5rem 0; vertical-align: top; }
.prose td { border-bottom: 1px solid var(--line); }
.prose td:not(:first-child), .prose th:not(:first-child) { padding-left: 0.4rem; }
.build-error { color: var(--rose-fg); background: var(--rose-bg); padding: 0.6rem 1rem; border-radius: 6px; font-family: var(--ui); }

/* callouts */
.admonition { --bg: var(--slate-bg); --bd: var(--slate-bd); --fg: var(--slate-fg); background: var(--bg); border-left: 4px solid var(--bd); border-radius: 4px 10px 10px 4px; padding: 0.8rem 1.1rem 0.3rem; margin: 1.4rem 0; font-size: 0.98rem; line-height: 1.6; }
.admonition.key { --bg: var(--green-bg); --bd: var(--green-bd); --fg: var(--green-fg); }
.admonition.note { --bg: var(--blue-bg); --bd: var(--blue-bd); --fg: var(--blue-fg); }
.admonition.disputed { --bg: var(--amber-bg); --bd: var(--amber-bd); --fg: var(--amber-fg); }
.admonition.judgement { --bg: var(--violet-bg); --bd: var(--violet-bd); --fg: var(--violet-fg); }
.admonition-title { font: 700 0.74rem/1.3 var(--ui); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg); margin: 0 0 0.4rem !important; }
.admonition.key .admonition-title::before { content: "\2605  "; }
.admonition.disputed .admonition-title::before { content: "\2260  "; }
.admonition.judgement .admonition-title::before { content: "\25C6  "; }
.admonition.note .admonition-title::before { content: "\2139  "; }

/* footnotes */
.footnote { font: 0.82rem/1.5 var(--ui); color: var(--muted); margin-top: 3rem; }
.footnote hr { border-top: 1px solid var(--line); }
.footnote ol { padding-left: 1.2rem; }
.footnote li { margin: 0.3rem 0; }
.footnote a { overflow-wrap: anywhere; }
sup .footnote-ref, sup a { text-decoration: none; font: 0.75rem var(--ui); padding: 0 0.1rem; }

/* closing panels */
.deeper, .backlinks, .provenance { margin-top: 2.2rem; font-family: var(--ui); }
.deeper h2, .backlinks h2, .provenance h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.7rem; }
.deeper ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.deeper a { display: block; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px 10px 10px 4px; padding: 0.7rem 1rem; text-decoration: none; color: var(--text); background: var(--bg-soft); }
.deeper a:hover { border-color: var(--accent); }
.deeper strong { display: block; color: var(--link); }
.deeper .d { display: block; font-size: 0.92rem; color: var(--muted); line-height: 1.5; margin-top: 0.15rem; }
.where { font: 0.72rem var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.deeper .where { float: right; margin-top: 0.2rem; }
.backlinks ul { margin: 0; padding-left: 1.1rem; font-size: 0.95rem; }
.provenance { font-size: 0.85rem; color: var(--muted); }
.provenance p { margin: 0; }
.prevnext { display: grid; gap: 0.8rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-family: var(--ui); }
@media (min-width: 600px) { .prevnext { grid-template-columns: 1fr 1fr; } }
.prevnext a { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 1rem; color: var(--text); font-weight: 600; line-height: 1.35; }
.prevnext a:hover { border-color: var(--accent); }
.prevnext span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 500; }
.prevnext .next { text-align: right; grid-column: 2; }
@media (max-width: 599px) { .prevnext .next { grid-column: 1; } }

.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.8rem 0 2.5rem; font: 0.9rem/1.55 var(--ui); color: var(--muted); }
.site-footer p { margin: 0 0 0.4rem; max-width: 46rem; }
.site-footer .statement { color: var(--text); }

/* search results */
.results { list-style: none; padding: 0; margin: 1rem 0 3rem; font-family: var(--ui); }
.results li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.results h2 { font-size: 1.1rem; margin: 0; display: inline; }
.results .where { margin-left: 0.6rem; }
.results p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
mark { background: #fde68a; color: #1f2933; border-radius: 2px; padding: 0 0.1em; }

/* diagrams */
.diagram { margin: 1.8rem 0; padding: 1.1rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-family: var(--ui); }
.diagram-title { font-weight: 650; font-size: 1rem; margin-bottom: 0.9rem; }
.diagram figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.9rem; line-height: 1.5; }
.diagram strong { font-weight: 650; }
.diagram .note { display: block; font-size: 0.85rem; opacity: 0.88; line-height: 1.4; margin-top: 0.1rem; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding: 0; margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 0.4rem; }
.legend .sw { width: 0.9rem; height: 0.9rem; border-radius: 4px; background: var(--bg); border: 1.5px solid var(--bd); }
@media (min-width: 760px) { .diagram { padding: 1.4rem 1.5rem; } }
.diagram .wide-bleed { overflow-x: auto; }

/* cycle */
.cycle { position: relative; max-width: 30rem; margin: 0 auto; padding-right: 2.4rem; }
.cycle-list { list-style: none; margin: 0; padding: 0; }
.cycle .node { display: flex; gap: 0.75rem; align-items: flex-start; background: var(--bg); border: 1px solid var(--bd); color: var(--fg); border-radius: 12px; padding: 0.65rem 0.9rem; line-height: 1.35; }
.cycle .num { flex: none; width: 1.55rem; height: 1.55rem; border-radius: 50%; border: 1.5px solid var(--bd); display: grid; place-items: center; font: 600 0.78rem var(--ui); }
.cycle .link { text-align: center; color: var(--muted); height: 1.5rem; line-height: 1.5rem; }
.cycle .link.cut { height: auto; margin: 0.25rem 0; line-height: 1.3; }
.cycle .link.cut span { display: block; border: 2px dashed var(--green-bd); background: var(--green-bg); color: var(--green-fg); border-radius: 10px; padding: 0.4rem 0.7rem; font-size: 0.88rem; font-weight: 600; }
.cycle-return { position: absolute; right: 0.2rem; top: 1.3rem; bottom: 2.7rem; width: 1.5rem; border: 2px solid var(--line-strong); border-left: 0; border-radius: 0 16px 16px 0; }
.cycle-return::before { content: ""; position: absolute; left: -1px; top: -7px; border: solid transparent; border-width: 6px 9px 6px 0; border-right-color: var(--line-strong); }
.cycle-return.cut { border-style: dashed; }
.cycle-again { text-align: center; margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* flow */
.flow { display: flex; flex-direction: column; gap: 0.4rem; }
.flow-col { background: var(--bg); border: 1px solid var(--bd); border-radius: 12px; padding: 0.7rem 0.8rem; flex: 1 1 0; min-width: 0; }
.flow-col .col-title { margin: 0 0 0.55rem; font: 700 0.74rem var(--ui); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg); }
.flow-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.flow .item { background: var(--bg); border: 1px solid var(--bd); color: var(--fg); border-radius: 8px; padding: 0.5rem 0.7rem; font-size: 0.92rem; line-height: 1.35; }
.flow-col { --card: #fff; }
.flow-arrow { align-self: center; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 0.1rem; }
.flow-arrow::before { content: "\2193"; }
@media (min-width: 760px) {
  .flow.lr { flex-direction: row; align-items: stretch; gap: 0.3rem; }
  .flow.lr .flow-arrow::before { content: "\2192"; }
  .flow.lr .flow-arrow { align-self: center; }
}

/* network */
.net-group + .net-group { margin-top: 1.1rem; }
.net-group h4 { margin: 0 0 0.5rem; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg); }
.net-group h4 span { background: var(--bg); border: 1px solid var(--bd); padding: 0.2rem 0.6rem; border-radius: 999px; }
.net-grid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.net-card { background: var(--bg); border: 1px solid var(--bd); color: var(--fg); border-radius: 12px; padding: 0.7rem 0.9rem; font-size: 0.92rem; line-height: 1.4; }
.net-card .chip { display: none; }
.net-card strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.rel { font-size: 0.85rem; margin-top: 0.3rem; }
.rel-h { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.8; display: block; }
.rel ul { list-style: none; padding: 0; margin: 0.1rem 0 0; }
.rel em { opacity: 0.85; }

/* quadrant */
.quad { display: grid; grid-template-columns: 1.7rem 1fr; gap: 0.35rem 0.4rem; }
.quad-y { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--muted); text-align: center; }
.quad-y b, .quad-x b { color: var(--text); font-weight: 650; }
.quad-x { grid-column: 2; display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.78rem; color: var(--muted); }
.quad-plot { position: relative; display: grid; grid-template: 1fr 1fr / 1fr 1fr; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); gap: 1px; background: var(--line-strong); }
@media (min-width: 760px) { .quad-plot { aspect-ratio: 16 / 10; } }
.q-cell { background: var(--bg); padding: 0.5rem 0.65rem; font-size: 0.78rem; font-weight: 650; color: var(--fg); line-height: 1.3; opacity: 0.95; }
.q-cell.q2, .q-cell.q3 { display: flex; align-items: flex-end; }
.q-cell.q1, .q-cell.q3 { justify-content: flex-end; text-align: right; }
.q-dot { position: absolute; transform: translate(-50%, 50%); width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--bd); color: var(--fg); font: 700 0.75rem var(--ui); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); }
.q-dot.inline { position: static; transform: none; flex: none; box-shadow: none; }
.q-keys { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.35rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); font-size: 0.88rem; }
.q-keys li { display: flex; gap: 0.5rem; align-items: center; line-height: 1.3; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.phase { background: var(--bg); color: var(--fg); border: 1px solid var(--bd); border-top: 5px solid var(--bd); border-radius: 4px 4px 12px 12px; padding: 0.7rem 0.95rem 0.8rem; font-size: 0.92rem; line-height: 1.4; }
.phase .period { display: block; font: 700 0.74rem var(--ui); text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.phase strong { display: block; font-size: 1.02rem; margin: 0.15rem 0 0.3rem; }
.phase ul { margin: 0; padding-left: 1.05rem; }
.phase li { margin: 0.2rem 0; }

/* shift */
.shift-row { display: grid; gap: 0.5rem; grid-template-columns: 1fr; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.shift-row:first-child { border-top: 0; }
.shift-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; border: 0; }
.s-group { font-weight: 700; font-size: 1rem; }
.s-cell { background: var(--bg); border: 1px solid var(--bd); color: var(--fg); border-radius: 8px; padding: 0.45rem 0.7rem; font-size: 0.9rem; line-height: 1.4; }
.s-cell::before { content: attr(data-label); display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; font-weight: 700; }
.s-arrow { display: none; }
@media (min-width: 820px) {
  .shift-row { grid-template-columns: 8rem 1fr 1.4rem 1fr 1fr; align-items: stretch; }
  .shift-head { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: grid; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; padding-bottom: 0.3rem; border-top: 0; }
  .s-cell::before { display: none; }
  .s-arrow { display: flex; align-items: center; justify-content: center; color: var(--muted); }
  .s-arrow::before { content: "\2192"; }
  .s-group { align-self: center; }
}

/* stats */
.stats { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: 1.6rem 0; font-family: var(--ui); }
.stat { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 10px; padding: 0.8rem 1rem; background: var(--bg-soft); }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.stat-label { font-size: 0.9rem; font-weight: 600; margin-top: 0.25rem; line-height: 1.3; }
.stat-note { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.4; }
.stat-src { font-size: 0.72rem; color: var(--muted); margin-top: 0.35rem; }

/* print */
@media print {
  :root { --bg: #fff; --text: #000; --muted: #333; }
  body { font-size: 11pt; }
  .site-header, .site-footer, .toc, .prevnext, .skip, .bigsearch, .hsearch, .hsearch-icon { display: none !important; }
  .article-grid { display: block; }
  a { color: inherit; text-decoration: none; }
  a.ext::after { content: " (" attr(href) ")"; font-size: 0.8em; opacity: 1; }
  .diagram, .stat, .admonition, .card, .keybox { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}

/* refinements */
.article .prose { max-width: none; }
.wrap.narrow .article .prose { max-width: 70ch; }
.cycle .link.cut { margin: 0.55rem 0; }
.panel li a { text-decoration: none; }
.panel li a:hover { text-decoration: underline; }

/* language toggle and Bangla typography */
.langtoggle { font: 600 0.85rem var(--ui); color: var(--accent); text-decoration: none; border: 1px solid var(--accent); border-radius: 999px; padding: 0.3rem 0.85rem; white-space: nowrap; }
.langtoggle:hover { background: var(--accent-soft); }
.lang-mark { font: 0.8em var(--ui); color: var(--muted); white-space: nowrap; }
.stale-notice { font: 0.92rem/1.5 var(--ui); background: var(--amber-bg); color: var(--amber-fg); border-left: 4px solid var(--amber-bd); border-radius: 4px 10px 10px 4px; padding: 0.6rem 1rem; margin: 1rem 0; }
.stale-notice a { color: inherit; font-weight: 600; }
html[lang="bn"] {
  --serif: "Noto Serif Bengali", "Kalpurush", "Nirmala UI", "Bangla Sangam MN", serif;
  --ui: "Noto Sans Bengali", "Nirmala UI", "Bangla Sangam MN", system-ui, sans-serif;
}
html[lang="bn"] body { line-height: 1.9; font-size: 1.08rem; }
html[lang="bn"] * { letter-spacing: 0 !important; }
html[lang="bn"] .badge, html[lang="bn"] .keybox h2, html[lang="bn"] .toc.side h2, html[lang="bn"] .deeper h2,
html[lang="bn"] .backlinks h2, html[lang="bn"] .provenance h2, html[lang="bn"] .layer-tag, html[lang="bn"] .where,
html[lang="bn"] .admonition-title, html[lang="bn"] .rel-h, html[lang="bn"] .period, html[lang="bn"] .col-title { text-transform: none; }
html[lang="bn"] .hero h1, html[lang="bn"] .page-head h1, html[lang="bn"] .article-head h1 { line-height: 1.35; }
html[lang="bn"] .prose h2, html[lang="bn"] .prose h3 { line-height: 1.5; }
html[lang="bn"] .lede, html[lang="bn"] .tagline { line-height: 1.7; }
html[lang="bn"] .footnote ol { list-style-type: bengali; }
