/* The card of the X post that announced a blog post (tools/x_cards.py writes it as the first child of .ar-main).
   Narrow screens: a block at the top of the body. Wide screens (>= 1320 px, where the contents list also moves to the left margin): it
   sits in the right margin of the body column, as the contents list sits in the left one, and sticks at the top. */
.x-rail { margin: 0 0 36px; }
.x-card { max-width: 560px; padding: 14px 16px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper);
  font-family: var(--font-sans); color: var(--ink); }
.x-card a { color: inherit; text-decoration: none; border-bottom: 0; }
.x-card a.x-card-top { display: block; }
.x-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.x-card-av { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover; background: var(--paper-2); }
.x-card-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; font-size: 14px; line-height: 1.3; }
.x-card-name { font-weight: 600; }
.x-card-handle { color: var(--ink-3); }
.x-card-mark { margin-left: auto; width: 16px; height: 16px; flex: none; fill: var(--ink); }
.x-card-text { display: block; margin: 10px 0 0; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.x-card-media { display: grid; gap: 6px; margin: 10px 0 0; }
.x-card-media img, .x-card-media video { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule-2); background: var(--paper-2); }
.x-card-foot { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.x-card-foot svg { width: 16px; height: 16px; fill: #F91880; }
.x-card-foot > span { color: #F91880; }   /* the like count in X's pink, beside a filled heart (owner 2026-11-06) */
.x-card-foot .x-card-open { margin-left: auto; }
.x-card a.x-card-open:hover, .x-card a.x-card-top:hover .x-card-name { color: var(--accent); }
/* The card always sits in the right margin, never in the body (owner 2026-11-06: 「一定得呆在右侧」, after a 110 % zoom
   put it above the text). >= 1320 px: the margin beside the centred 760 px column holds it, as the left one holds the
   contents list. 1000-1319 px: the page column moves left by 280 px to make that margin. Under 1000 px: no card. */
@media (min-width: 1000px) {
  .ar-main { position: relative; }
  .x-rail { position: absolute; top: 0; bottom: 0; left: calc(100% + 40px); margin: 0; }
  .x-card { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; }
  .x-card-text { font-size: 14px; }
  .x-card-who { font-size: 13px; }
}
@media (min-width: 1320px) {
  .x-rail { width: min(300px, calc((100vw - 760px) / 2 - 64px)); min-width: 200px; }
}
@media (min-width: 1000px) and (max-width: 1319.98px) {
  .ar-page:has(.x-rail) { max-width: calc(1040px + 2 * var(--gutter)); padding-right: calc(var(--gutter) + 280px); }
  .x-rail { width: 240px; }
}
@media (max-width: 999.98px) { .x-rail { display: none; } }
