/* BiswaPath · বিশ্বপাঠ — "khata" design system
   Paper, fountain-pen ink, the red margin line of a school exercise book. */

@font-face { font-family: "Tiro Bangla"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/tiro-bangla-bengali-400-normal.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1; }
@font-face { font-family: "Tiro Bangla"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/tiro-bangla-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tiro Bangla"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/tiro-bangla-bengali-400-italic.woff2") format("woff2"); unicode-range: U+0980-09FE, U+200C-200D, U+25CC; }
@font-face { font-family: "Tiro Bangla"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/tiro-bangla-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Hind Siliguri"; font-weight: 400; font-display: swap;
  src: url("fonts/hind-siliguri-bengali-400-normal.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: "Hind Siliguri"; font-weight: 400; font-display: swap;
  src: url("fonts/hind-siliguri-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Hind Siliguri"; font-weight: 600; font-display: swap;
  src: url("fonts/hind-siliguri-bengali-600-normal.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: "Hind Siliguri"; font-weight: 600; font-display: swap;
  src: url("fonts/hind-siliguri-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --paper: #fafbf7;
  --ink: #1b3a8c;        /* fountain-pen blue */
  --ink-soft: #3b5bb0;
  --margin: #c42b2b;     /* the red margin line */
  --rule: #d6e3f2;       /* pale blue ruling */
  --text: #26262b;       /* graphite */
  --muted: #5f5f68;
  --line-h: 2rem;        /* one ruled line */
  --gutter: clamp(24px, 4vw, 40px);
  --margin-x: clamp(28px, 9vw, 120px);  /* distance of red line from left edge */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 1.0625rem/1.75 "Hind Siliguri", system-ui, sans-serif;
}
:lang(bn) body, body:lang(bn) { font-size: 1.125rem; line-height: 1.85; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--margin); }
:focus-visible { outline: 3px solid var(--margin); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 10; }

/* The page sits on an exercise-book page: a red margin line runs the full height */
.page { position: relative; min-height: 100vh; }
.page::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--margin-x);
  width: 2px; background: var(--margin); opacity: .75; pointer-events: none;
}
.wrap { padding-left: calc(var(--margin-x) + var(--gutter)); padding-right: var(--gutter); max-width: calc(var(--margin-x) + 46rem); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; padding-bottom: 1.1rem; max-width: none; }
.brand { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand .bn { font-family: "Tiro Bangla", serif; font-size: 1.6rem; line-height: 1; }
.brand .en { font-family: "Tiro Bangla", serif; font-size: 1.05rem; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .98rem; }
.nav a { text-decoration: none; color: var(--text); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); text-decoration: underline; }
.lang { border: 1.5px solid var(--ink); border-radius: 999px; padding: .1rem .7rem; color: var(--ink) !important; }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; }
  .nav { width: 100%; gap: .2rem 1rem; font-size: .95rem; }
}

/* Hero: written on ruled lines */
.hero {
  background-image: linear-gradient(to bottom, transparent calc(var(--line-h) - 1px), var(--rule) calc(var(--line-h) - 1px));
  background-size: 100% var(--line-h);
  padding-top: calc(var(--line-h) * 2); padding-bottom: calc(var(--line-h) * 2);
}
.wordmark { margin: 0; font-family: "Tiro Bangla", serif; font-weight: 400; color: var(--ink);
  font-size: clamp(4rem, 15vw, 9.5rem); line-height: 1.05; letter-spacing: -.01em; }
.wordmark .latin { display: block; font-size: .32em; color: var(--text); letter-spacing: .01em; margin-top: .15em; }
.meaning { margin: calc(var(--line-h) * 1) 0 0; font-family: "Tiro Bangla", serif; font-size: clamp(1.25rem, 3.2vw, 1.6rem); line-height: var(--line-h); color: var(--text); max-width: 36em; }
.meaning em { font-style: normal; color: var(--ink); }
.lede { margin: var(--line-h) 0 0; max-width: 34em; font-size: 1.12rem; line-height: var(--line-h); }

/* The path: three stops on the red margin line */
.section { padding-top: 3.5rem; padding-bottom: 1rem; }
.section > h2 { font-family: "Tiro Bangla", serif; font-weight: 400; color: var(--ink); font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 .4rem; }
.section > .intro { margin: 0 0 1.6rem; color: var(--muted); max-width: 36em; }
.stops { list-style: none; margin: 0; padding: 0; }
.stop { position: relative; padding: 0 0 2.4rem; }
.stop::before { /* dot sitting on the red margin line */
  content: ""; position: absolute; top: .55rem;
  left: calc(-1 * var(--gutter) - 8px); width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--margin);
}
.stop h3 { margin: 0; font-family: "Tiro Bangla", serif; font-weight: 400; font-size: 1.6rem; line-height: 1.3; color: var(--text); }
.stop h3 .other { display: block; font-size: 1.05rem; color: var(--muted); }
.stop p { margin: .35rem 0 .6rem; max-width: 34em; }
.res { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 36em; }
.res li { border-bottom: 1px solid var(--rule); padding: .45rem 0; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.res .when { font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* Contribute */
.invite { border-left: 4px solid var(--ink); padding: .2rem 0 .2rem 1.1rem; max-width: 36em; }
.invite p { margin: .3rem 0 .8rem; }
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; padding: .6rem 1.1rem; border-radius: 6px; }
.btn:hover { background: var(--margin); color: #fff; }

/* Founder */
.founder { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; max-width: 38em; }
.founder .initials { width: 64px; height: 64px; border-radius: 50%; background: var(--rule); color: var(--ink); display: grid; place-items: center; font-family: "Tiro Bangla", serif; font-size: 1.6rem; }
.founder p { margin: 0 0 .6rem; }

/* Prose pages */
.prose { padding-top: 2.5rem; padding-bottom: 3rem; }
.prose h1 { font-family: "Tiro Bangla", serif; font-weight: 400; color: var(--ink); font-size: clamp(2rem, 6vw, 3rem); line-height: 1.15; margin: 0 0 1rem; }
.prose h2 { font-family: "Tiro Bangla", serif; font-weight: 400; color: var(--ink); font-size: 1.5rem; margin: 2rem 0 .4rem; }
.prose p, .prose li { max-width: 36em; }
.prose .updated { color: var(--muted); font-size: .92rem; }

/* Footer */
.foot { margin-top: 3rem; padding-top: 1.6rem; padding-bottom: 2.4rem; border-top: 1px solid var(--rule); font-size: .95rem; color: var(--muted); max-width: none; }
.foot nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin-bottom: .6rem; }
.foot a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .wordmark { animation: write .9s ease-out both; }
  @keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
}
@media print { .page::before, .nav, .lang { display: none; } }

/* University finder */
.uni .ufilters { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 .4rem; max-width: 40em; }
.uni .ufilters input, .uni .ufilters select { font: inherit; font-size: 1rem; padding: .55rem .7rem; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; color: var(--text); }
.uni .ufilters input { flex: 2 1 220px; min-width: 0; } .uni .ufilters select { flex: 1 1 140px; }
.uni h2.ucountry { margin-top: 2.2rem; }
.uni .unote { color: var(--muted); font-size: .95rem; max-width: 40em; }
.ucard { border-top: 1px solid var(--rule); padding: 1rem 0 .4rem; max-width: 44em; }
.ucard h3 { margin: 0 0 .4rem; font-family: "Tiro Bangla", serif; font-weight: 400; font-size: 1.35rem; color: var(--text); }
.ucity { color: var(--muted); font-family: "Hind Siliguri", sans-serif; font-size: .9rem; }
.ucard dl { display: grid; grid-template-columns: 13rem 1fr; gap: .25rem 1rem; margin: 0; font-size: .97rem; }
.ucard dt { color: var(--muted); } .ucard dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .ucard dl { grid-template-columns: 1fr; } .ucard dt { margin-top: .4rem; font-weight: 600; } }

/* Comparison table */
.tablewrap { overflow-x: auto; margin: 1.4rem 0 .3rem; border: 1px solid var(--rule); max-width: 100%; }
.tablewrap:focus-visible { outline: 3px solid var(--margin); }
table.cmp { border-collapse: collapse; min-width: 900px; font-size: .92rem; line-height: 1.45; background: #fff; }
table.cmp caption { text-align: left; padding: .6rem .8rem; color: var(--muted); font-size: .9rem; }
table.cmp th, table.cmp td { border-top: 1px solid var(--rule); padding: .55rem .7rem; vertical-align: top; text-align: left; }
table.cmp thead th { background: var(--ink); color: #fff; font-weight: 600; border-top: 0; }
table.cmp tbody th { color: var(--ink); font-weight: 600; white-space: nowrap; }
table.cmp td:nth-child(2) { background: #f3f6fc; }
.prose .srcs li { font-size: .92rem; }
.prose .tablewrap { max-width: none; width: min(72rem, calc(100vw - var(--margin-x) - 2 * var(--gutter))); }
