/* İzlandapedia: one continuous reading surface; meaningful inner boxes stay intact. */
@layer izp-flat {
  :root {
    --izp-flat-paper: #fbfcfc;
    --izp-flat-ink: #0b2440;
    --izp-flat-text: #314b59;
    --izp-flat-muted: #526b76;
    --izp-flat-accent: #117864;
  }

  html, body {
    background: var(--izp-flat-paper) !important;
  }
  /* Page-wide background graphics must not reintroduce a second ground colour. */
  body::before, body::after {
    background: transparent !important;
    box-shadow: none !important;
  }
  main,
  main:is(.guide-page,.housing-main,.review-page,.ders-wrap,.wrap,.guide-index),
  main > :is(.wrap,.container,.page,.shell,.fr-shell),
  .lg-wrap,
  :is(.category-hub,.topic-section,.home-block,.er-planner,.izp-guide-categories,.izp-guide-category),
  :is(.article-body,.fr-article-body,.guide-content,.kd-article,.horse-article,.ei-story,.sg-content,.th-content,.au-body,.work-content) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Named introduction containers only. No wildcard reset of cards, forms or lessons. */
  :is(.hero,.guide-hero,.article-hero,.work-hero,.food-hero,.journey-hero,
      .smoke-hero,.rc-hero,.au-hero,.dl-hero,.bazalt-course-intro,.part3-hero,.part4-hero,.volcano-intro-layout,
      .col-hero,.saga-hero,.edda-hero,.puffin-hero,.horse-hero,.ei-hero,.kd-hero,
      .bazalt-directory-intro,.bazalt-reading-intro,.fr-article-hero,
      .lesson-hero,.unit-hero,.review-hero,.design-lesson-intro,.u5-hero) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--izp-flat-text) !important;
  }
  :is(.hero-copy,.article-hero-copy,.food-hero-copy,.col-hero-copy,
      .saga-hero-copy,.edda-hero-copy,.puffin-hero-copy,.horse-hero-copy,
      .fr-article-intro,.fr-lead-copy) {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--izp-flat-text) !important;
  }
  .hero-copy::before, .hero-copy::after {
    background: transparent !important;
    box-shadow: none !important;
  }
  :is(.hero,.guide-hero,.article-hero,.work-hero,.food-hero,.journey-hero,
      .smoke-hero,.rc-hero,.au-hero,.dl-hero,.bazalt-course-intro,.part3-hero,.part4-hero,.volcano-intro-layout,
      .col-hero,.saga-hero,.edda-hero,.puffin-hero,.horse-hero,.ei-hero,.kd-hero,
      .bazalt-directory-intro,.bazalt-reading-intro,.fr-article-hero,
      .lesson-hero,.unit-hero,.review-hero,.design-lesson-intro,.u5-hero)
      :is(h1,h1 span,h2,h3,.ders-basA) {
    color: var(--izp-flat-ink) !important;
  }
  :is(.hero,.guide-hero,.article-hero,.work-hero,.food-hero,.journey-hero,
      .smoke-hero,.rc-hero,.au-hero,.dl-hero,.bazalt-course-intro,.part3-hero,.part4-hero,.volcano-intro-layout,
      .col-hero,.saga-hero,.edda-hero,.puffin-hero,.horse-hero,.ei-hero,.kd-hero,
      .bazalt-directory-intro,.bazalt-reading-intro,.fr-article-hero,
      .lesson-hero,.unit-hero,.review-hero,.design-lesson-intro,.u5-hero)
      :is(p,.lead,.subtitle,.hero-subtitle,.ders-ozet,.hero-credit,.article-meta,.article-meta a) {
    color: var(--izp-flat-muted) !important;
  }
  :is(.hero,.guide-hero,.article-hero,.work-hero,.food-hero,.journey-hero,
      .smoke-hero,.rc-hero,.au-hero,.dl-hero,.bazalt-course-intro,.part3-hero,.part4-hero,.volcano-intro-layout,
      .col-hero,.saga-hero,.edda-hero,.puffin-hero,.horse-hero,.ei-hero,.kd-hero,
      .bazalt-directory-intro,.bazalt-reading-intro,.fr-article-hero,
      .lesson-hero,.unit-hero,.review-hero,.design-lesson-intro,.u5-hero)
      :is(.eyebrow,.kicker,.u5-kicker,.section-kicker) {
    color: var(--izp-flat-accent) !important;
  }

  /* Keep the existing image crop, columns, content width and responsive rhythm. */
  :is(.article-body,.fr-article-body,.guide-content,.kd-article,.horse-article,
      .ei-story,.sg-content,.th-content,.au-body,.work-content) {
    padding-inline: 0 !important;
  }
  :is(.guide-hero,.work-hero,.bazalt-directory-intro,.bazalt-reading-intro,
      .lesson-hero,.unit-hero,.review-hero,.design-lesson-intro,.u5-hero,
      .article-hero-copy,.food-hero-copy,.col-hero-copy,.saga-hero-copy,
      .edda-hero-copy,.puffin-hero-copy,.horse-hero-copy,.fr-article-intro) {
    padding-inline: 0 !important;
  }
  /* Sections are editorial flow; the callouts and practical cards within them stay boxed. */
  :is(.fr-story-section:not(.fr-result-banner),.guide-extra,.guide-sources,.home-lede) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  :is(.fr-lead,.home-search-panel,.study-route) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .home-search-panel { color: var(--izp-flat-text) !important; }
  .home-search-panel :is(h2,p) { color: var(--izp-flat-ink) !important; }

  /* The literary template inherited pale text from a formerly dark page ground. */
  html:has(link[href^="/assets/voluspa/art.css"]) {
    color-scheme: light !important;
    --ink: var(--izp-flat-ink) !important;
    --muted: var(--izp-flat-muted) !important;
    --gold: var(--izp-flat-accent) !important;
    --bg: var(--izp-flat-paper) !important;
  }
  html:has(link[href^="/assets/voluspa/art.css"]) :is(.rebirth,.index) {
    background: transparent !important;
  }
  html:has(link[href^="/assets/voluspa/art.css"]) :is(details,.index,.divider,.learning) {
    border-color: #d4dfdf !important;
  }
  .course .level { color: var(--izp-flat-accent) !important; }
  :is(.bazalt-course-intro,.part3-hero,.part4-hero) :is(a,.ders-meta) {
    color: var(--izp-flat-accent) !important;
  }

  /* Shared navigation continues the same ground, including its mobile version. */
  :is(.izp-global-header,.izp-shell-header,.language-suite-nav),
  body > .topbar,
  :is(.izp-global-footer,.izp-shell-footer), body > footer {
    background: var(--izp-flat-paper) !important;
    box-shadow: none !important;
    color: var(--izp-flat-text) !important;
  }
  :is(.izp-global-header,.language-suite-nav,.izp-global-footer),
  body > :is(.topbar,footer) {
    border-color: #d4dfdf !important;
  }
  :is(.izp-global-header,.izp-global-footer) :is(a,button,b,strong,span,p,small),
  body > :is(.topbar,footer) :is(a,button,b,strong,span,p,small) {
    color: var(--izp-flat-ink) !important;
  }
  :is(.izp-primary-nav,.izp-nav-more-panel) {
    background: var(--izp-flat-paper) !important;
    border-color: #d4dfdf !important;
  }
  :is(.izp-language,.izp-menu-toggle,.izp-nav-more-toggle),
  .izp-primary-nav > .izp-nav-feature,
  .izp-primary-nav a:hover, .izp-primary-nav a:focus-visible {
    background: #e9f2ef !important;
    border-color: #d4dfdf !important;
    color: var(--izp-flat-accent) !important;
  }
  .izp-language.active { background: var(--izp-flat-accent) !important; color: #fff !important; }

  :is(.fr-hero,.fr-hero-feature,.fr-hero-feature > div) {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .fr-hero-feature h1 { color: var(--izp-flat-ink) !important; }
  .fr-hero-feature :is(p,.fr-topic), .fr-date-block { color: var(--izp-flat-muted) !important; }
  .hero-stats small, .live-card small, .form-note, .contribution-card small, .contribution-count-box small,
  .method li p { color: var(--izp-flat-text) !important; }
  .hero small { color: var(--izp-flat-text) !important; }
  .hero h1 :is(em,strong) { color: var(--izp-flat-accent) !important; }
  .hero-stats :is(span,b,strong) { color: var(--izp-flat-ink) !important; }
  body > .topbar .nav-action { background: var(--izp-flat-accent) !important; color: #fff !important; }
  body > .topbar .lang-switch b { color: #fff !important; }
  .hero .facts b { color: var(--izp-flat-ink) !important; }
  .hero .facts span { color: var(--izp-flat-muted) !important; }
  .safety-box h2 { color: var(--izp-flat-ink) !important; }
  .safety-box p { color: var(--izp-flat-text) !important; }

  /* Focus, input borders, status colours, disclosures and all nested box styles are inherited. */
}
