/* Inferse Event Stream — the blog as a live event log, in the directory's dark signal dress (tokens, bar and footer come from
   /wp-chrome/). Lists are timelines (a lime dot per story); a story reads like an event report with a T+ contents rail. Only
   the theme's own classes and the story's own top-level elements are styled: ad units, the affiliate strip, boxes, banners and
   plugin cards keep their own look (the strip and the Amazon boxes only read the colour tokens set at the end). */

body.ifs { min-height: 100vh; display: flex; flex-direction: column; }
body.ifs > main { flex: 1; }
.ifs-anchor { display: block; height: 0; margin: 0; padding: 0; }
.ifs-narrow { width: min(860px, 100% - 40px); margin-inline: auto; }
.shell .ifs-narrow, .ifs-narrow .ifs-narrow { width: auto; max-width: 860px; }
.ifs h1 { margin: 0; color: var(--ink); font: 750 clamp(30px, 20px + 2.6vw, 50px)/1.05 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.ifs-kick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--lime); font: 600 13px var(--text); letter-spacing: 0.06em; text-transform: uppercase; }
.ifs-kick a { color: inherit; text-decoration: none; }
.ifs-kick a:hover { text-decoration: underline; }
.ifs-live { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); }
.ifs-head { padding: 44px 0 20px; }
.ifs-about { max-width: 44rem; margin: 14px 0 0; color: var(--ink-2); font-size: 18px; }

/* the timeline */
.ifs-stream { margin: 8px 0 0; padding: 0; list-style: none; border-left: 2px solid var(--line-2); }
.ifs-event { position: relative; padding: 0 0 6px 26px; }
.ifs-event::before { content: ''; position: absolute; left: -7px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--bg); }
.ifs-event a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px 14px; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.ifs-event a:hover { background: var(--panel); }
.ifs-event a:hover b { color: var(--lime); }
.ifs-event-text { display: grid; gap: 4px; min-width: 0; }
.ifs-meta { color: var(--muted); font-size: 13px; }
.ifs-topic { color: var(--sky); }
.ifs-event b { font: 700 20px/1.25 var(--display); letter-spacing: -0.015em; }
.ifs-ex { display: -webkit-box; overflow: hidden; color: var(--ink-2); font-size: 15px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ifs-pic { display: block; width: 150px; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.ifs-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ifs-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 30px 0 0; }
.ifs-pager .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); font: 700 14px var(--display); text-decoration: none; }
.ifs-pager a.page-numbers:hover { border-color: var(--lime); color: var(--lime); }
.ifs-pager .current { border-color: var(--lime); background: var(--lime); color: var(--lime-ink); }
.ifs-pager .dots { border: 0; }

/* a story */
.ifs-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-top: 34px; }
.ifs-cols.ifs-solo { grid-template-columns: minmax(0, 780px); justify-content: center; }
.ifs-story { min-width: 0; }
.ifs-story-head { padding-bottom: 22px; }
.ifs-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.ifs-byline a { color: var(--ink); font-weight: 600; text-decoration: none; }
.ifs-face { width: 30px; height: 30px; border-radius: 50%; }
.ifs-hero { margin: 0 0 26px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel-2); }
.ifs-hero img { display: block; width: 100%; height: auto; }
.ifs-rail-inline { display: none; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.ifs-rail-inline summary { padding: 12px 16px; color: var(--ink); font: 600 14px var(--text); cursor: pointer; }
.ifs-rail-inline ol, .ifs-rail ol { margin: 0; padding: 0 8px 10px; list-style: none; }
.ifs-rail-inline a, .ifs-rail a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 6px; padding: 7px 8px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.35; text-decoration: none; }
.ifs-rail-inline a span, .ifs-rail a span { color: var(--muted); font: 700 12px/1.7 var(--display); }
.ifs-rail-inline a:hover, .ifs-rail a:hover { background: var(--panel-2); color: var(--ink); }
.ifs-rail a[aria-current] { background: var(--lime-soft); color: var(--lime); font-weight: 600; }
.ifs-rail a[aria-current] span { color: var(--lime); }

/* the story's own text (its top-level elements only) */
.ifs-story .entry-content { color: var(--ink); font-size: 18px; line-height: 1.72; overflow-wrap: break-word; }
.ifs-story .entry-content > p, .ifs-story .entry-content > ul, .ifs-story .entry-content > ol { margin: 0 0 1.1em; }
.ifs-story .entry-content > ul, .ifs-story .entry-content > ol { padding-left: 1.4em; }
.ifs-story .entry-content > ul > li, .ifs-story .entry-content > ol > li { margin: 0.35em 0; }
.ifs-story .entry-content > :is(ul, ol) > li::marker { color: var(--lime); }
.ifs-story .entry-content > h2 { margin: 1.8em 0 0.5em; font: 700 28px/1.18 var(--display); letter-spacing: -0.02em; scroll-margin-top: calc(var(--ifs-top, 0px) + 20px); text-wrap: balance; }
.ifs-story .entry-content > h3 { margin: 1.5em 0 0.4em; font: 700 21px/1.25 var(--display); scroll-margin-top: calc(var(--ifs-top, 0px) + 20px); }
.ifs-story .entry-content > :is(p, ul, ol, table, blockquote) a { color: var(--lime); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ifs-story .entry-content > blockquote { margin: 1.5em 0; padding: 14px 18px; border-left: 3px solid var(--sky); border-radius: 0 var(--r) var(--r) 0; background: var(--sky-soft); }
.ifs-story .entry-content > blockquote > p { margin: 0 0 0.5em; }
.ifs-story .entry-content > blockquote > p:last-child { margin: 0; }
.ifs-story .entry-content > table { margin: 1.5em 0; border-spacing: 0; border-collapse: separate; font-size: 15px; line-height: 1.5; }
.ifs-story .entry-content > table :is(th, td) { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ifs-story .entry-content > table th { background: var(--panel-2); color: var(--ink); font: 600 12.5px var(--text); letter-spacing: 0.05em; text-transform: uppercase; }
.ifs-story .entry-content > table thead th:first-child { border-top-left-radius: 10px; }
.ifs-story .entry-content > table thead th:last-child { border-top-right-radius: 10px; }
.ifs-story .entry-content > :is(figure, p) img { border-radius: 12px; }
.ifs-story .entry-content > pre { overflow: auto; margin: 1.4em 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font: 500 14px/1.6 ui-monospace, Menlo, monospace; }
.ifs-story .entry-content > :is(p, ul, ol) code { padding: 0.1em 0.38em; border-radius: 5px; background: var(--panel-2); font: 500 0.88em ui-monospace, Menlo, monospace; }
.ifs-story .entry-content > hr { height: 1px; margin: 2em 0; border: 0; background: var(--line); }
.ifs-story .entry-content > .ifs-short { padding: 18px 20px; border: 1px solid var(--line); border-left: 3px solid var(--lime); border-radius: var(--r-lg); background: var(--panel); font-size: 17px; line-height: 1.6; }
.ifs-short > :is(strong, b):first-child { display: inline-flex; align-items: center; height: 22px; margin: 0 8px 6px 0; padding: 0 9px; border-radius: 999px; background: var(--lime-soft); color: var(--lime); font: 700 11.5px var(--text); letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 2px; }
.ifs-pages { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.ifs-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 34px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.ifs-tags > span { color: var(--muted); font: 600 12px var(--text); letter-spacing: 0.08em; text-transform: uppercase; }
.ifs-tags a { color: var(--sky); font: 600 14.5px var(--text); text-decoration: none; }
.ifs-tags a:hover { text-decoration: underline; }

/* the side: the site's widgets first (Phase 3's banner after them), then the newest events, then the T+ rail */
.ifs-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ifs-side .widget-title, .ifs-side .block-title { margin: 0 0 10px; color: var(--muted); font: 600 12px var(--text); letter-spacing: 0.1em; text-transform: uppercase; }
.ifs-latest { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.ifs-latest ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ifs-latest a { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 15px; line-height: 1.35; text-decoration: none; }
.ifs-latest li:last-child a { border-bottom: 0; }
.ifs-latest time { color: var(--lime); font: 700 12px/1.7 var(--display); }
.ifs-latest a:hover { color: var(--lime); }
.ifs-rail { position: sticky; top: calc(var(--ifs-top, 0px) + 20px); max-height: calc(100vh - var(--ifs-top, 0px) - 40px); overflow: auto; padding: 16px 8px 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.ifs-rail .widget-title { margin: 0 8px 8px; }

/* related, replies, the footer menu, the lost page */
.ifs-related { margin-top: 56px; }
.ifs-related h2 { margin: 0 0 12px; color: var(--ink); font: 700 26px var(--display); letter-spacing: -0.02em; }
.ifs-talk { margin-top: 48px; }
.ifs-talk h2 { margin: 0 0 14px; color: var(--ink); font: 700 22px var(--display); }
.ifs-thread, .ifs-thread .children { margin: 0; padding: 0; list-style: none; }
.ifs-thread .children { margin-left: 18px; padding-left: 18px; border-left: 2px solid var(--line); }
.ifs-thread .comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ifs-thread .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ifs-thread .comment-author .avatar { border-radius: 50%; }
.ifs-thread .says { display: none; }
.ifs-thread .comment-metadata { margin: 2px 0 8px 40px; font-size: 12.5px; }
.ifs-thread .comment-metadata a { color: var(--muted); text-decoration: none; }
.ifs-thread .comment-content, .ifs-thread .reply { margin-left: 40px; }
.ifs-form p { margin: 0 0 14px; }
.ifs-form label { display: block; margin-bottom: 6px; color: var(--muted); font: 600 12px var(--text); letter-spacing: 0.06em; text-transform: uppercase; }
.ifs-form :is(input[type='text'], input[type='email'], input[type='url'], textarea) { width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--ink); font: 400 16px var(--text); }
.ifs-form :is(input, textarea):focus { border-color: var(--lime); outline: 0; box-shadow: 0 0 0 3px var(--lime-soft); }
.ifs-form .comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; }
.ifs-form .comment-form-cookies-consent label { margin: 0; text-transform: none; letter-spacing: 0; font: 400 14px var(--text); }
.ifs-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; background: var(--lime); color: var(--lime-ink); font: 700 15px var(--text); text-decoration: none; cursor: pointer; }
.ifs-btn--line { border-color: var(--line-2); background: transparent; color: var(--ink); }
.ifs-btn--line:hover { border-color: var(--lime); color: var(--lime); }
.ifs-find { display: flex; gap: 8px; max-width: 560px; margin-top: 8px; }
.ifs-find input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--ink); font: 400 17px var(--text); }
.ifs-find .ifs-btn { height: 48px; }
.ifs-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ifs-estate { padding-bottom: 40px; }
.ifs-footer-menu { margin-top: 48px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.ifs-footer-menu ul { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ifs-footer-menu a { color: var(--muted); text-decoration: none; }
.ifs-footer-menu a:hover { color: var(--lime); }
.ifs .base { margin-top: 18px; }

@media (max-width: 1080px) {
  .ifs-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ifs-rail { display: none; }
  .ifs-rail-inline { display: block; }
}
@media (max-width: 640px) {
  .ifs-narrow { width: calc(100% - 32px); }
  .ifs-head { padding: 28px 0 14px; }
  .ifs-about { font-size: 16px; }
  .ifs-event a { grid-template-columns: minmax(0, 1fr) 92px; gap: 12px; padding: 12px 8px; }
  .ifs-pic { width: 92px; }
  .ifs-event b { font-size: 17px; }
  .ifs-ex { display: none; }
  .ifs-story .entry-content { font-size: 17px; }
  .ifs-story .entry-content > h2 { font-size: 23px; }
  .ifs-hero { margin-inline: -16px; border-radius: 0; border-inline: 0; }
}

/* what the affiliate strip and Amazon boxes read (theme-bridge contract): Inferse's own colours */
body.ifs {
  --ym-p1-display: var(--display); --ym-p1-text: var(--text); --ym-p1-panel: var(--panel); --ym-p1-paper: var(--panel-2);
  --ym-p1-ink: var(--ink); --ym-p1-muted: var(--muted); --ym-p1-rule: var(--line); --ym-p1-rule-dark: var(--line-2);
  --ym-p1-label: var(--lime); --ym-p1-blue: var(--sky); --ym-p1-amber: var(--amber); --ym-p1-violet: var(--lime);
  --ym-aawp-surface: var(--panel); --ym-aawp-panel: var(--panel-2); --ym-aawp-ink: var(--ink); --ym-aawp-muted: var(--muted);
  --ym-aawp-line: var(--line); --ym-aawp-line-soft: var(--panel-2); --ym-aawp-label: var(--lime); --ym-aawp-link: var(--lime);
}
/* the Phase 3 cards take their corners from --radius-s / --radius, resolved on their own wrapper: give that wrapper the
   stream's corners (only there, so nothing else on the page that reads those generic names changes) */
body.ifs .ym-p3-server-gate { --radius-s: 8px; --radius: var(--r); --ymp3-blue: var(--lime); --ymp3-teal: var(--sky); } /* its stock blue and teal become the stream's lime and sky */

/* newsletter and Ko-fi as stream panels: graphite (or white in light), a lime signal edge, the lime "go" button */
.ifs .ymel, .ifs .ymel-x {
  --brand: var(--lime); --brand-ink: var(--lime-ink); --surface: var(--panel-2); --surface-2: var(--panel);
  --radius: 10px; --radius-lg: var(--r-lg); --font-text: var(--text); --font-display: var(--display); color: var(--ink);
}
.ifs .ymel { border-top-width: 2px; }
.ifs .ymel .ymel-t { font-weight: 700; letter-spacing: -0.01em; }
.ifs .ymel .ymel-brand { font-family: var(--display); }
body.ifs a.ym-donation-kofi { border-color: var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink); box-shadow: none; }
body.ifs a.ym-donation-kofi:hover, body.ifs a.ym-donation-kofi:focus { border-color: var(--lime); background: var(--panel); color: var(--ink); box-shadow: none; }
.ifs a.ym-donation-kofi::before { background: var(--lime); }
.ifs .ym-donation-kofi .ym-donation-kofi__eyebrow { color: var(--lime); font-family: var(--display); letter-spacing: 0.06em; }
.ifs .ym-donation-kofi .ym-donation-kofi__text { color: var(--ink-2); font-family: var(--text); }
.ifs .ym-donation-kofi .ym-donation-kofi__button { border-radius: 10px; background: var(--lime); color: var(--lime-ink) !important; font-family: var(--display); font-weight: 700; animation-name: ifs-kofi-signal; }
.ifs .ym-donation-kofi:hover .ym-donation-kofi__button, .ifs .ym-donation-kofi .ym-donation-kofi__button:focus { background: var(--lime-2); }
.ifs a.ym-donation-kofi-float { border-radius: 10px; background: var(--lime); color: var(--lime-ink) !important; font-family: var(--display); font-weight: 700; animation-name: ifs-kofi-beacon; }
.ifs a.ym-donation-kofi-float:hover, .ifs a.ym-donation-kofi-float:focus { background: var(--lime-2); }
.ifs .ym-donation-kofi-quick .ym-donation-kofi-quick__close { border-color: var(--line-2); background: var(--panel); color: var(--muted); }
.ifs .ym-donation-kofi-quick .ym-donation-kofi-quick__close:hover { border-color: var(--lime); color: var(--ink); }
@keyframes ifs-kofi-signal {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 30%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--lime) 8%, transparent); }
}
@keyframes ifs-kofi-beacon {
  0%, 100% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3), 0 0 0 0 color-mix(in srgb, var(--lime) 30%, transparent); }
  50% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3), 0 0 0 8px color-mix(in srgb, var(--lime) 8%, transparent); }
}
