/* =========================================================
   Tech News — the list, the article page and Markdown prose (also used by the admin preview).
   Post cards and generated covers live in style.css, because Home uses them too.
   ========================================================= */

/* ---------- List ---------- */
.news-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 24px clamp(28px, 5vw, 72px); align-items: end; }
.news-tools { display: grid; gap: 14px; justify-items: start; }
.news-search { display: flex; align-items: center; gap: 10px; width: 100%; height: 54px; padding: 0 18px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transition: box-shadow 0.3s; }
.news-search:focus-within { box-shadow: var(--glass-shadow), 0 0 0 4px rgba(126, 104, 255, 0.22); }
.news-search .i { color: var(--ink-3); }
.news-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.news-search input::-webkit-search-cancel-button { cursor: pointer; }
.chips small { color: inherit; opacity: 0.6; font-size: 12px; }

.news-body { padding-bottom: clamp(48px, 6vw, 80px); }
.post-feature { margin-bottom: 18px; }
.post-feature__link { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(18px, 3vw, 40px); align-items: center; padding: 12px; border-radius: 34px; color: inherit; }
.post-feature__cover { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 24px; }
.post-feature__cover .cover { position: absolute; inset: 0; transition: transform 1.2s var(--ease-out); }
.post-feature__link:hover .post-feature__cover .cover { transform: scale(1.04); }
.post-feature__cover .cover__glyph { font-size: clamp(3rem, 8vw, 6.4rem); }
.post-feature__body { display: grid; gap: 14px; padding: clamp(6px, 2vw, 24px) clamp(6px, 2vw, 28px) clamp(6px, 2vw, 24px) 0; }
.post-feature__flag { padding: 3px 10px; border-radius: 999px; color: #fff; background: var(--grad); font-size: 11.5px; font-weight: 500; }
.post-feature__title { font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.05; letter-spacing: -0.05em; text-wrap: balance; }
.post-feature__excerpt { color: var(--ink-2); font-size: clamp(15.5px, 1.3vw, 17px); }
.post-feature__author { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.post-feature__author img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--violet); }

.post-skel { display: grid; gap: 12px; padding: 10px 10px 22px; border-radius: 28px; background: var(--glass); border: 1px solid var(--glass-line); }
.post-skel .skeleton:first-child { aspect-ratio: 16 / 10; border-radius: 20px; }
.post-skel .skeleton:nth-child(2) { width: 40%; height: 14px; margin: 8px 12px 0; }
.post-skel .skeleton:nth-child(3) { width: 85%; height: 22px; margin: 0 12px; }
.post-skel .skeleton:nth-child(4) { width: 70%; height: 14px; margin: 0 12px; }
.news-more { display: flex; justify-content: center; margin-top: 32px; }
.news-more .btn[hidden] { display: none; }
.news-state { display: grid; justify-items: center; gap: 12px; max-width: 620px; margin: 24px auto 0; padding: clamp(32px, 5vw, 56px) 28px; border-radius: 32px; text-align: center; }
.news-state[hidden] { display: none; }
.news-state__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: #fff; background: var(--grad); box-shadow: 0 16px 30px -14px rgba(106, 77, 255, 0.85); }
.news-state h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.04em; }
.news-state p { max-width: 46ch; color: var(--ink-2); }
.news-state .btn { margin-top: 6px; }

.news-cta { padding-top: 0; }
.news-cta__band { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 40px; padding: clamp(28px, 4vw, 48px); border-radius: 34px; background: radial-gradient(60% 120% at 100% 0%, rgba(106, 77, 255, 0.16), transparent 60%), radial-gradient(50% 100% at 0% 100%, rgba(255, 79, 154, 0.12), transparent 60%), var(--glass-strong); }
.news-cta__band:hover { --lift: 0px; }
.news-cta__band .eyebrow { margin-bottom: 14px; }
.news-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Article ---------- */
.article__head { padding: calc(var(--nav-h) + clamp(56px, 8vw, 96px)) 0 clamp(26px, 4vw, 40px); }
.article__head-inner { max-width: 940px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 20px; color: var(--ink-3); font-size: 13.5px; }
.article__title { font-size: clamp(2.3rem, 5.4vw, 4.6rem); font-weight: 600; line-height: 1.02; letter-spacing: -0.055em; text-wrap: balance; }
.article__dek { max-width: 62ch; margin-top: 20px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; }
.article__dek:empty { display: none; }
.article__byline { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.article__avatar { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--violet); }
.article__author { margin-right: auto; }
.article__author strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.article__author small { display: block; color: var(--ink-3); font-size: 13px; }
.share { display: flex; flex-wrap: wrap; gap: 6px; }
.share__btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); background: var(--glass-strong); border: 1px solid var(--line-2); transition: color 0.2s, background-color 0.25s, border-color 0.25s, transform 0.35s var(--ease-out); }
.share__btn:hover { color: #fff; background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.share__btn .i { width: 17px; height: 17px; }

.article__cover { margin-bottom: clamp(32px, 5vw, 64px); }
.article__cover > * { position: relative; overflow: hidden; aspect-ratio: 21 / 9; border-radius: clamp(22px, 3vw, 36px); box-shadow: 0 50px 90px -50px rgba(40, 28, 120, 0.55); }
.article__cover .skeleton { display: block; width: 100%; }
.article__cover .cover__glyph { font-size: clamp(3.4rem, 12vw, 9rem); }
.article__cover .cover__pane { width: 30%; }

.article__layout { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: center; }
.article.has-toc .article__layout { grid-template-columns: minmax(180px, 240px) minmax(0, 740px); gap: clamp(28px, 5vw, 72px); justify-content: center; }
.article:not(.has-toc) .article__body { max-width: 740px; margin-inline: auto; width: 100%; }
.article__toc { position: sticky; top: calc(var(--nav-h) + 40px); align-self: start; padding: 18px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.article__toc[hidden] { display: none; }
.article__toc-title { margin-bottom: 10px; color: var(--ink-3); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.article__toc ol { display: grid; gap: 2px; }
.article__toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--ink-3); font-size: 13.5px; line-height: 1.35; border-left: 2px solid transparent; transition: color 0.2s, background-color 0.25s, border-color 0.25s; }
.article__toc .toc__l3 a { padding-left: 22px; font-size: 13px; }
.article__toc a:hover { color: var(--ink); }
.article__toc a.is-active { color: var(--ink); background: rgba(106, 77, 255, 0.08); border-left-color: var(--violet); }

.article__foot { max-width: 740px; display: grid; gap: 24px; margin-top: clamp(40px, 6vw, 64px); }
.article.has-toc .article__foot { max-width: calc(740px + 240px + clamp(28px, 5vw, 72px)); padding-left: calc(240px + clamp(28px, 5vw, 72px)); }
.article__foot[hidden] { display: none; }
.article__foot .tags a { display: block; }
.article__foot .tags:empty { display: none; }
.article__share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.article__share-row > .mono { color: var(--ink-3); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.author-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: center; padding: 22px; border-radius: 28px; }
.author-card:hover { --lift: -3px; }
.author-card img { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--violet); }
.author-card__name .sig { font-size: 2.2rem; line-height: 1; }
.author-card__bio { margin-top: 4px; color: var(--ink-2); font-size: 14.5px; }
.author-card__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 14px; font-weight: 500; }
.author-card__links a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.article-missing { padding: calc(var(--nav-h) + 96px) 0 40px; }
.article-missing[hidden] { display: none; }

/* ---------- Markdown prose ---------- */
.md { color: var(--ink-2); font-size: clamp(16.5px, 1.25vw, 18px); line-height: 1.75; }
.md > * + * { margin-top: 1.15em; }
.md h2, .md h3, .md h4 { color: var(--ink); scroll-margin-top: calc(var(--nav-h) + 40px); }
.md h2 { margin-top: 2.1em; font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.15; letter-spacing: -0.04em; }
.md h3 { margin-top: 1.7em; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.25; letter-spacing: -0.03em; }
.md h4 { margin-top: 1.5em; font-size: 1.1rem; }
.md h2 + *, .md h3 + *, .md h4 + * { margin-top: 0.7em; }
.md strong { color: var(--ink); font-weight: 600; }
.md a { color: var(--violet); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.md a:hover { color: var(--pink); }
.md ul, .md ol { padding-left: 1.4em; }
.md ul { list-style: none; }
.md ul > li { position: relative; }
.md ul > li::before { content: ""; position: absolute; left: -1.05em; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.md ol { list-style: decimal; }
.md ol > li::marker { color: var(--violet); font-family: var(--font-mono); font-size: 0.9em; }
.md li + li { margin-top: 0.45em; }
.md blockquote { margin-inline: 0; padding: 18px 22px; border-radius: 4px 20px 20px 4px; border-left: 3px solid var(--violet); background: rgba(106, 77, 255, 0.06); color: var(--ink); font-size: 1.05em; }
.md blockquote > * + * { margin-top: 0.7em; }
.md hr { height: 1px; margin-block: 2.4em; border: 0; background: linear-gradient(90deg, transparent, var(--line-3), transparent); }
.md img { display: block; max-width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.md img.is-loading { min-height: 220px; width: 100%; background: rgba(24, 18, 70, 0.06); }
.md__figure { margin: 2em 0; }
.md__figure img { margin-inline: auto; box-shadow: 0 30px 60px -36px rgba(30, 20, 90, 0.45); }
.md__figure figcaption { margin-top: 10px; color: var(--ink-3); font-size: 14px; text-align: center; }
.md__missing { display: block; padding: 18px; border-radius: 14px; background: var(--bg-soft); color: var(--ink-3); font-size: 14px; text-align: center; }
.md__table { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line-2); }
.md table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.md th, .md td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.md th { color: var(--ink); background: rgba(24, 18, 70, 0.04); font-weight: 600; }
.md tr:last-child td { border-bottom: 0; }
.md :not(pre) > code { padding: 0.12em 0.42em; border-radius: 7px; background: rgba(106, 77, 255, 0.09); color: #3d2bd9; font-family: var(--font-mono); font-size: 0.86em; }
.md pre { position: relative; overflow-x: auto; padding: 46px 22px 20px; border-radius: 20px; background: #12101f; color: #e9e6ff; font-family: var(--font-mono); font-size: 14px; line-height: 1.7; box-shadow: 0 30px 60px -36px rgba(18, 12, 60, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.md pre::before { content: ""; position: absolute; left: 18px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); box-shadow: 16px 0 0 var(--amber), 32px 0 0 var(--live); }
.md pre[data-lang]::after { content: attr(data-lang); position: absolute; left: 76px; top: 14px; color: rgba(233, 230, 255, 0.45); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.md pre code { display: block; min-width: max-content; background: none; color: inherit; }
.md__copy { position: absolute; right: 12px; top: 10px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #e9e6ff; font-family: var(--font-sans); font-size: 12px; transition: background-color 0.2s; }
.md__copy:hover { background: rgba(255, 255, 255, 0.16); }
/* highlighting in the site's colours */
.md .hljs-keyword, .md .hljs-selector-tag, .md .hljs-literal, .md .hljs-meta .hljs-keyword { color: #b9a6ff; }
.md .hljs-string, .md .hljs-regexp, .md .hljs-addition { color: #7ee0c3; }
.md .hljs-number, .md .hljs-symbol, .md .hljs-bullet { color: #ffb37a; }
.md .hljs-comment, .md .hljs-quote { color: #8a86ad; font-style: italic; }
.md .hljs-title, .md .hljs-title.function_, .md .hljs-section { color: #7fc4ff; }
.md .hljs-title.class_, .md .hljs-type, .md .hljs-built_in { color: #ffd479; }
.md .hljs-attr, .md .hljs-attribute, .md .hljs-variable, .md .hljs-template-variable, .md .hljs-property { color: #ff8fc0; }
.md .hljs-meta, .md .hljs-params { color: #d9d5f5; }
.md .hljs-deletion { color: #ff8a8a; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .article.has-toc .article__layout { grid-template-columns: minmax(0, 740px); }
  .article__toc { position: static; margin-bottom: 28px; }
  .article.has-toc .article__foot { padding-left: 0; max-width: 740px; }
}
@media (max-width: 900px) {
  .news-hero__grid { grid-template-columns: 1fr; }
  .post-feature__link { grid-template-columns: 1fr; }
  .post-feature__body { padding: 6px 10px 12px; }
}
@media (max-width: 640px) {
  .article__cover > * { aspect-ratio: 16 / 10; }
  .article__byline .share { width: 100%; }
  .md pre { margin-inline: calc(var(--gutter) * -0.5); border-radius: 16px; font-size: 13px; }
  .author-card { grid-template-columns: 1fr; }
}

/* Newsroom byline: the studio mark instead of a portrait */
.article__avatar.is-logo, .author-card > img.is-logo { object-fit: contain; background: #fff; padding: 6px; box-sizing: border-box; }
