/* WorldMD blog (worldmd.pk/blog). Same paper, hairlines and fonts as the homepage (home.css), only what an article needs.
 * Pages are written by tools/blog/build.mjs: edit the posts there, not the HTML. No JavaScript beyond the year in the footer. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin.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: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-latin-600.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: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/newsreader-latin-400.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; }
:root {
  --teal: #0F6E6A; --deep: #083D3B; --deep-2: #0B4C49; --bright: #2BA39C; --sand: #EBD3A8; --sand-2: #F5E9D2;
  --bg: #F6F4EE; --surface: #FDFCF8; --white: #FFFFFF; --surface-2: #F0EDE5; --ink: #1D2422; --muted: #5F6B68; --faint: #8A9592; --text: #333D3A;
  --line: #E3DFD4; --line-2: #D3CEC1; --accent-soft: #E3F1EF;
  --shadow: 0 1px 2px rgba(20, 30, 28, .05), 0 12px 32px -12px rgba(20, 30, 28, .14);
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --head: 'Poppins', 'Inter', system-ui, sans-serif; --read: 'Newsreader', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--ui); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.22; margin: 0 0 .6rem; text-wrap: balance; }
p { margin: 0 0 1rem; text-wrap: pretty; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(43, 163, 156, .4); border-radius: 6px; }
::selection { background: rgba(43, 163, 156, .22); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.kicker { display: flex; align-items: center; gap: .6rem; font: 600 .74rem var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin: 0 0 1rem; }
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--bright); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Buttons and top bar (as on the homepage) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 42px; padding: .5rem 1.1rem; border-radius: 10px; border: 1px solid transparent; font: 500 .95rem var(--ui); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .12s; }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--deep); color: #fff; box-shadow: 0 6px 18px -8px rgba(8, 61, 59, .6); } .btn-dark:hover { background: var(--deep-2); }
.btn-dark .ic { transition: transform .25s var(--ease); } .btn-dark:hover .ic { transform: translateX(3px); }
.btn-quiet { color: var(--ink); } .btn-quiet:hover { background: var(--surface-2); }
.btn-sand { background: var(--sand); color: var(--deep); font-weight: 600; } .btn-sand:hover { background: #F1DDB8; }
.top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; }
.logo img { height: 60px; width: auto; margin: -10px 0 -10px -7px; }
.top-r { display: flex; align-items: center; gap: .35rem; }
.top-r .lnk { color: var(--muted); font-weight: 500; font-size: .92rem; padding: .5rem .7rem; border-radius: 8px; } .top-r .lnk:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 560px) { .top-r .lnk, .top-r .btn-quiet { display: none; } }

/* Blog index */
.b-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem; border-bottom: 1px solid var(--line); }
.b-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); max-width: 18ch; }
.b-head p { color: var(--muted); font-size: 1.08rem; max-width: 60ch; margin: 0; }
.b-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1.1rem; padding: 2.2rem 0 4rem; }
.more .b-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.b-card { display: flex; flex-direction: column; gap: .55rem; padding: 1.4rem 1.4rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.b-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.b-card h2 { font-size: 1.2rem; margin: 0; }
.b-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.b-card .meta { margin-top: auto; padding-top: .7rem; }
.b-card.lead { grid-column: 1 / -1; padding: clamp(1.5rem, 3vw, 2.2rem); }
.b-card.lead h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); max-width: 30ch; }
.b-card.lead p { max-width: 70ch; font-size: 1.02rem; }
.tag { align-self: flex-start; font: 600 .7rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; color: var(--faint); font-size: .84rem; font-variant-numeric: tabular-nums; }

/* Article */
.crumbs { padding-top: 1.6rem; font-size: .86rem; color: var(--faint); }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--teal); }
.post { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 2rem clamp(2rem, 5vw, 4.5rem); padding: 1.4rem 0 4rem; }
.post-head { grid-column: 1 / -1; max-width: 46rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.post-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.75rem); }
.post-head .dek { font: 400 clamp(1.12rem, 2vw, 1.3rem)/1.5 var(--read); color: #3A4542; margin: .4rem 0 1.1rem; }
.body { max-width: 44rem; font-size: 1.06rem; line-height: 1.75; color: var(--text); }
.body > :first-child { margin-top: 0; }
.body h2 { font-size: clamp(1.35rem, 2.6vw, 1.6rem); margin: 2.6rem 0 .8rem; scroll-margin-top: 84px; }
.body h3 { font-size: 1.12rem; margin: 1.8rem 0 .5rem; }
.body p, .body ul, .body ol { margin: 0 0 1.15rem; }
.body ul, .body ol { padding-left: 1.3rem; } .body li { margin: .35rem 0; } .body li::marker { color: var(--bright); }
.body strong { color: var(--ink); font-weight: 600; }
.body a { text-decoration: underline; text-decoration-color: rgba(15, 110, 106, .35); text-underline-offset: 3px; } .body a:hover { text-decoration-color: var(--teal); }
.body .short { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--bright); border-radius: 12px; padding: 1.1rem 1.3rem; margin-bottom: 1.8rem; }
.body .short b { display: block; font: 600 .74rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: .35rem; }
.body .short p:last-child, .body .short ul:last-child { margin-bottom: 0; }
.body .note { font-size: .93rem; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: .8rem; }
.tbl { overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.tbl table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font: 600 .78rem var(--ui); letter-spacing: .03em; color: var(--muted); background: var(--surface); }
.tbl tr:last-child td { border-bottom: 0; } .tbl td.n { text-align: right; white-space: nowrap; }
.tbl tfoot td { font-weight: 600; color: var(--ink); background: var(--surface); }
.faq { margin-top: 2.6rem; }
.faq details { border-bottom: 1px solid var(--line); padding: .2rem 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; font: 600 1rem/1.4 var(--head); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.3rem/1 var(--ui); color: var(--teal); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1rem; }
.src { margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.6; color: var(--muted); }
.src h2 { font-size: 1rem; margin: 0 0 .6rem; } .src ol { padding-left: 1.2rem; margin: 0; } .src li { margin: .3rem 0; } .src a { word-break: break-word; }
.side { position: sticky; top: 88px; align-self: start; display: grid; gap: 1rem; }
.toc { font-size: .9rem; } .toc b { display: block; font: 600 .72rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.toc a { display: block; color: var(--muted); padding: .32rem 0 .32rem .8rem; border-left: 1px solid var(--line); line-height: 1.4; } .toc a:hover { color: var(--teal); border-left-color: var(--bright); }
.cta-box { background: var(--deep); color: #DDEBE9; border-radius: 16px; padding: 1.3rem 1.3rem 1.4rem; font-size: .93rem; }
.cta-box h3 { color: #fff; font-size: 1.05rem; margin-bottom: .4rem; } .cta-box p { margin-bottom: 1rem; }
.cta-box .btn { width: 100%; }
.more { border-top: 1px solid var(--line); padding: 2.4rem 0 3.4rem; }
.more h2 { font-size: 1.25rem; margin-bottom: 1.1rem; }
.more .b-list { padding: 0; }
@media (max-width: 920px) { .post { grid-template-columns: minmax(0, 1fr); } .side { position: static; order: 3; } .toc { display: none; } .cta-box { max-width: 44rem; } }

/* Footer */
.foot { padding: 2.6rem 0 1.5rem; font-size: .9rem; border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.foot-brand img { height: 44px; width: auto; margin: -6px 0 .4rem -5px; } .foot-brand p { color: var(--muted); }
.foot h4 { font: 600 .74rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.foot nav a { display: block; color: var(--ink); padding: .22rem 0; } .foot nav a:hover { color: var(--teal); }
.foot-b { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem; border-top: 1px solid var(--line); margin-top: 2.2rem; padding-top: 1.2rem; color: var(--faint); font-size: .8rem; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Punjab merit calculator (/punjab-merit-calculator) */
.c-head { border-bottom: 0; padding: 1.4rem 0 1.2rem; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.4rem; align-items: start; margin-bottom: 3rem; }
.c-form { display: grid; gap: 1rem; }
.c-step { margin: 0; padding: 1.15rem 1.25rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.c-step legend { float: left; width: 100%; display: flex; align-items: center; gap: .6rem; font: 600 1rem var(--head); color: var(--ink); margin-bottom: .85rem; padding: 0; }
.c-step legend span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: #fff; font: 600 .74rem var(--ui); }
.c-step legend + * { clear: both; }
.hint { margin: .6rem 0 0; font-size: .86rem; color: var(--muted); }
.fld { display: grid; gap: .3rem; font-size: .86rem; font-weight: 500; color: var(--muted); }
.fld-s { max-width: 360px; }
.c-form input[type=number] { width: 100%; min-height: 44px; padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--white); font: 500 1rem var(--ui); color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.c-form input[type=number]::-webkit-inner-spin-button, .c-form input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.c-form input[type=number]:focus { outline: none; border-color: var(--bright); box-shadow: 0 0 0 3px rgba(43, 163, 156, .2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; max-width: 420px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .5rem 1rem; border-radius: 9px; font-weight: 500; font-size: .92rem; color: var(--muted); transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(43, 163, 156, .4); }
.profs { display: grid; gap: .45rem; }
.pr { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr; gap: .6rem; align-items: center; font-size: .92rem; }
.pr-h { font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.pr-sum { border-top: 1px dashed var(--line-2); padding-top: .55rem; margin-top: .15rem; font-weight: 600; } .pr-sum b { padding-left: .75rem; font-variant-numeric: tabular-nums; }
.opts { display: grid; gap: .5rem; }
.opts label { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .85rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--white); cursor: pointer; transition: border-color .15s, background .15s; }
.opts label:has(input:checked) { border-color: var(--bright); background: var(--accent-soft); }
.opts input { margin: .2rem 0 0; accent-color: var(--teal); flex: none; }
.opts b { display: block; font-weight: 500; color: var(--ink); font-size: .93rem; line-height: 1.4; } .opts i { font-style: normal; font-size: .82rem; color: var(--muted); }
.c-out { position: sticky; top: 84px; display: grid; gap: .7rem; }
.c-card { background: var(--deep); color: #DDEBE9; border-radius: 18px; padding: 1.3rem 1.35rem 1.25rem; }
.c-l { margin: 0; font: 600 .74rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--sand); }
.c-total { margin: .2rem 0 .9rem; display: flex; align-items: baseline; gap: .4rem; font-variant-numeric: tabular-nums; }
.c-total b { font: 600 3rem/1 var(--head); color: #fff; letter-spacing: -.02em; } .c-total span { color: #A9C6C2; font-size: 1.05rem; }
.c-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .12); margin-bottom: 1rem; }
.c-bar i { display: block; height: 100%; width: 0; transition: width .35s var(--ease); }
#barP, .kp { background: var(--bright); } #barA, .ka { background: var(--sand); } #barU, .ku { background: #8FD3CC; } #barH, .kh { background: #F1A983; }
.c-parts { margin: 0; display: grid; gap: .45rem; font-size: .92rem; }
.c-parts div { display: flex; justify-content: space-between; gap: .8rem; } .c-parts dt { display: flex; align-items: center; gap: .5rem; } .c-parts dd { margin: 0; color: #A9C6C2; font-variant-numeric: tabular-nums; } .c-parts dd b { color: #fff; font-weight: 600; }
.k { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.c-warn { margin: .9rem 0 0; padding: .55rem .7rem; border-radius: 9px; background: rgba(241, 169, 131, .16); color: #FBD9C6; font-size: .86rem; }
.btn-line { border-color: var(--line-2); color: var(--ink); background: var(--surface); } .btn-line:hover { background: var(--white); }
.c-reset { margin-top: 1rem; width: 100%; background: transparent; color: #DDEBE9; border-color: rgba(255, 255, 255, .25); } .c-reset:hover { background: rgba(255, 255, 255, .08); }
.c-small { margin: 0; font-size: .8rem; color: var(--faint); }
.c-body { max-width: 46rem; padding-bottom: 3rem; }
.b-tool { border-style: dashed; }
.c-mini { display: none; }
@media (max-width: 900px) {
  .calc { grid-template-columns: minmax(0, 1fr); } .c-out { position: static; scroll-margin-top: 80px; }
  .c-mini { display: flex; align-items: baseline; gap: .45rem; position: sticky; bottom: 12px; z-index: 5; grid-row: 2; justify-self: center; padding: .55rem 1rem; border-radius: 99px; background: var(--deep); color: #DDEBE9; box-shadow: 0 10px 24px -10px rgba(8, 61, 59, .6); font-size: .86rem; font-variant-numeric: tabular-nums; }
  .c-mini b { color: #fff; font: 600 1.1rem var(--head); } .c-mini i { font-style: normal; color: #A9C6C2; }
}
@media (max-width: 480px) { .pr { grid-template-columns: minmax(0, 1fr) 84px 84px; gap: .45rem; } .c-step { padding: 1rem; } }
