@supports (display: grid) {
  @media (width >= 992px) {
    /* Both sidebars: Component | sidebar-left | sidebar-right */
    body.has-sidebar-left.has-sidebar-right .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". comp comp side-l side-r ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }

    /* Only sidebar-left: Component grows into the unused right-sidebar space. */
    body.has-sidebar-left:not(.has-sidebar-right) .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". comp comp comp side-l ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }

    /* Only sidebar-right: Component grows into the unused left-sidebar space. */
    body:not(.has-sidebar-left).has-sidebar-right .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". comp comp comp side-r ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }

    /* No sidebar: Component takes all four central columns. */
    body:not(.has-sidebar-left):not(.has-sidebar-right) .site-grid {
      grid-template-areas:
        ". banner banner banner banner ."
        ". top-a top-a top-a top-a ."
        ". top-b top-b top-b top-b ."
        ". comp comp comp comp ."
        ". bot-a bot-a bot-a bot-a ."
        ". bot-b bot-b bot-b bot-b .";
    }

    /*
     * Cassiopeia changes the component's grid lines when a sidebar is absent.
     * Restore the area named "comp" so those original rules do not overlap a sidebar.
     */
    body:not(.has-sidebar-left) .site-grid .container-component,
    body:not(.has-sidebar-right) .site-grid .container-component {
      grid-column: comp;
    }
  }
}

a.brand-logo img { max-width: 300px; }
.container-header .container-nav {
    background: #000;
}
.container-header .mod-menu > li > a, .container-header .mod-menu > li > button {
    color: #fff;
}

.container-header .grid-child:first-child {
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
    margin: 20px auto;
    position: relative;
}

.container-header .grid-child:first-child:before,
.container-header .grid-child:first-child:after {
    content: "";
    left: 0;
    position: absolute;
    width: 100%;
}

.container-header .grid-child:first-child:before { 
    border-top: 1px solid #000;
    top: 1px;
}

.container-header .grid-child:first-child:after {
    border-top: 1px solid #000;
    bottom: 1px;
}

a{text-decoration:none}
.flat {
    background: #dddddd;
    padding: 20px;
}
.flat.fontsm h4 a {
    font-size: 0.8em;
    color: #000;
}
.flat.hl .md-title {
    color: #ec0000;
    border-top: 8px solid;
    padding-top: 1rem;
    padding-bottom: 2rem;
}
.footer .grid-child {
    justify-content: center;
}
ul.newsfeed {
    text-align: left;
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.newsfeed a {
    text-decoration: none;
  font-weight:bold;
}
ul.newsfeed li:nth-child(2n+1) {
    background: #fff;
}
ul.newsfeed li {
    padding: 10px;
}
figure.left.item-image {
    float: none;
}

figure.left.item-image img {
    width: 100%;
    height: auto;
}
/* Nyhetsklipp i sidespalten */
.nyhetsklipp ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nyhetsklipp li {
    margin: 0;
    padding: 0.65rem 0;
    line-height: 1.4;
}

.nyhetsklipp li + li {
    border-top: 1px solid #fff;
}

.nyhetsklipp li:first-child {
    padding-top: 0;
}

.nyhetsklipp li:last-child {
    padding-bottom: 0;
}

.nyhetsklipp li a {
    font-weight: 600;
}
/* RingeriksAvisa – felles stil for utvalgte sidespalter */
.ra-sideboks {
    --ra-rod: #c8102e;
    background: #fff;
    color: #171717;
    border: 1px solid #dedede;
    border-radius: 0;
    box-shadow: none;
    padding: 0.9rem 1rem;
}

.ra-sideboks .card-header {
    background: transparent;
    color: #171717;
    border: 0;
    padding: 0;
}

.ra-sideboks > :is(.card-header, h2, h3):first-child {
    margin: 0 0 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 3px solid var(--ra-rod);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.ra-sideboks .card-body {
    padding: 0;
}

.ra-sideboks :is(h3, h4, h5):not(.card-header) {
    line-height: 1.3;
}

.ra-sideboks a {
    color: #171717;
    text-decoration: underline;
    text-decoration-color: #aaa;
    text-underline-offset: 0.15em;
}

.ra-sideboks a:hover,
.ra-sideboks a:focus-visible {
    color: var(--ra-rod);
    text-decoration-color: currentColor;
}

.nyhetsklipp.ra-sideboks li + li {
    border-top-color: #dedede;
}
/* RingeriksAvisa – aksent under toppmenyen */
.container-header .container-nav {
    border-bottom: 3px solid #c8102e;
}
.ra-faktaboks {
  margin: 2rem 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  border: 1px solid #d8dfe7;
  border-radius: 0.5rem;
  background: #f4f7fa;
  color: #182736;
}

.ra-faktaboks .ra-faktaboks-tittel {
  margin: 0;
  padding: 0.75rem 1.15rem;
  background: #142b45;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.3;
}

.ra-faktaboks-innhold {
  padding: 1rem 1.15rem;
}

.ra-faktaboks-innhold > :last-child {
  margin-bottom: 0;
}

.ra-faktaboks::after {
  display: block;
  height: 0.3rem;
  background: linear-gradient(90deg, #e1ae53 3rem, #142b45 3rem);
  content: "";
}
/* Skjul avkrysningsfeltet på nettstedet */
.fields-container > .ra-svart-tittel,
.fields-container:has(> .ra-svart-tittel:only-child) {
  display: none;
}

/* Gi hovedtittelen svart bakgrunn når feltet er krysset av */
body.view-article .com-content-article:has(> .fields-container > .ra-svart-tittel)
  > .page-header:nth-last-child(1 of .page-header) > :is(h1, h2) {
  background: #000;
  color: #fff;
  padding: 0.45em 0.6em;
  overflow-wrap: anywhere;
}
