/* Hallmark · genre: editorial · macrostructure: Ecosystem Index · theme: custom
 * vibe: "dark insider, redacted, electric, dense"
 * paper  oklch(17% 0.012 265) #0d0f15   ·  accent oklch(62% 0.21 264) #427bff
 * display Archivo · body IBM Plex Sans · mono IBM Plex Mono
 * axes: paper-band=dark · display-style=grotesk-sans · accent-hue=cool
 * nav: N6 Newspaper masthead · footer: Ft4 Dense colophon · enrichment: none
 * pre-emit critique (run 2026-08-26): P3 H3 E3 S2 R4 V5 -> revised
 *   S2 was the one that mattered: without the wordmark this read as a generic
 *   dark news template. Fixed by surfacing what the site actually knows about a
 *   story on the index -- source handle, age, unconfirmed flag -- rather than
 *   the category and date any blog shows.
 * slop: gate 48 (raw hexes outside the token block) and gate 9 (identical
 *   section rhythm) failed on the first pass; both fixed.
 *
 * Theme Name:  LeakedFC
 * Theme URI:   https://leakedfc.com
 * Description: Dark editorial theme for leakedfc.com — masthead, dense index, redaction motif.
 * Author:      LeakedFC
 * Template:    twentytwentyfive
 * Version:     0.1.0
 * Text Domain: leakedfc
 */

/* ---------------------------------------------------------------- primitives */

:root {
  --lfc-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --lfc-dur:      160ms;

  /* Consumed by the mu-plugin's tweet cards, which previously fell back to
     hardcoded values against a white background. */
  --lfc-border: var(--wp--preset--color--hairline);
  --lfc-card:   var(--wp--preset--color--paper-2);
  --lfc-accent: var(--wp--preset--color--accent);
}

html, body { overflow-x: clip; }

::selection { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--wp--preset--color--accent-lift);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------ eyebrow / meta */

.lfc-meta {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted-dim);
}

/* ------------------------------------------------------------------ masthead */

.lfc-masthead {
  border-bottom: 1px solid var(--wp--preset--color--hairline);
  box-shadow: 0 1px 0 var(--wp--preset--color--hairline);   /* the broadsheet double rule */
  margin-bottom: 3px;
}
/* wpautop wraps inline shortcode output in <p>; display:contents lets the spans
   become the real flex children instead of one paragraph sitting at the start. */
.lfc-masthead__issue > p,
.lfc-masthead__brand > p { display: contents; }
.lfc-masthead__brand { margin: 0; }

.lfc-masthead__issue {
  display: flex;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--40);
  border-bottom: 1px solid var(--wp--preset--color--hairline);
  padding-block: 0.45rem;
}
.lfc-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--wp--preset--color--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  min-width: 0;
}
.lfc-wordmark:hover { color: var(--wp--preset--color--ink); }
.lfc-wordmark__leaked { color: var(--wp--preset--color--ink); }
/* The shield already carries FC. Repeating it in a filled plate beside the mark
   made the same two letters appear twice in three centimetres, so the wordmark
   keeps the tie in colour alone. */
.lfc-wordmark__fc { color: var(--wp--preset--color--accent); }

/* Big enough to actually read the shield. At 1.6rem it was a smudge. */
.lfc-mark {
  flex: 0 0 auto;
  width: clamp(2.5rem, 6.5vw, 3.25rem);
  height: clamp(2.5rem, 6.5vw, 3.25rem);
}

/* Category rail under the wordmark. Wraps, never truncates, never two-lines a link. */
.lfc-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--wp--preset--spacing--50);
  padding-block: 0.7rem;
}
.lfc-sections a {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.45rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color var(--lfc-dur) var(--lfc-ease-out), border-color var(--lfc-dur) var(--lfc-ease-out);
}
.lfc-sections a:hover,
.lfc-sections a[aria-current] { color: var(--wp--preset--color--ink); border-bottom-color: var(--wp--preset--color--accent); }

/* -------------------------------------------------------------- positioning */

/* Ecosystem Index opens with a positioning line, not a display hero — the
   discovery surfaces below are the page, not a headline. */
.lfc-intro > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.lfc-intro { border-bottom: 1px solid var(--wp--preset--color--hairline); padding-bottom: var(--wp--preset--spacing--50); }
.lfc-intro__h {
  font-size: var(--wp--preset--font-size--xxl) !important;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
  min-width: 0;
}
.lfc-intro__p { color: var(--wp--preset--color--muted); max-width: 58ch; margin: 0; font-size: var(--wp--preset--font-size--sm); }

/* --------------------------------------------------------------- wire line */

.lfc-wire {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.45rem;
  margin: 0;
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  color: var(--wp--preset--color--muted-dim);
  min-width: 0;
}
.lfc-wire__src { color: var(--lfc-cat, var(--wp--preset--color--accent-lift)); overflow-wrap: anywhere; }
.lfc-wire__dot { opacity: 0.5; }
.lfc-wire__flag {
  margin-left: 0.15rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid color-mix(in oklab, var(--wp--preset--color--warn) 55%, transparent);
  border-radius: 2px;
  color: var(--wp--preset--color--warn);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.6875rem;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- rail heads */

.lfc-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--40);
  border-bottom: 1px solid var(--wp--preset--color--hairline);
  padding-bottom: 0.55rem;
  margin-bottom: var(--wp--preset--spacing--50);
}
.lfc-rail-head h2 {
  font-size: var(--wp--preset--font-size--sm) !important;
  font-family: var(--wp--preset--font-family--mono) !important;
  font-weight: 500 !important;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  margin: 0;
}
.lfc-rail-head a { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-decoration: none; white-space: nowrap; }

/* -------------------------------------------------------------- story plates */

/* The fallback when a post has no featured image: a category-tinted plate that
   occupies the exact box a generated card will later fill, so adding real
   images changes no layout. */
.lfc-plate {
  container-type: inline-size;
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: 3px;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 7px,
      color-mix(in oklab, var(--lfc-cat, var(--wp--preset--color--accent)) 9%, transparent) 7px 8px
    ),
    var(--wp--preset--color--paper-2);
}
/* Source-image thumbnail. Fills the same box the drawn plate occupies, so which
   one renders never changes the layout. */
.lfc-plate--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The lead is the one image large enough to actually read, and cropping it cuts
   out the thing the story is about. Contain it, in a slightly taller box, and
   let the striped ground carry the remainder. Thumbnails still crop — at that
   size they are a signal, not a document. */
.lfc-lead .lfc-plate { aspect-ratio: 16 / 10; }
.lfc-lead .lfc-plate--photo img { object-fit: contain; }

.lfc-plate__bars {
  position: absolute;
  inset: 50% 12% auto 8%;
  transform: translateY(-45%);
  display: grid;
  gap: 2.4cqw;
}
.lfc-plate__bars span {
  height: 1.9cqw;
  min-height: 3px;
  border-radius: 1px;
  background: color-mix(in oklab, var(--wp--preset--color--muted) 45%, transparent);
}
.lfc-plate__bars span:nth-child(1) { width: 96%; }
.lfc-plate__bars span:nth-child(2) { width: 78%; }
.lfc-plate__bars span:nth-child(3) { width: 92%; }
.lfc-plate__bars span:nth-child(4) { width: 61%; }
.lfc-plate__bars span:nth-child(5) { width: 34%; background: var(--lfc-cat, var(--wp--preset--color--accent)); }
.lfc-plate__tag {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--ink);
  background: color-mix(in oklab, var(--wp--preset--color--paper) 78%, transparent);
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: 2px;
  padding: 0.2rem 0.45rem;
}

/* Per-category hue, by token — never a raw value. */
[data-cat="leaks"]       { --lfc-cat: var(--wp--preset--color--accent); }
[data-cat="ratings"]     { --lfc-cat: var(--wp--preset--color--accent-lift); }
[data-cat="promos"]      { --lfc-cat: var(--wp--preset--color--warn); }
[data-cat="patch-notes"] { --lfc-cat: var(--wp--preset--color--muted); }
[data-cat="new-content"] { --lfc-cat: var(--wp--preset--color--accent-lift); }

/* ------------------------------------------------------------------ post grid */

/* WP's block-gap rule puts margin-block-start on every sibling item, which
   stacks on top of the grid's own row-gap and knocks the second card down. */
.lfc-grid > *, .lfc-lead > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }

.lfc-grid { display: grid; gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50); }
@media (min-width: 40rem) {
  .lfc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
}
@media (min-width: 64rem) { .lfc-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); } }

.lfc-grid > .wp-block-post,
.lfc-card { align-self: start; display: grid; gap: var(--wp--preset--spacing--30); min-width: 0; }
.lfc-grid > .wp-block-post .wp-block-post-title,
.lfc-card .wp-block-post-title {
  font-size: var(--wp--preset--font-size--lg);
  line-height: 1.22;
  letter-spacing: -0.018em;
  margin: 0;
  overflow-wrap: anywhere;
}
.lfc-grid > .wp-block-post .wp-block-post-title a,
.lfc-card .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.lfc-grid > .wp-block-post .wp-block-post-title a:hover,
.lfc-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-lift); }
.lfc-grid > .wp-block-post .wp-block-post-excerpt,
.lfc-card .wp-block-post-excerpt { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--sm); margin: 0; }
.lfc-grid > .wp-block-post img, .lfc-grid > .wp-block-post .wp-block-post-featured-image,
.lfc-card img, .lfc-card .wp-block-post-featured-image { border-radius: 3px; }
.lfc-grid > .wp-block-post:hover .lfc-plate,
.lfc-card:hover .lfc-plate { border-color: color-mix(in oklab, var(--lfc-cat, var(--wp--preset--color--accent)) 50%, var(--wp--preset--color--hairline)); }

/* The lead story: one story gets the room, the rest share a grid. */
.lfc-lead { display: grid; gap: var(--wp--preset--spacing--50); align-items: start; }
@media (min-width: 52rem) { .lfc-lead { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.lfc-lead .wp-block-post-title {
  font-size: var(--wp--preset--font-size--xxxl);
  line-height: 1.08;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.lfc-lead .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.lfc-lead .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-lift); }
.lfc-lead .wp-block-post-excerpt { font-size: var(--wp--preset--font-size--base); color: var(--wp--preset--color--muted); }

/* ---------------------------------------------------------- browse-by rail */

.lfc-browse { display: grid; gap: var(--wp--preset--spacing--30); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.lfc-browse a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--30);
  min-height: 44px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: 3px;
  background: var(--wp--preset--color--paper-2);
  color: var(--wp--preset--color--ink);
  text-decoration: none;
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--lfc-dur) var(--lfc-ease-out), border-color var(--lfc-dur) var(--lfc-ease-out);
}
.lfc-browse a:hover { background: var(--wp--preset--color--paper-3); border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.lfc-browse a span { color: var(--wp--preset--color--muted-dim); }

/* --------------------------------------------------------------- single post */

.lfc-article__head { border-bottom: 1px solid var(--wp--preset--color--hairline); padding-bottom: var(--wp--preset--spacing--50); }
.lfc-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem var(--wp--preset--spacing--40); }
.lfc-byline .wp-block-post-author-name a,
.lfc-byline .wp-block-post-terms a { color: var(--wp--preset--color--muted); text-decoration: none; }
.lfc-byline .wp-block-post-author-name a:hover,
.lfc-byline .wp-block-post-terms a:hover { color: var(--wp--preset--color--accent-lift); }

.lfc-prose { font-size: var(--wp--preset--font-size--lg); line-height: 1.72; }
.lfc-prose p { max-width: 68ch; }
.lfc-prose h2 { margin-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--30); }
.lfc-prose strong { color: var(--wp--preset--color--ink); font-weight: 600; }

/* Breadcrumbs from Rank Math. */
.lfc-crumbs { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); color: var(--wp--preset--color--muted-dim); }
.lfc-crumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.lfc-crumbs a:hover { color: var(--wp--preset--color--accent-lift); }
.lfc-crumbs .separator { padding-inline: 0.4rem; opacity: 0.6; }

/* --------------------------------------------------------------- ad reserves */

/* Dimensioned while empty. Retrofitting ad slots into a finished layout is how
   sites wreck CLS at the moment they start earning. */
.lfc-ad {
  display: grid;
  place-items: center;
  border: 1px dashed var(--wp--preset--color--hairline);
  border-radius: 3px;
  background: var(--wp--preset--color--paper-2);
  color: var(--wp--preset--color--muted-dim);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lfc-ad[data-slot="leaderboard"] { min-height: 90px; }
.lfc-ad[data-slot="in-article"]  { min-height: 250px; }
.lfc-ad:empty::after { content: "Advertisement"; }

/* ------------------------------------------------------------------ colophon */

.lfc-colophon {
  border-top: 1px solid var(--wp--preset--color--hairline);
  margin-top: var(--wp--preset--spacing--80);
  padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  line-height: 1.85;
  color: var(--wp--preset--color--muted-dim);
}
.lfc-colophon__grid { display: grid; gap: var(--wp--preset--spacing--50); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.lfc-colophon dt { color: var(--wp--preset--color--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.35rem; }
.lfc-colophon dd { margin: 0; }
.lfc-colophon a { color: var(--wp--preset--color--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; white-space: nowrap; }
.lfc-colophon a:hover { color: var(--wp--preset--color--ink); text-decoration: underline; text-underline-offset: 3px; }
.lfc-colophon__statement { color: var(--wp--preset--color--muted); max-width: 60ch; }

@media (max-width: 40rem) {
  .lfc-masthead__issue { flex-direction: column; gap: 0.15rem; }
  .lfc-rail-head { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- consent */

/* Fixed, so it overlays rather than pushing the article down — a banner that
   reflows the page is a CLS penalty on every first visit, which is the metric
   the ad revenue rides on. */
.lfc-consent {
  position: fixed;
  z-index: 60;
  inset: auto var(--wp--preset--spacing--40) var(--wp--preset--spacing--40);
  max-width: 30rem;
  margin-inline: auto;
  display: grid;
  gap: var(--wp--preset--spacing--30);
  padding: var(--wp--preset--spacing--50);
  background: var(--wp--preset--color--paper-2);
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: 4px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 45%);
}
.lfc-consent[hidden] { display: none; }
.lfc-consent__title {
  margin: 0;
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
}
.lfc-consent__text {
  margin: 0;
  font-size: var(--wp--preset--font-size--sm);
  color: var(--wp--preset--color--ink);
  line-height: 1.55;
}
.lfc-consent__actions { display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--30); }
.lfc-consent__btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: 2px;
  background: transparent;
  color: var(--wp--preset--color--ink);
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--lfc-dur) var(--lfc-ease-out), border-color var(--lfc-dur) var(--lfc-ease-out);
}
.lfc-consent__btn:hover { background: var(--wp--preset--color--paper-3); }
.lfc-consent__btn.is-primary {
  background: var(--wp--preset--color--accent);
  border-color: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--on-accent);
}
.lfc-consent__btn.is-primary:hover { background: var(--wp--preset--color--accent-lift); border-color: var(--wp--preset--color--accent-lift); }
