/* ===================================================================
   KRESIMIRIA MINI-SITES — per-publication identity
   Tokens per brand + structural archetypes. No external @import here:
   this file is loaded on wiki pages too, where cards must use local fonts.
   =================================================================== */

/* -------------------------------------------------------------------
   1. BRAND TOKENS
   ------------------------------------------------------------------- */

/* Kresimirian Herald — broadsheet, paper of record */
.pub--herald {
  --pub-bg: #f7f3ea;
  --pub-surface: #fffdf7;
  --pub-fg: #14110d;
  --pub-muted: #6b6357;
  --pub-accent: #1f4e79;
  --pub-accent-fg: #ffffff;
  --pub-rule: #1f4e79;
  --pub-font-heading: 'Playfair Display', Georgia, serif;
  --pub-font-body: 'Lora', Georgia, serif;
  --pub-font-meta: 'Inter', 'Liberation Sans', sans-serif;
}
[data-theme="dark"] .pub--herald {
  --pub-bg: #101418;
  --pub-surface: #161c22;
  --pub-fg: #e8e2d4;
  --pub-muted: #9a927f;
  --pub-accent: #7fb0e0;
  --pub-accent-fg: #0c1319;
  --pub-rule: #35506b;
}

/* Northfocus — regionalist alternative weekly */
.pub--northfocus {
  --pub-bg: #f6f4f1;
  --pub-surface: #ffffff;
  --pub-fg: #1b1b1b;
  --pub-muted: #5f5a55;
  --pub-accent: #b3121b;
  --pub-accent-fg: #ffffff;
  --pub-rule: #1b1b1b;
  --pub-font-heading: 'Noto Serif', Georgia, serif;
  --pub-font-body: 'Noto Serif', Georgia, serif;
  --pub-font-meta: 'Roboto', 'Liberation Sans', sans-serif;
}
[data-theme="dark"] .pub--northfocus {
  --pub-bg: #121213;
  --pub-surface: #1b1b1d;
  --pub-fg: #ececec;
  --pub-muted: #a3a3a3;
  --pub-accent: #e05a62;
  --pub-accent-fg: #180406;
  --pub-rule: #4a4a4a;
}

/* Civic Post — liberal, reformist, analytical */
.pub--civic-post {
  --pub-bg: #ffffff;
  --pub-surface: #ffffff;
  --pub-fg: #121212;
  --pub-muted: #5a5f66;
  --pub-accent: #052962;
  --pub-accent-fg: #ffffff;
  --pub-rule: #dcdcdc;
  --pub-font-heading: 'Merriweather', Georgia, serif;
  --pub-font-body: 'Open Sans', system-ui, sans-serif;
  --pub-font-meta: 'Open Sans', system-ui, sans-serif;
}
[data-theme="dark"] .pub--civic-post {
  --pub-bg: #101216;
  --pub-surface: #171a1f;
  --pub-fg: #e6e8ea;
  --pub-muted: #9aa0a6;
  --pub-accent: #7fb0e8;
  --pub-accent-fg: #08111d;
  --pub-rule: #2c3138;
}

/* Early Bird Chronicle — satirical tabloid */
.pub--early-bird {
  --pub-bg: #fdfbf7;
  --pub-surface: #ffffff;
  --pub-fg: #111111;
  --pub-muted: #5c554d;
  --pub-accent: #a31621;
  --pub-accent-fg: #ffffff;
  --pub-accent-2: #f0b429;
  --pub-rule: #111111;
  --pub-font-heading: 'Anton', 'Archivo Black', Impact, sans-serif;
  --pub-font-body: 'Bitter', Georgia, serif;
  --pub-font-meta: 'Bitter', Georgia, serif;
}
[data-theme="dark"] .pub--early-bird {
  --pub-bg: #141414;
  --pub-surface: #1e1e1e;
  --pub-fg: #f0ece4;
  --pub-muted: #a89f92;
  --pub-accent: #e0434f;
  --pub-accent-fg: #160406;
  --pub-accent-2: #f0b429;
  --pub-rule: #d8d2c6;
}

/* The Two Souls Weekly — conservative, Divinist weekly of Karlovac */
.pub--two-souls {
  --pub-bg: #fbf8f1;
  --pub-surface: #fffdf9;
  --pub-fg: #1a1512;
  --pub-muted: #6f6357;
  --pub-accent: #6b1f2a;
  --pub-accent-fg: #fffdf9;
  --pub-rule: #1a1512;
  --pub-font-heading: 'Bodoni Moda', Georgia, serif;
  --pub-font-body: 'EB Garamond', Georgia, serif;
  --pub-font-meta: 'Libre Franklin', system-ui, sans-serif;
}
[data-theme="dark"] .pub--two-souls {
  --pub-bg: #15120f;
  --pub-surface: #1d1915;
  --pub-fg: #ece5d9;
  --pub-muted: #a89c8c;
  --pub-accent: #d06a76;
  --pub-accent-fg: #15120f;
  --pub-rule: #3a352f;
}

/* Neutral hub (no single brand) falls back to wiki variables. */
.style--hub {
  --pub-bg: var(--page-bg);
  --pub-surface: var(--content-bg);
  --pub-fg: var(--text-color);
  --pub-muted: var(--text-color);
  --pub-accent: var(--link-color);
  --pub-accent-fg: #ffffff;
  --pub-rule: var(--border-color);
  --pub-font-heading: var(--font-heading);
  --pub-font-body: var(--font-body);
  --pub-font-meta: var(--font-meta);
}

/* -------------------------------------------------------------------
   2. BASE MINI-SITE CHROME
   ------------------------------------------------------------------- */

.minisite-body.pub--herald,
.minisite-body.pub--northfocus,
.minisite-body.pub--civic-post,
.minisite-body.pub--early-bird,
.minisite-body.style--hub {
  background-color: var(--pub-bg);
}

/* Scoped to the page body so the shared wiki sidebar keeps its own colours. */
.minisite-body.pub--herald .minisite-main,
.minisite-body.pub--northfocus .minisite-main,
.minisite-body.pub--civic-post .minisite-main,
.minisite-body.pub--early-bird .minisite-main,
.minisite-body.style--hub .minisite-main {
  color: var(--pub-fg);
  font-family: var(--pub-font-body);
}

.minisite-body .minisite-main a {
  color: var(--pub-accent);
}

/* Kresinet paper homes run inside the shared wiki chrome (#content.web-page)
   rather than on a minisite body, so the same tokens are applied there. */
#content.web-page.pub--herald,
#content.web-page.pub--northfocus,
#content.web-page.pub--civic-post,
#content.web-page.pub--early-bird {
  background-color: var(--pub-bg);
  color: var(--pub-fg);
  font-family: var(--pub-font-body);
}

#content.web-page.pub--herald a,
#content.web-page.pub--northfocus a,
#content.web-page.pub--civic-post a,
#content.web-page.pub--early-bird a {
  color: var(--pub-accent);
}

/* -------------------------------------------------------------------
   3. PUBLICATION HEADER — compact news-site bar, per style
   ------------------------------------------------------------------- */

.pub-header {
  color: var(--pub-fg);
}

/* Desk nav — used on the brand landing page hero. */
.pub-desk {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 0.6rem;
  font-family: var(--pub-font-meta);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--pub-muted);
}

.pub-desk-item {
  white-space: nowrap;
}

/* --- Broadsheet: paper-of-record double rule --- */
.style--broadsheet .pub-header {
  border-bottom: 3px double var(--pub-rule);
}

.style--broadsheet .pub-logo {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: 0.01em;
}

.style--broadsheet .pub-nav {
  font-family: var(--pub-font-heading);
  letter-spacing: 0.16em;
}

/* --- Digital: solid accent bar --- */
.style--digital .pub-header {
  background: var(--pub-accent);
  color: var(--pub-accent-fg);
  border-bottom: 3px solid var(--pub-accent-2, var(--pub-accent));
  padding: 0.5rem 0.85rem;
  border-radius: 3px;
}

.style--digital .pub-logo,
.style--digital .pub-logo:hover {
  color: var(--pub-accent-fg);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.style--digital .pub-nav,
.style--digital .pub-header-meta {
  color: var(--pub-accent-fg);
  opacity: 0.92;
}

.style--digital .pub-wiki-link {
  color: var(--pub-accent-fg);
}

/* --- Liberal: airy serif rule --- */
.style--liberal .pub-header {
  border-bottom: 1px solid var(--pub-rule);
}

.style--liberal .pub-logo {
  font-weight: 700;
}

.style--liberal .pub-nav {
  letter-spacing: 0.05em;
  text-transform: none;
  font-size: 0.82rem;
}

/* --- Satirical: dotted rule, halftone, tilt --- */
.style--satirical .pub-header {
  border-bottom: 2px dotted var(--pub-rule);
  background-image: radial-gradient(var(--pub-rule) 0.5px, transparent 0.6px);
  background-size: 7px 7px;
}

.style--satirical .pub-logo {
  color: var(--pub-accent);
  transform: rotate(-1deg);
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--pub-rule) 25%, transparent);
}

.style--satirical .pub-logo:hover {
  text-decoration: none;
  transform: rotate(1deg);
}

.style--satirical .pub-nav {
  font-family: var(--pub-font-heading);
  letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------
   4. NEWS ARTICLE — per style + per format
   ------------------------------------------------------------------- */

.news-article .news-headline {
  font-family: var(--pub-font-heading);
  color: var(--pub-fg);
}

.news-article .news-kicker {
  color: var(--pub-accent);
  font-family: var(--pub-font-meta);
}

.news-article .news-standfirst {
  color: var(--pub-muted);
}

.news-article .news-byline {
  border-color: var(--pub-rule);
  color: var(--pub-muted);
  font-family: var(--pub-font-meta);
}

.news-article .news-body {
  font-family: var(--pub-font-body);
}

.style--broadsheet .news-headline {
  font-weight: 800;
  letter-spacing: -0.015em;
}

.style--broadsheet .news-body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--pub-font-heading);
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.05em 0.09em 0 0;
  color: var(--pub-accent);
}

.style--broadsheet .news-kicker {
  letter-spacing: 0.2em;
  border-bottom: 1px solid var(--pub-rule);
  display: inline-block;
  padding-bottom: 0.15rem;
}

.style--digital .news-headline {
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: none;
}

.style--digital .news-kicker {
  background: var(--pub-accent);
  color: var(--pub-accent-fg);
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.12em;
}

.style--liberal .news-headline {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.style--satirical .news-headline {
  font-family: 'Playfair Display', var(--pub-font-heading);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.style--satirical .news-standfirst {
  transform: rotate(-0.4deg);
}

/* Op-ed */
.news-article--op_ed .news-opinion-label {
  font-family: var(--pub-font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--pub-accent);
  border-top: 1px solid var(--pub-rule);
  border-bottom: 1px solid var(--pub-rule);
  padding: 0.25rem 0;
  margin-bottom: 0.9rem;
}

.news-article--op_ed .news-byline-name::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--pub-accent);
}

.news-article--op_ed .news-body {
  font-style: italic;
}

.news-article--op_ed .news-body > p:first-of-type::first-letter {
  color: inherit;
  float: none;
  font-size: inherit;
  padding: 0;
}

/* Wire */
.news-article--wire .news-headline {
  font-family: var(--pub-font-meta);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.news-article--wire .news-body {
  font-family: var(--pub-font-meta);
  font-size: 1rem;
}

.news-article--wire .news-dateline {
  background: var(--pub-accent);
  color: var(--pub-accent-fg);
  padding: 0 0.35rem;
}

/* -------------------------------------------------------------------
   5. PRESS ARTIFACT FRAMING
   ------------------------------------------------------------------- */

.artifact-page .artifact-kicker {
  color: var(--pub-accent);
  font-family: var(--pub-font-meta);
}

.artifact-page .artifact-title {
  font-family: var(--pub-font-heading);
}

.artifact-frame {
  position: relative;
  background: var(--pub-surface, #fff);
  border-color: var(--pub-rule);
}

/* Front-page scans sit like paper on a desk */
.artifact-page--newspaper_front .artifact-frame,
.artifact-page--front_page .artifact-frame {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  border: 1px solid color-mix(in srgb, var(--pub-rule) 40%, transparent);
}

/* Posters get tape corners */
.artifact-page--poster .artifact-frame,
.artifact-page--flyer .artifact-frame {
  padding: 1.4rem;
  background: var(--pub-bg);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.artifact-page--poster .artifact-frame::before,
.artifact-page--poster .artifact-frame::after,
.artifact-page--flyer .artifact-frame::before,
.artifact-page--flyer .artifact-frame::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 22px;
  background: color-mix(in srgb, #e8dcae 85%, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.artifact-page--poster .artifact-frame::before,
.artifact-page--flyer .artifact-frame::before {
  top: -10px;
  left: -14px;
  transform: rotate(-38deg);
}

.artifact-page--poster .artifact-frame::after,
.artifact-page--flyer .artifact-frame::after {
  bottom: -10px;
  right: -14px;
  transform: rotate(-38deg);
}

/* Pamphlets read as photocopies */
.artifact-page--pamphlet .artifact-frame {
  filter: grayscale(0.85) contrast(1.08);
  border: 1px dashed var(--pub-rule);
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.03) 0 1px, transparent 1px 4px);
}

/* -------------------------------------------------------------------
   7. THEMED CARDS (hubs, publication archive, wiki "In the media")
   ------------------------------------------------------------------- */

/* Shared base: any card carrying a brand class adopts that brand. */
.pub--herald,
.pub--northfocus,
.pub--civic-post,
.pub--early-bird {
  --card-heading-font: var(--pub-font-heading);
}

.hub-card.pub--herald,
.hub-card.pub--northfocus,
.hub-card.pub--civic-post,
.hub-card.pub--early-bird,
.rc-card.pub--herald,
.rc-card.pub--northfocus,
.rc-card.pub--civic-post,
.rc-card.pub--early-bird {
  background: var(--pub-surface);
  border-color: color-mix(in srgb, var(--pub-rule) 55%, transparent);
  color: var(--pub-fg);
}

.hub-card.pub--herald,
.rc-card.pub--herald {
  border-top: 3px solid var(--pub-accent);
}

.hub-card.pub--northfocus,
.rc-card.pub--northfocus {
  border-top: none;
  border-left: 4px solid var(--pub-accent);
  border-radius: 4px;
}

.hub-card.pub--civic-post,
.rc-card.pub--civic-post {
  border-top: 1px solid var(--pub-rule);
  border-bottom: 3px solid var(--pub-accent);
}

.hub-card.pub--early-bird,
.rc-card.pub--early-bird {
  border-top: 3px solid var(--pub-accent);
  border-bottom: 2px dotted var(--pub-rule);
}

.hub-card.pub--herald .hub-card-title,
.rc-card.pub--herald .rc-card-title {
  font-family: var(--pub-font-heading);
}

.hub-card.pub--northfocus .hub-card-title,
.rc-card.pub--northfocus .rc-card-title {
  font-family: var(--pub-font-heading);
  font-weight: 800;
  text-transform: none;
}

.hub-card.pub--civic-post .hub-card-title,
.rc-card.pub--civic-post .rc-card-title {
  font-family: var(--pub-font-heading);
  font-weight: 700;
}

.hub-card.pub--early-bird .hub-card-title,
.rc-card.pub--early-bird .rc-card-title {
  font-family: 'Playfair Display', var(--pub-font-heading);
  font-style: italic;
  font-weight: 900;
}

.hub-card.pub--early-bird .hub-card-title a:hover {
  color: var(--pub-accent);
}

/* Card source lines use the brand colour */
.hub-card.pub--herald .hub-card-source,
.rc-card.pub--herald .rc-card-source,
.hub-card.pub--northfocus .hub-card-source,
.rc-card.pub--northfocus .rc-card-source,
.hub-card.pub--civic-post .hub-card-source,
.rc-card.pub--civic-post .rc-card-source,
.hub-card.pub--early-bird .hub-card-source,
.rc-card.pub--early-bird .rc-card-source {
  color: var(--pub-accent);
}

/* -------------------------------------------------------------------
   8. RESPONSIVE
   ------------------------------------------------------------------- */

@media (max-width: 640px) {
  .pub-logo {
    font-size: 1.25rem;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .style--satirical .pub-logo {
    transition: none;
  }
}
