/* Blog: the log (blog/, pl/blog/) and a post. js/blog.js fills and drives them.
   Choices and rejected rounds: lab/blog.html. */

/* No hero here to carry the logo, so the nav shows it from the start.
   On a phone it sits level with the burger (centre at 38px). */
@media (max-width: 640px) {
  nav { justify-content: flex-start; align-items: flex-start; padding-top: var(--space-3); min-height: 72px; }
  .nav-logo { margin: 0; }
}

.b-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* the page's h1: the nav already says Blog on screen */
/* Type in the blog (lab/type.html: T4). Four roles and two greys, nothing else:
   hero-title (the post title) · title-1 (sections, the verdict, quotes, Next) ·
   body (text, lede, list) · footnote (every label, meta, table, source).
   The blog reads larger than home: body is 20 on a desktop. blog.css loads only
   on blog pages, so this changes nothing on the home page. Mono stays only in code. */
:root { --body: 20px; }
@media (max-width: 1100px) { :root { --body: 18px; } }
@media (max-width: 640px)  { :root { --body: 16px; } }

.b-label { font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); }   /* every small label: one size, one grey */

/* ---------------------------------------------------------------- filters */
.b-bar { margin-top: var(--space-10); display: flex; align-items: center; gap: var(--space-3); font-size: var(--body); line-height: var(--body-lh); letter-spacing: var(--body-ls); }
.b-filters { display: flex; gap: 8px 24px; }
.b-filters button { position: relative; white-space: nowrap; flex: none; color: var(--muted); transition: color 0.25s ease; }
.b-filters button::after { content: ""; position: absolute; inset: -8px 0; }   /* a taller target, no visual gap */
.b-filters button:hover { color: var(--ink); }
.b-filters button[aria-pressed="true"] { color: var(--ink); font-weight: 500; }

/* -------------------------------------------------------------------- log
   The title leads, the meta sits under it. */
.b-log { margin-top: var(--space-3); border-top: 1px solid var(--line); }   /* 24: room for a tooltip over the first row */
.b-ln { position: relative; display: grid; grid-template-columns: 1fr; gap: var(--space-h); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); transition: opacity 0.25s ease; }
.b-log:hover .b-ln:not(:hover) { opacity: 0.5; }
.b-ln b { font-weight: 400; font-size: var(--body); line-height: 1.4; letter-spacing: var(--body-ls); }
.b-m { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); }
.b-lk { color: var(--muted); }
.b-lk svg { display: inline-block; width: 12px; height: 12px; margin-left: var(--space-h); vertical-align: -1px; }
.b-ln.soon { cursor: default; }
.b-tt { white-space: pre-wrap; }
/* Soon: the title rewrites itself, this caret goes with it */
.b-caret { display: inline-block; width: 2px; height: 1em; margin: 0 1px; background: var(--ink); vertical-align: -0.12em; animation: b-blink 0.9s steps(2) infinite; }
@keyframes b-blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------------- post
   837 splits into a rail of 165 and a measure of 640: the rail starts at the
   logo, the text ends at the language switch, title and text share one edge. */
.a { margin-top: var(--space-10); --rail: 165px; }
.a-flow { display: grid; grid-template-columns: var(--rail) minmax(0, 640px); gap: var(--space-4); align-items: start; }
.a-rail { position: sticky; top: var(--space-12); display: flex; flex-direction: column; gap: var(--space-4); }   /* under the floating nav */
.a-back { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); transition: color 0.25s ease; }
.a-back:hover { color: var(--ink); }
.a-back svg { width: 16px; height: 16px; rotate: 180deg; transition: transform 0.35s var(--ease-out); }
.a-back:hover svg { transform: translateX(4px); }
.a-toc { display: flex; flex-direction: column; gap: var(--space-1); border-top: 1px solid var(--line); padding-top: var(--space-2); }
.a-toc a { font-size: var(--footnote); line-height: 1.4; letter-spacing: var(--footnote-ls); color: var(--muted); transition: color 0.25s ease; }
.a-toc a:hover, .a-toc a.on { color: var(--ink); }
.a-copy { align-self: flex-start; font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); transition: color 0.25s ease; }
.a-copy:hover { color: var(--ink); }

/* The meta belongs to the title, not to the rail (lab: M4). The back link in
   .a-top is the phone's, on a desktop it stands in the rail. */
.a-top { margin-bottom: var(--space-3); }
.a-top .a-back { display: none; }
.a-meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-1); font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); }
.a-meta span + span::before { content: "·"; margin-right: var(--space-1); }
/* the kind stays on the title's edge, date and time go to the right edge of the column */
.a-meta span:first-child { margin-right: auto; }
.a-meta span:nth-child(2)::before { content: none; }
.a h1 { font-size: var(--hero-title); line-height: var(--hero-title-lh); letter-spacing: var(--hero-title-ls); font-weight: 400; text-wrap: balance; }
.a-lede { margin-top: var(--space-5); font-size: var(--body); line-height: var(--body-lh); letter-spacing: var(--body-ls); color: var(--muted); text-wrap: pretty; }
/* In short / Verdict: a dark square block, the same ink as the prompt (lab/short.html: S5) */
.a-short-box { margin-top: var(--space-6); background: #121212; color: #ededed; }
.a-short-in { padding: var(--space-3); }
.a-short-box .b-label { display: block; color: rgba(237, 237, 237, 0.6); }   /* the dark block's grey */
.a-verdict { margin-top: var(--space-1); font-size: var(--title-1); line-height: var(--title-1-lh); letter-spacing: var(--title-1-ls); }   /* the score, then its reasons */
.a-short { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-2); }
.a-short li { list-style: none; display: grid; grid-template-columns: 16px 1fr; gap: var(--space-1); font-size: var(--body); line-height: var(--body-lh); letter-spacing: var(--body-ls); }
.a-short li::before { content: ""; width: 6px; height: 6px; margin-top: 11px; background: var(--ink); }
.a-short-box .a-short li::before { background: #ededed; }   /* a square, the pixel of the K */

.a-body { margin-top: var(--space-6); font-size: var(--body); line-height: var(--body-lh); letter-spacing: var(--body-ls); }
.a-body p + p { margin-top: var(--space-3); }
.a-body p a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--muted); transition: text-decoration-color 0.25s ease; }
.a-body p a:hover { text-decoration-color: var(--ink); }
.a-body h2 { margin: var(--space-7) 0 var(--space-2); font-size: var(--title-1); line-height: 1.25; letter-spacing: var(--title-1-ls); font-weight: 400; scroll-margin-top: var(--space-5); }
.a-body > h2:first-child { margin-top: 0; }
.a-body blockquote { margin: var(--space-6) 0; font-size: var(--title-1); line-height: 1.25; letter-spacing: var(--title-1-ls); text-wrap: balance; }
.a-cite { font-size: var(--footnote); color: var(--muted); vertical-align: 0.3em; line-height: 0; padding: 0 2px; }
.a-cite:hover { color: var(--ink); }

/* The blog is square: no rounded corners anywhere in a post.
   The site's tray (a tray inside a tray) becomes one flat block of the lighter grey. */
.a .tray { padding: 0; border: 0; border-radius: 0; background: var(--surface); }
.a .tray-inner { background: none; border-radius: 0; }

/* a sample of an interface, drawn in HTML */
.a-fig { margin: var(--space-6) 0; }
.a-fig .tray-inner { padding: var(--space-3); line-height: 1.8; }
.a-fig mark { background: rgba(10, 10, 10, 0.08); color: inherit; padding: 2px 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.a-fig .b-label { display: block; margin-bottom: var(--space-1); }
.a-fig figcaption { margin-top: var(--space-1); font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); }

.a-table { margin-top: var(--space-4); border-top: 1px solid var(--line); }
.a-tr { display: grid; grid-template-columns: 112px 1fr 1fr; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); }
.a-tr b { font-weight: 500; color: var(--ink); }
.a-tr.h { padding: var(--space-1) 0; }
.a-table + p { margin-top: var(--space-4); }

.a-prompt { position: relative; margin: var(--space-4) 0; padding: var(--space-3); background: #121212; color: #ededed; }
.a-prompt .b-label { color: rgba(237, 237, 237, 0.6); display: block; margin-bottom: var(--space-2); }
.a-prompt pre { font-family: var(--mono); font-size: var(--footnote); line-height: 1.7; white-space: pre-wrap; }
.a-prompt button { position: absolute; top: var(--space-3); right: var(--space-3); font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: rgba(237, 237, 237, 0.6); transition: color 0.25s ease; }
.a-prompt button:hover { color: #fff; }

.a-src { margin-top: var(--space-7); scroll-margin-top: var(--space-5); }
.a-src ol { list-style: none; margin-top: var(--space-1); border-top: 1px solid var(--line); }
.a-src li { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-1); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); scroll-margin-top: var(--space-5); }
.a-src li b { display: block; font-weight: 500; color: var(--ink); }
.a-src-end { display: none; margin-top: var(--space-3); }

/* Source: the primary source, never the video or feed it was found in */
.a-source { display: grid; grid-template-columns: 1fr 16px; align-items: center; gap: var(--space-2); margin-top: var(--space-4); padding: var(--space-2) 0;
            border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); }
.a-source b { display: block; font-weight: 500; color: var(--ink); }
.a-source svg { width: 16px; height: 16px; align-self: center; rotate: -45deg; transition: transform 0.35s var(--ease-out); }
a.a-source:hover svg { transform: translateX(3px); }
.a-source + .a-body { margin-top: var(--space-5); }

/* A picture from the source: the source line credits it, no caption.
   A tap opens it large (js/blog.js). */
.a-img { margin: var(--space-3) 0; }
.a-img img { display: block; width: 100%; height: auto; background: var(--surface); cursor: zoom-in; }
.a-source + .a-img { margin-top: var(--space-4); }
.a-img + .a-body { margin-top: var(--space-5); }
.a-zoom { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--space-3); background: rgba(237, 237, 237, 0.92);
          -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: zoom-out; opacity: 0; transition: opacity 0.3s ease; }
.a-zoom.on { opacity: 1; }
.a-zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; scale: 0.96; transition: scale 0.4s var(--ease-out); }
.a-zoom.on img { scale: 1; }
/* A wide picture on a narrow screen gets the screen's height and pans sideways */
.a-zoom.pan { display: flex; align-items: center; overflow-x: auto; overscroll-behavior: contain; padding: var(--space-2); }
.a-zoom.pan img { flex: none; max-width: none; max-height: none; height: min(60svh, 480px); }
@media (prefers-reduced-motion: reduce) { .a-zoom, .a-zoom img { transition: none; } }

/* Digest: a story is three paragraphs, what happened, the take, the use.
   Air between stories, not labels. */
.d-item + .d-item { margin-top: var(--space-12); }
/* The tag is my verdict on the story: Use is filled, Watch outlined, Hype quiet */
.d-item h2 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.d-tag { flex: none; position: relative; top: -3px; padding: 0 8px; font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); }
.d-use { background: var(--ink); color: var(--bg); }
.d-watch { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.d-hype { box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.d-item .a-source { margin-top: var(--space-3); }
.d-skip p { color: var(--muted); }

/* Next: one card under a short post */
.a-next { display: block; margin-top: var(--space-7); }
.a-next .tray-inner { position: relative; display: flex; flex-direction: column; gap: var(--space-h); padding: var(--space-3); padding-right: var(--space-7); }
.a-next b { margin-top: var(--space-1); font-weight: 400; font-size: var(--title-1); line-height: 1.25; letter-spacing: var(--title-1-ls); }
.a-next span:not(.b-label) { font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); }
.a-next svg { position: absolute; right: var(--space-3); top: 50%; width: 20px; height: 20px; translate: 0 -50%; transition: transform 0.35s var(--ease-out); }
.a-next:hover svg { transform: translateX(4px); }

.a-more { margin-top: var(--space-12); }
.a-more > .b-label { display: block; }
.a-more .b-log { margin-top: var(--space-1); }

/* A short page still ends at the bottom of the screen: main takes what is left. */
body { min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* The end of the page: no call block here, it stands on the badge at home.
   The glyphs sit 9px inside their 40px targets, hence the margin. */
.b-end { margin-top: var(--space-15); padding-bottom: var(--space-5); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
         font-size: var(--footnote); line-height: var(--footnote-lh); letter-spacing: var(--footnote-ls); color: var(--muted); }
.b-end .contact-soc { margin: 0 -9px 0 0; }

/* ------------------------------------------------------------------ phone */
@media (max-width: 640px) {
  .b-bar { margin-top: var(--space-3); }
  /* five kinds do not fit 390: the row scrolls sideways, edge to edge;
     8px of padding keeps the taller tap target inside the scroller */
  .b-bar { margin-inline: calc(-1 * var(--space-2)); }
  .b-filters { overflow-x: auto; scrollbar-width: none; padding: 8px var(--space-2); margin-block: -8px; }
  .b-filters::-webkit-scrollbar { display: none; }
  .a { margin-top: var(--space-3); }
  .a-flow { display: block; }
  .a-rail { display: none; }
  .a-top .a-back { display: inline-flex; }
  .a-meta { margin-top: var(--space-3); }
  .a-lede { margin-top: var(--space-4); }
  .a-short-in { padding: var(--space-3) var(--space-2); }
  .a-tr { grid-template-columns: 1fr; gap: var(--space-h); }
  .a-tr.h { display: none; }
  .a-src-end { display: block; }
  .a-more { margin-top: var(--space-8); }
  .b-end { margin-top: var(--space-10); padding-bottom: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) { .b-caret { animation: none; } }
