/* The Atlas blog — on top of style.css (its tokens, fonts, header, buttons and footer).
   One idea carried through: the site's map. Each article's cover is a small map drawn from its address, the short
   version reads as stations along a line, and the chips wear the line colours — green for plain English, cyan for
   technical, pink for what's new. Dark only, like the rest of the site. */

.blog {
  --prose: #c7cae3;
  --chip-everyone: #3ddc97;
  --chip-technical: #52d0ee;
  --chip-news: #c07cf0;
  --chip-atlas: #e8a33d;
  --read: 720px;
}

.box-label { font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 14px; }

/* ── Chips ──────────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px 6px 8px; border-radius: 999px; color: var(--text-dim); background: rgba(226, 229, 255, .05); box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.a-everyone { color: var(--chip-everyone); background: rgba(61, 220, 151, .08); box-shadow: inset 0 0 0 1px rgba(61, 220, 151, .28); }
.chip.a-technical { color: var(--chip-technical); background: rgba(82, 208, 238, .08); box-shadow: inset 0 0 0 1px rgba(82, 208, 238, .26); }
.chip.k-news { color: var(--chip-news); background: rgba(192, 124, 240, .09); box-shadow: inset 0 0 0 1px rgba(192, 124, 240, .3); }
.chip.k-atlas { color: var(--chip-atlas); background: rgba(232, 163, 61, .08); box-shadow: inset 0 0 0 1px rgba(232, 163, 61, .28); }

/* ── The index ──────────────────────────────────────────────────────────── */
.blog-index { padding-top: clamp(44px, 6vw, 84px); padding-bottom: clamp(60px, 8vw, 110px); }
.index-head { max-width: 900px; margin-bottom: clamp(30px, 4vw, 48px); }
.index-head h1 { font-size: clamp(40px, 6.2vw, 80px); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.index-lede { margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--text-dim); max-width: 60ch; text-wrap: pretty; }
.index-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters[hidden] { display: none; }
.filters button { display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--font-body); color: var(--text-dim); background: rgba(226, 229, 255, .04); border: 0; box-shadow: inset 0 0 0 1px var(--border-strong); padding: 10px 14px; border-radius: 999px; cursor: pointer; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.filters button span { font: 600 11.5px/1 var(--font-mono); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.filters button:hover { color: var(--text); background: rgba(226, 229, 255, .08); }
.filters button[aria-pressed="true"] { color: #0a0b16; background: var(--text); box-shadow: none; }
.filters button[aria-pressed="true"] span { color: #4a4e70; }
.filters button:disabled { opacity: .4; cursor: default; }
.feed { font: 500 13px/1 var(--font-mono); letter-spacing: .06em; color: var(--text-faint); }
.feed:hover { color: var(--text); }
.empty { color: var(--text-dim); margin-top: 18px; }

.entries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.entry[hidden] { display: none; }
.entry a { height: 100%; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; color: var(--text); background: linear-gradient(180deg, rgba(23, 26, 55, .72), rgba(16, 18, 38, .72)); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .2s ease, transform .2s ease; }
.entry a:hover, .entry a:focus-visible { color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong), 0 18px 50px rgba(6, 7, 16, .55); transform: translateY(-2px); }
.cover { display: block; aspect-ratio: 2 / 1; overflow: hidden; border-bottom: 1px solid var(--border); background: #10122a; }
.cover svg { width: 100%; height: 100%; transition: transform .5s ease; }
.entry a:hover .cover svg { transform: scale(1.04); }
.entry-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; }
.entry .title { font: 700 clamp(19px, 1.7vw, 22px)/1.22 var(--font-display); letter-spacing: -.015em; text-wrap: balance; }
.entry .desc { font-size: 15px; line-height: 1.55; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.entry .meta { margin-top: auto; padding-top: 4px; font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--text-faint); }

/* The newest article leads, across the whole row — unless a filter is on. */
.entry.featured { grid-column: 1 / -1; }
.entry.featured a { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.entry.featured .cover { aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: 1px solid var(--border); order: 2; border-left: 1px solid var(--border); border-right: 0; }
.entry.featured .entry-body { padding: clamp(24px, 3.4vw, 44px); gap: 16px; justify-content: center; }
.entry.featured .title { font-size: clamp(26px, 3vw, 40px); line-height: 1.08; letter-spacing: -.025em; }
.entry.featured .desc { font-size: 17px; -webkit-line-clamp: 4; }
.entry.featured .meta { margin-top: 6px; }
.filtered .entry.featured { grid-column: auto; }
.filtered .entry.featured a { display: flex; }
.filtered .entry.featured .cover { aspect-ratio: 2 / 1; min-height: 0; order: 0; border-left: 0; border-bottom: 1px solid var(--border); }
.filtered .entry.featured .entry-body { padding: 20px 22px 22px; gap: 12px; justify-content: flex-start; }
.filtered .entry.featured .title { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.22; }
.filtered .entry.featured .desc { font-size: 15px; -webkit-line-clamp: 3; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; font: 500 14px/1 var(--font-mono); color: var(--text-faint); }

/* ── The article ────────────────────────────────────────────────────────── */
.post { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(60px, 8vw, 110px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font: 500 13px/1 var(--font-mono); color: var(--text-faint); margin-bottom: clamp(26px, 3.4vw, 40px); }
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--text); }
.post-head { max-width: 900px; display: grid; gap: 18px; }
.post-head h1 { font-size: clamp(34px, 5vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.post-lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--text); opacity: .82; max-width: 62ch; text-wrap: pretty; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 0; font: 500 13px/1.4 var(--font-mono); letter-spacing: .03em; color: var(--text-faint); }
.post-meta > span::before { content: '·'; margin: 0 10px; }

.post-grid { display: grid; grid-template-columns: minmax(0, var(--read)) 240px; justify-content: space-between; gap: 72px; margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(28px, 3.6vw, 40px); border-top: 1px solid var(--border); }
.post-grid.no-toc { grid-template-columns: minmax(0, var(--read)); }
.post-body { min-width: 0; }

/* The short version: stations along one line. */
.short { position: relative; padding: 24px 26px 22px; border-radius: var(--radius); background: rgba(61, 220, 151, .045); box-shadow: inset 0 0 0 1px rgba(61, 220, 151, .2); }
.short h2 { font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--chip-everyone); margin: 0 0 18px; }
.short ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.short ul::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: rgba(61, 220, 151, .35); }
.short li { position: relative; padding-left: 32px; font-size: 17px; line-height: 1.6; color: var(--text); }
.short li::before { content: ''; position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 3px var(--chip-everyone); }
.short code, .qa code { font: 500 .88em var(--font-mono); background: rgba(226, 229, 255, .07); padding: 1px 5px; border-radius: 5px; }

.toc-inline { margin: 22px 0 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--border); background: rgba(18, 20, 42, .5); }
.toc-inline summary { cursor: pointer; padding: 14px 18px; font: 600 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.toc-inline ol { margin: 0; padding: 0 18px 16px 38px; display: grid; gap: 8px; }
.toc-inline a { color: var(--text-dim); font-size: 15px; }

.toc-side { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.toc-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--border); }
.toc-side a { display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--text-faint); transition: color .15s ease, border-color .15s ease; }
.toc-side a:hover { color: var(--text); }
.toc-side a.on { color: var(--text); border-left-color: var(--violet); }

/* Reading. */
.prose { margin-top: 34px; }
.prose > * + * { margin-top: 20px; }
.prose p, .prose li { font-size: 18px; line-height: 1.75; color: var(--prose); }
.prose h2 { font-size: clamp(25px, 2.6vw, 31px); line-height: 1.15; margin-top: 54px; scroll-margin-top: 90px; }
.prose h3 { font-size: clamp(20px, 2vw, 23px); line-height: 1.25; margin-top: 38px; scroll-margin-top: 90px; }
.prose h4 { font: 600 17px/1.3 var(--font-body); margin-top: 28px; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--text-faint); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a, .faq a { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(82, 208, 238, .4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--violet); }
.prose blockquote p { color: var(--text); }
.prose hr { border: 0; height: 1px; background: var(--border-strong); margin: 40px 0; }
.prose :not(pre) > code { font: 500 .86em var(--font-mono); background: rgba(226, 229, 255, .08); padding: 2px 6px; border-radius: 6px; color: var(--text); overflow-wrap: anywhere; }

.code { position: relative; border-radius: 14px; background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--border); }
.code .lang { position: absolute; top: 12px; left: 16px; font: 600 10.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.code pre { margin: 0; padding: 18px; overflow-x: auto; }
.code .lang + pre { padding-top: 38px; }
.code pre code { font: 500 14px/1.65 var(--font-mono); color: var(--steel); }
.code .copy { position: absolute; top: 8px; right: 8px; font: 600 11.5px/1 var(--font-mono); letter-spacing: .04em; color: var(--text-dim); background: rgba(226, 229, 255, .06); border: 0; box-shadow: inset 0 0 0 1px var(--border-strong); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.code .copy:hover { color: var(--text); background: rgba(226, 229, 255, .12); }

.table { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--border); }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--prose); vertical-align: top; }
.table th { color: var(--text); font-weight: 600; background: rgba(226, 229, 255, .04); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }

/* Questions people ask. */
.faq { margin-top: 60px; }
.faq h2 { font-size: clamp(25px, 2.6vw, 31px); margin-bottom: 8px; scroll-margin-top: 90px; }
.qa { padding: 20px 0; border-bottom: 1px solid var(--border); }
.qa h3 { font: 600 18px/1.4 var(--font-body); letter-spacing: 0; color: var(--text); }
.qa p { margin-top: 8px; font-size: 17px; line-height: 1.7; color: var(--prose); }

/* Atlas, sources, the note. */
.atlas-box { margin: 52px 0 0; padding: clamp(24px, 3vw, 32px); border-radius: 20px; background: radial-gradient(520px 260px at 100% 0%, rgba(82, 208, 238, .12), transparent 70%), linear-gradient(135deg, rgba(140, 123, 246, .18), rgba(23, 26, 55, .6)); box-shadow: inset 0 0 0 1px rgba(140, 123, 246, .35); }
.atlas-box .box-label { color: var(--violet); }
.atlas-box h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
.atlas-box p:not(.box-label) { margin-top: 12px; font-size: 17px; line-height: 1.65; color: var(--text); opacity: .9; }
.atlas-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px !important; opacity: 1 !important; }
.text-link { font-weight: 600; color: var(--text); }
.text-link:hover { color: var(--cyan); }

.sources { margin-top: 44px; }
.sources h2 { font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.sources ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.sources li { font-size: 15px; line-height: 1.5; color: var(--text-faint); overflow-wrap: anywhere; }
.sources a { color: var(--text-dim); }
.sources a:hover { color: var(--text); }
.note { margin-top: 28px; font-size: 13.5px; line-height: 1.6; color: var(--text-faint); }

.read-next { margin-top: clamp(56px, 7vw, 88px); padding-top: clamp(32px, 4vw, 44px); border-top: 1px solid var(--border); }
.read-next h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 24px; }

/* ── Narrower screens ───────────────────────────────────────────────────── */
@media (min-width: 1101px) { .toc-inline { display: none; } }
@media (max-width: 1100px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-body { max-width: var(--read); }
  .toc-side { display: none; }
}
@media (max-width: 980px) {
  .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry.featured a { grid-template-columns: 1fr; }
  .entry.featured .cover { order: 0; min-height: 0; aspect-ratio: 2 / 1; border-left: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .entries { grid-template-columns: minmax(0, 1fr); }
  .entry-body, .entry.featured .entry-body { padding: 18px; }
  .entry.featured .title { font-size: 26px; }
  .entry.featured .desc { font-size: 15.5px; }
  .filters button { padding: 9px 12px; font-size: 13.5px; }
  .short { padding: 20px 18px 18px; }
  .short li { font-size: 16.5px; }
  .prose p, .prose li { font-size: 17px; line-height: 1.72; }
  .prose h2 { margin-top: 44px; }
  .code pre code { font-size: 13px; }
  .atlas-box { border-radius: 16px; }
}
