/* Freedom251's blog — The Wire (look.blog = 'wire'). The blog as a newswire: a masthead with the wire's own tape line, the newest story as
   the FLASH, then every story as wire copy down a ruled column — a slug line in the wire's monospace naming its desk (the home city of
   the company it is about) and the day it was filed, the headline, two lines, a small picture. An article opens on its slug line and
   ends "— end —". One stylesheet for the app's /blog/ and home block (src/lib/ui/sites/freedom251/Wire*.svelte) and WordPress's
   listings and articles (ops/wp/theme/parts/wire/). Tokens only, so light and dark follow the site. */

.wi { --mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace; padding-bottom: 40px; }

/* ---------- the masthead ---------- */
.wi-mast { display: grid; gap: 12px; margin-top: 8px; padding-bottom: 18px; border-bottom: 3px double var(--ink); }
.wi-mast h1 { margin: 0; font: 700 clamp(2.6rem, 1.6rem + 4vw, 4.6rem)/.95 var(--font-display); letter-spacing: -.05em; color: var(--ink); }
.wi-mast--sm h1 { font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3rem); }
.wi-tape { display: flex; flex-wrap: wrap; gap: 4px 0; font: 600 .74rem/1.4 var(--mono); letter-spacing: .06em; color: var(--muted); }
.wi-tape span + span::before { content: '·'; margin: 0 .7em; color: var(--accent); }
.wi-tape span:first-child { color: var(--brand); }
.wi-stand { max-width: 62ch; font-size: 1.08rem; line-height: 1.55; color: var(--muted); }
.wi-desks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wi-desks button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--surface); color: var(--ink); font: 600 .8rem/1 var(--mono); letter-spacing: .02em; text-transform: uppercase; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.wi-desks button i { font-style: normal; color: var(--muted); }
.wi-desks button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.wi-desks button.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.wi-desks button.on i { color: inherit; opacity: .75; }

/* ---------- the slug line, the headline, the lines ---------- */
.wi-slug { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font: 600 .72rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wi-slug > * + *::before { content: '/'; margin: 0 .6em; color: var(--line); }
.wi-slug b { padding: 1px 7px; border-radius: 3px; background: var(--ink); color: var(--bg); font-weight: 700; }
.wi-slug b::before { content: "● "; color: var(--accent); }
.wi-slug span:first-of-type { color: var(--brand); }
.wi-hl { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.wi-ex { color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- the flash ---------- */
.wi-flash { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 22px; padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.wi-flash-copy { display: grid; justify-items: start; gap: 12px; min-width: 0; }
.wi-flash .wi-hl { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.6rem); line-height: 1.08; letter-spacing: -.03em; }
.wi-flash .wi-hl a { color: var(--ink); }
.wi-flash .wi-hl a:hover { color: var(--brand); }
.wi-flash .wi-ex { font-size: 1.04rem; -webkit-line-clamp: 4; }
.wi-go { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.wi-go:hover { color: var(--brand); }
.wi-flash-pic { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.wi-flash-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- the copy ---------- */
.wi-copy { display: grid; margin: 0; padding: 0; list-style: none; }
.wi-item { display: grid; grid-template-columns: 210px minmax(0, 1fr) 168px; gap: 8px 24px; align-items: start; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.wi-item:not(:has(.wi-pic)) { grid-template-columns: 210px minmax(0, 1fr); }
.wi-item .wi-slug { padding-top: 4px; }
.wi-body { display: grid; gap: 6px; min-width: 0; color: var(--ink); }
.wi-body:hover { color: var(--ink); }
.wi-body .wi-hl { font-size: 1.18rem; }
.wi-body:hover .wi-hl { color: var(--brand); }
.wi-body .wi-ex { font-size: .94rem; }
.wi-pic { display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.wi-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wi-none { margin: 20px 0 0; padding: 16px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.wi-none button { border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); cursor: pointer; }
.wi-end { margin: 22px 0 0; font: 600 .78rem/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); text-align: center; }

/* ---------- pager ---------- */
.wi-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; margin-top: 24px; font: 600 .84rem/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wi-pager a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 6px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.wi-pager a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.wi-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 6px; color: var(--ink); }
.wi-pager .page-numbers.current { background: var(--ink); color: var(--bg); }
.wi-pager a.page-numbers { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.wi-pager .dots { min-width: 0; padding: 0 2px; }

/* ---------- the home block ---------- */
.wi-home { padding-bottom: 0; margin-top: 10px; }
.wi-home-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding-bottom: 10px; border-bottom: 3px double var(--ink); }
.wi-home-head h2 { margin: 0; font: 700 clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem)/1.05 var(--font-display); letter-spacing: -.04em; }
.wi-home-head a { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.wi-copy--home .wi-item { padding: 14px 0; grid-template-columns: 210px minmax(0, 1fr) 120px; }
.wi-copy--home .wi-item:not(:has(.wi-pic)) { grid-template-columns: 210px minmax(0, 1fr); }

/* ---------- WordPress: listings ---------- */
.wi-list .wi-wrapbody, .wi-art .wi-wrapbody { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: clamp(26px, 4vw, 48px); align-items: start; margin-top: 22px; }
.wi .wi-wrapbody--full { grid-template-columns: minmax(0, 1fr); }
.wi-list .wi-item { grid-template-columns: 170px minmax(0, 1fr) 140px; }
.wi-list .wi-item:not(:has(.wi-pic)) { grid-template-columns: 170px minmax(0, 1fr); }
.wi-empty { margin: 0; padding: 22px; border-radius: 8px; background: var(--surface-2); color: var(--muted); text-align: center; }

/* ---------- WordPress: an article as wire copy ---------- */
.wi-art .wi-head { display: grid; gap: 14px; margin-top: 10px; padding-bottom: 20px; border-bottom: 3px double var(--ink); }
.wi-art .wi-head h1 { margin: 0; max-width: 24ch; font: 700 clamp(2.1rem, 1.3rem + 3vw, 3.6rem)/1.04 var(--font-display); letter-spacing: -.04em; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; }
.wi-art .wi-stand { font-size: 1.15rem; }
.wi-byline { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: .9rem; color: var(--muted); }
.wi-byline > * + *::before { content: '·'; margin: 0 .55em; }
.wi-byline a { color: var(--ink); font-weight: 600; }
.wi-art .wi-hero { margin: 22px 0 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.wi-art .wi-hero img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.wi-art .wi-hero figcaption { padding: 8px 14px; font-size: .84rem; color: var(--muted); background: var(--surface); }
.wi-art .pdt-paper { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; overflow: clip; overflow-clip-margin: 8px; } /* clip: an ad or embed wider than a phone must never widen the page */
.wi-art .entry-content { font-size: 1.08rem; line-height: 1.75; max-width: 68ch; }
.wi-art .entry-content > p:first-of-type::first-line { font-weight: 600; }
.wi-art .entry-content h2 { margin: 1.9em 0 .6em; font: 700 clamp(1.4rem, 1.15rem + .9vw, 1.85rem)/1.2 var(--font-display); letter-spacing: -.02em; }
.wi-art .entry-content h2::before { content: '■ '; color: var(--accent); font-size: .6em; vertical-align: .2em; }
.wi-art .entry-content h3 { margin: 1.6em 0 .45em; font: 700 1.2rem/1.25 var(--font-display); }
.wi-art .entry-content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wi-art .entry-content a:hover { color: var(--brand); }
.wi-art .entry-content ol li::marker { color: var(--brand); font-weight: 700; }
.wi-art .entry-content ul li::marker { color: var(--accent); }
.wi-art .entry-content blockquote { margin: 1.7em 0; padding: 4px 0 4px 20px; border: 0; border-left: 4px solid var(--brand); color: var(--ink); font: 600 1.2rem/1.5 var(--font-display); }
.wi-art .entry-content blockquote p { margin: 0 0 .6em; }
.wi-art .entry-content blockquote p:last-child { margin: 0; }
.wi-art .entry-content table { font-size: .96rem; font-variant-numeric: tabular-nums; }
.wi-art .entry-content th { background: var(--surface-2); color: var(--ink); font: 700 .8rem/1.3 var(--font-text); }
.wi-art .entry-content img, .wi-art .entry-content figure img { border-radius: var(--radius); }
.wi-art .entry-content code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); font-family: var(--mono); font-size: .88em; }
.wi-art .entry-content pre { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); overflow-x: auto; font-family: var(--mono); }
.wi-art .entry-content pre code { padding: 0; background: none; }
.wi-art .wi-end { margin-top: 30px; }
.wi-hop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.wi-hop a { display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.wi-hop a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.wi-hop a.nx { grid-column: 2; text-align: right; }
.wi-hop small { font: 600 .7rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wi-hop .wi-hl { font-size: 1.04rem; }
.wi-more { margin-top: 36px; }
.wi-more h2 { margin: 0; padding-bottom: 10px; border-bottom: 3px double var(--ink); font: 700 clamp(1.4rem, 1.15rem + .9vw, 1.85rem)/1.2 var(--font-display); letter-spacing: -.03em; }
.wi-art .pdt-comments { margin-top: 34px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.wi-art .pdt-comments h2, .wi-art .pdt-comments .comment-reply-title { margin: 0 0 10px; font: 700 1.3rem/1.25 var(--font-display); }

/* ---------- the site's sidebar ---------- */
.pdt-side.jr-side .widget { padding: 4px 16px 10px; border: 0; border-top: 3px double var(--ink); border-radius: 0; background: none; box-shadow: none; }
.pdt-side.jr-side .widget-title { margin: 10px 0 6px; padding: 0; background: none; color: var(--brand); font: 600 .74rem/1.4 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.pdt-side.jr-side .pdt-latest-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pdt-side.jr-side .pdt-latest-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.pdt-side.jr-side .pdt-latest-list a:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.pdt-side.jr-side .pdt-latest-list img { grid-row: span 2; width: 64px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; border-radius: 6px; }
.pdt-side.jr-side .pdt-latest-t { font-weight: 700; font-size: .94rem; line-height: 1.25; color: var(--ink); }
.pdt-side.jr-side .pdt-latest-d { font: 600 .72rem/1.4 ui-monospace, 'SFMono-Regular', Menlo, monospace; text-transform: uppercase; color: var(--muted); }
.pdt-side.jr-side .ym-latest-posts-widget { --ym-latest-accent: var(--brand); }
.pdt-side.jr-side .ym-sidebar-latest-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; min-block-size: 0; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pdt-side.jr-side .ym-sidebar-latest-card:last-child { border-bottom: 0; }
.pdt-side.jr-side .ym-sidebar-latest-media { aspect-ratio: 16 / 9; border-radius: 6px; }
.pdt-side.jr-side .ym-sidebar-latest-rank { background: var(--brand); color: var(--brand-ink); box-shadow: none; border-radius: 4px; }
.pdt-side.jr-side .ym-sidebar-latest-title { font-weight: 700; font-size: .94rem; color: var(--ink); }

/* ---------- narrower screens ---------- */
@media (max-width: 1080px) {
  .wi-list .wi-wrapbody, .wi-art .wi-wrapbody { grid-template-columns: minmax(0, 1fr); }
  .wi .wi-wrapbody > .pdt-side { max-width: 640px; }
}
@media (max-width: 860px) {
  .wi-flash { grid-template-columns: minmax(0, 1fr); }
  .wi-flash-pic { order: -1; }
  .wi-item, .wi-list .wi-item, .wi-copy--home .wi-item { grid-template-columns: minmax(0, 1fr) 120px; }
  .wi-item:not(:has(.wi-pic)), .wi-list .wi-item:not(:has(.wi-pic)), .wi-copy--home .wi-item:not(:has(.wi-pic)) { grid-template-columns: minmax(0, 1fr); }
  .wi-item .wi-slug { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .wi-desks { flex-wrap: nowrap; overflow-x: auto; margin: 4px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
  .wi-desks button { flex: none; }
  .wi-item, .wi-list .wi-item, .wi-copy--home .wi-item { grid-template-columns: minmax(0, 1fr) 96px; gap: 6px 14px; }
  .wi-body .wi-hl { font-size: 1.06rem; }
  .wi-body .wi-ex { display: none; }
  .wi-art .entry-content { font-size: 1.04rem; }
  .wi-hop { grid-template-columns: minmax(0, 1fr); }
  .wi-hop a.nx { grid-column: 1; }
}
