/* The Starmates, blog. Built on site.css + reading.css; only what a page of reading needs.
   One column of text at a comfortable measure, the picture a little wider, space between parts.
   Every colour, type family and radius comes from the variables in site.css, so day and night both follow. */

.col{max-width:760px;margin-inline:auto;padding-inline:var(--gut)}

/* ---------- article: the path, the title, the answer, the byline ---------- */
.post-head{padding-top:clamp(104px,14vh,156px)}
.crumbs{margin-bottom:clamp(18px,2.4vw,28px);font-size:var(--t-small);color:var(--muted);display:flex;flex-wrap:wrap;gap:4px 8px}
.crumbs a{text-decoration:none;padding-block:4px}
.crumbs a:hover{text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px}
.crumbs span{opacity:.5;padding-block:4px}
.post-head h1{font-size:clamp(38px,5vw,72px);line-height:1;letter-spacing:-.028em;text-wrap:balance}
.post-head h1 .h1-a{display:block}
.post-head h1 .h1-b{display:block;margin-top:.28em;font-size:.52em;line-height:1.12;letter-spacing:-.014em;font-weight:380;color:var(--muted)}
.post-head .answer{margin-top:clamp(22px,2.6vw,32px);color:var(--fg)}
.byline{margin-top:20px;font-size:var(--t-small);line-height:1.6;color:var(--muted)}
.byline a{color:var(--fg);font-weight:500;text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:.2em}
.byline time,.byline .nw{white-space:nowrap}

/* ---------- the one picture: a sheet of the site's paper, so it sits flat by day and framed by night ---------- */
.post-img{max-width:1000px;margin:clamp(32px,4.5vw,56px) auto 0;padding-inline:var(--gut)}
.post-img img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:16px;background:#EDE7DB}

/* ---------- in this article ---------- */
.toc{margin-top:clamp(28px,4vw,48px)}
.toc summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:48px;cursor:pointer;list-style:none}
.toc summary::-webkit-details-marker{display:none}
.toc summary::after{content:"";width:9px;height:9px;margin-right:6px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px);opacity:.55;transition:transform .3s ease}
.toc[open] > summary::after{transform:rotate(-135deg) translate(-2px,-1px)}
.toc-h{font-size:var(--t-small);font-weight:500;color:var(--muted)}
.toc:not([open]){border-bottom:1px solid var(--line)}
.toc ol{counter-reset:toc;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:clamp(20px,4vw,48px);border-top:1px solid var(--line)}
.toc li{counter-increment:toc;display:grid;grid-template-columns:26px minmax(0,1fr);align-items:baseline;border-bottom:1px solid var(--line);break-inside:avoid}
.toc li::before{content:counter(toc);font-family:var(--figures);font-size:17px;color:var(--gold-fg);font-variant-numeric:lining-nums}
:root[data-sky="moon"] .toc li::before{color:var(--gold)}
.toc a{display:block;padding:11px 0;font-size:16.5px;line-height:1.3;text-decoration:none}
.toc a:hover{text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:.2em}

/* ---------- running text ---------- */
.story{margin-top:clamp(36px,5vw,56px)}
.story > p,.story li,.notall p{font-size:var(--t-body);line-height:1.62}
.story > p{text-wrap:pretty}
.story > p + p{margin-top:1em}
.story h2,.post-faq h2,.post-sources h2{font-size:clamp(28px,1.6vw + 18px,40px);line-height:1.08;letter-spacing:-.018em;max-width:20em;text-wrap:balance}
.story > h2{margin-top:clamp(56px,7vw,88px);margin-bottom:18px}
.story > h3{margin-top:clamp(36px,4.5vw,52px);margin-bottom:10px}
.story h2,.story h3,.post-faq h2,.post-sources h2{scroll-margin-top:96px}
.story a,.post-foot a,.blog-more a,.post-sources a,.rel-all a{text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:.2em;transition:color .2s ease}
.story a:hover,.post-foot a:hover,.post-sources a:hover,.rel-all a:hover{color:var(--gold-fg)}
:root[data-sky="moon"] .story a:hover,:root[data-sky="moon"] .post-foot a:hover,:root[data-sky="moon"] .post-sources a:hover,:root[data-sky="moon"] .rel-all a:hover{color:var(--gold)}
.story b{font-weight:600}
.story .more-sign{margin-top:10px;font-size:16.5px;font-weight:500}

/* lists: the drawn starfish for "what helps", figures in gold for the steps */
.story ul,.story ol{display:flex;flex-direction:column;gap:14px;margin-top:22px}
.story ul[data-bullets] li{display:grid;grid-template-columns:20px minmax(0,1fr);gap:14px;align-items:start}
.story ul[data-bullets] li > svg{width:20px;height:20px;margin-top:.22em;color:var(--gold)}
.story ol{counter-reset:step}
.story ol li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px;align-items:baseline;counter-increment:step}
.story ol li::before{content:counter(step);font-family:var(--figures);font-size:22px;line-height:1;color:var(--gold-fg);font-variant-numeric:lining-nums}
:root[data-sky="moon"] .story ol li::before{color:var(--gold)}
.story ul + p,.story ol + p,.story .tbl + p,.story blockquote + p{margin-top:22px}

/* ---------- sheets of the reading's own paper: "at a glance" and "do all kids look like this?" ---------- */
.notall,.glance{margin:clamp(56px,7vw,88px) calc(-1 * clamp(0px,2vw,28px)) 0;padding:clamp(26px,4vw,48px);border-radius:22px;background:var(--sheet-2);color:var(--sheet-fg)}
.notall h2{margin-bottom:16px}
.notall p + p{margin-top:1em}
.notall i{font-style:italic}
.notall + h2,.glance + h2{margin-top:clamp(56px,7vw,88px)}
.notall a:hover,.glance a:hover,:root[data-sky="moon"] .story .notall a:hover,:root[data-sky="moon"] .story .glance a:hover{color:var(--gold-fg)}
.glance{margin-top:clamp(32px,4vw,48px);padding-block:clamp(22px,3vw,36px)}
.glance-h{font-family:var(--display);font-variation-settings:"SOFT" 100,"opsz" 48;font-weight:420;font-size:clamp(22px,1vw + 17px,28px);line-height:1.15;letter-spacing:-.01em;margin-bottom:10px}
.kv{width:100%;border-collapse:collapse}
.kv th,.kv td{padding:12px 0;text-align:left;vertical-align:baseline;font-size:17px;line-height:1.45;border-top:1px solid rgba(27,30,43,.14)}
.kv th{width:11.5em;padding-right:20px;font-weight:500;color:var(--sheet-muted);font-size:var(--t-small)}
.kv tr:last-child td{font-family:var(--display);font-variation-settings:"SOFT" 100,"opsz" 48;font-size:clamp(19px,.6vw + 16px,23px);line-height:1.25}

/* ---------- a real table: scrolls inside its own box when it has to, turns into cards on a phone ---------- */
.tbl{margin-top:24px;border:1px solid var(--line);border-radius:18px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.story > .tbl{margin-inline:calc(-1 * clamp(0px,(100vw - 760px) / 2 - var(--gut),120px))}
.tbl:focus-visible{outline-offset:2px}
.tbl table{width:100%;border-collapse:collapse;font-size:16.5px;line-height:1.45}
.tbl th,.tbl td{padding:14px 16px;text-align:left;vertical-align:top}
.tbl thead th{font-size:var(--t-small);font-weight:500;color:var(--muted);background:var(--chip);white-space:nowrap}
.tbl tbody tr + tr > *{border-top:1px solid var(--line)}
.tbl tbody th{font-family:var(--display);font-variation-settings:"SOFT" 100,"opsz" 48;font-weight:420;font-size:19px;line-height:1.2;white-space:nowrap}
@media (min-width:641px){.tbl.long-th tbody th{white-space:normal;width:27%;min-width:9.5em}}
@media (max-width:640px){
  .tbl,.story > .tbl{border:0;border-radius:0;overflow:visible;margin-inline:0}
  .tbl table,.tbl tbody,.tbl tr,.tbl th,.tbl td{display:block}
  .tbl thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tbl tbody{display:flex;flex-direction:column;gap:12px}
  .tbl tbody tr{padding:16px 18px;border:1px solid var(--line);border-radius:18px}
  .tbl tbody tr + tr > *{border-top:0}
  .tbl tbody th{padding:0 0 6px;font-size:22px;white-space:normal}
  .tbl td{padding:8px 0 0}
  .tbl td::before{content:attr(data-label);display:block;font-size:13.5px;font-weight:500;color:var(--muted);margin-bottom:1px}
}

/* ---------- a sentence to try: set in the display face, marked with the gold starfish colour only ---------- */
.try{margin:clamp(30px,4vw,44px) 0 0;padding:0}
.try-l{font-size:var(--t-small);font-weight:500;color:var(--gold-fg);margin-bottom:8px}
:root[data-sky="moon"] .try-l{color:var(--gold)}
.try p:last-child{font-family:var(--display);font-variation-settings:"SOFT" 100,"opsz" 72;font-weight:340;font-size:clamp(25px,1.4vw + 19px,36px);line-height:1.16;letter-spacing:-.012em;text-wrap:balance;max-width:19em}
.try + h2{margin-top:clamp(56px,7vw,88px)}

/* ---------- the reading, in the middle of the article ---------- */
.cta-mid{margin:clamp(44px,6vw,72px) calc(-1 * clamp(0px,2vw,28px)) 0;padding:clamp(26px,4vw,44px);border-radius:22px;background:var(--band);color:var(--band-fg);display:flex;flex-direction:column;gap:14px}
.cta-h{font-family:var(--display);font-variation-settings:"SOFT" 100,"opsz" 72;font-weight:380;font-size:clamp(25px,1.2vw + 19px,34px);line-height:1.1;letter-spacing:-.015em}
.cta-mid > p:not(.cta-h):not(.cta-acts){font-size:17px;line-height:1.55;color:var(--band-muted);max-width:34em}
.cta-acts{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;margin-top:6px}
.story .cta-mid a.btn{background:var(--band-fg);color:var(--band);text-decoration:none}
.story .cta-mid a.btn:hover,:root[data-sky="moon"] .story .cta-mid a.btn:hover{background:var(--gold-on-band);color:var(--band)}
.story .cta-mid a.cta-see{font-weight:500;text-decoration-color:var(--gold-on-band);padding-block:12px}
.story .cta-mid a.cta-see:hover,:root[data-sky="moon"] .story .cta-mid a.cta-see:hover{color:var(--gold-on-band)}

/* ---------- questions, sources, the author ---------- */
.post-faq{margin-top:clamp(72px,9vw,120px)}
.post-faq .faq-list{max-width:none}
.post-faq .faq-list details p{font-size:17.5px}
.post-faq .faq-list details a{text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:.2em}
.post-sources{margin-top:clamp(56px,7vw,88px)}
.post-sources ol{margin-top:20px;counter-reset:src;display:flex;flex-direction:column;gap:12px}
.post-sources li{counter-increment:src;display:grid;grid-template-columns:26px minmax(0,1fr);align-items:baseline;font-size:16px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.post-sources li::before{content:counter(src);font-family:var(--figures);font-size:17px;color:var(--gold-fg);font-variant-numeric:lining-nums}
:root[data-sky="moon"] .post-sources li::before{color:var(--gold)}
.post-sources a{color:var(--fg)}
.post-foot{margin-top:clamp(48px,6vw,72px)}
.author{padding:clamp(22px,3vw,32px);border-radius:22px;background:var(--chip);display:flex;flex-direction:column;gap:10px;font-size:16.5px;line-height:1.55;color:var(--muted)}
.author-h{font-family:var(--display);font-variation-settings:"SOFT" 100,"opsz" 48;font-weight:420;font-size:clamp(21px,.8vw + 17px,26px);line-height:1.2;color:var(--fg)}
.author p:last-child{font-weight:500;color:var(--fg)}

/* ---------- keep reading, then the band ---------- */
.related{margin-top:clamp(72px,9vw,120px)}
.related > h2,.bgroup > h2{font-size:clamp(28px,1.6vw + 18px,40px);line-height:1.08;letter-spacing:-.018em}
.rel-grid{margin-top:clamp(24px,3vw,36px);display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:clamp(32px,4vw,48px) clamp(20px,2.4vw,28px)}
.related .rel-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}
.rel-all{margin-top:clamp(28px,4vw,40px);font-weight:500}
.post-next{margin-top:clamp(88px,11vw,160px)}
.next .wl-line{font-size:16px;line-height:1.5}
.next .wl-line a{color:var(--band-fg);font-weight:500;text-decoration:underline;text-decoration-color:var(--gold-on-band);text-decoration-thickness:2px;text-underline-offset:.2em;white-space:nowrap}
.next .wl-line a:hover{color:var(--gold-on-band)}

/* ---------- cards ---------- */
.bcard{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(24px,4vw,64px);align-items:center}
.bcard-img{display:block;border-radius:16px;overflow:hidden;background:#EDE7DB}
.bcard-img img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
@media (hover:hover) and (pointer:fine){ .bcard:hover .bcard-img img{transform:scale(1.03)} }
.bcard-txt{display:flex;flex-direction:column;gap:12px;min-width:0}
.bcard-meta{font-size:var(--t-small);color:var(--muted)}
.bcard h2,.bcard h3{font-family:var(--display);font-variation-settings:"SOFT" 100,"opsz" 120;font-weight:380;line-height:1.08;letter-spacing:-.02em;text-wrap:balance}
.bcard h2 a,.bcard h3 a{text-decoration:none}
.bcard h2 a:hover,.bcard h3 a:hover{text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:.16em}
.bcard-txt > p:not(.bcard-meta){max-width:32em;line-height:1.55}
.bcard-txt .btn{margin-top:6px}
/* the guide leads: picture and words side by side, title larger */
.bcard.first{grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(24px,4vw,56px)}
.bcard.first h2{font-size:clamp(32px,2.6vw + 14px,56px)}
/* the rest: picture on top, in a grid that takes as many signs as there are */
.bcard.small{grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.bcard.small h3{font-size:clamp(23px,.8vw + 18px,28px);line-height:1.12}
.bcard.small .bcard-txt{gap:10px}
.bcard.small .bcard-txt > p:not(.bcard-meta){font-size:16.5px}
.bcard.small .btn{min-height:44px;padding:10px 20px;font-size:16px}

/* ---------- the index ---------- */
.blog-head h1{max-width:9em}
.blog-head .lead{max-width:28em}
.posts{margin-top:clamp(56px,8vw,112px);display:flex;flex-direction:column;gap:clamp(64px,8vw,112px)}
.bgroup-lead{margin-top:12px;max-width:36em;color:var(--muted)}
.blog-more{margin-top:clamp(40px,5vw,72px)}
.blog-more .fine-p{margin-top:0}

@media (max-width:900px){
  .bcard.first{grid-template-columns:minmax(0,1fr);gap:20px}
}
@media (max-width:760px){
  .notall,.glance,.cta-mid{margin-inline:calc(-1 * var(--gut) / 2);border-radius:18px}
  .post-head h1 .h1-b{font-size:.6em}
  .toc ol{grid-template-columns:minmax(0,1fr)}
  .kv th{width:8.2em;padding-right:12px}
  .kv th,.kv td{font-size:16px}
  .kv th{font-size:14px}
}
@media (prefers-reduced-motion:reduce){ .bcard-img img{transition:none} .bcard:hover .bcard-img img{transform:none} }

/* v17: keyword table at the end of the "Astro events 2027" articles ("Думите зад тази статия") */
.kw-block{margin-top:clamp(56px,7vw,88px)}
.kw-h{font-family:"Fraunces",var(--display);font-style:italic;font-weight:400;font-size:clamp(24px,1.2vw + 16px,32px);line-height:1.15;margin-bottom:16px}
.kw-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;background:#FBF8F2;border:1px solid rgba(27,30,43,.12);border-radius:6px}
.kw-table{width:100%;border-collapse:collapse;background:#FBF8F2}
.kw-table th,.kw-table td{padding:12px 14px;text-align:left;vertical-align:top}
.kw-table thead th{font-family:"Jost",var(--ui);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.14em;color:#7A5716;white-space:nowrap;border-bottom:1px solid rgba(27,30,43,.12)}
.kw-table tbody td{font-family:"Fraunces",var(--display);font-weight:400;font-size:16px;line-height:1.4;color:#1B1E2B}
.kw-table tbody tr + tr td{border-top:1px solid rgba(27,30,43,.12)}
.kw-table td.n{font-family:"Newsreader",var(--figures);font-variant-numeric:lining-nums tabular-nums;white-space:nowrap}
.kw-table td.n.kd-low{color:#B8893A}
