*, *::before, *::after {
    box-sizing: border-box;
}

:root {
  /* Left Bias Spectrum */
  --extreme-left-bias: #8b0000;
  --left-bias: #cc4e5c;
  --leans-left-bias: #ff9999;
  
  /* Center */
  --neutral-bias: #a9a9a9;
  
  /* Right Bias Spectrum */
  --leans-right-bias: #4682b4;
  --right-bias: #003366;
  --extreme-right-bias: #001a33;
  
  /* Unbiased */
  --unrated-bias: #e1e4e8;
}


html {
    scroll-behavior: smooth;
}

body {color: #555555;
  font-family: "Quicksand", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1em;
  min-height: 100vh;
  background: url('../img/bg.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}
/** GENERAL STYLES **/

a {text-decoration: none; color: #7e387b;}

.ClearFix {clear:both}

.FeedTrackingText {
    font-size: 0.75em; 
    color: #7a7a7a
}
.site-meta {
    font-size: 0.75em;
    color: #1a535c;}
.site-meta-bold-text {font-weight: 650;}
#LastUpdatedDate {font-weight:650;}

#MainHeaderContainer {
    position: sticky; 
    top: 0; 
    z-index: 100;
    background: url('../img/bg.jpg') no-repeat center center fixed;
    background-size: cover;
}

#Header {
    text-align: center;
    position: relative;
    padding: 0 10px;
    margin: 10px 0 10px 0;
}

#logocontainer {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

#HeaderLogo {  
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    content: url('../img/mediafeedr-logo-med.png');
}

#MenuContainer {
    background-color: #1a535c;
    padding: 8px;
    text-align: center;
    color: #FFFFFF;
    min-height: 25px;
}

#MenuContainer a {
    color: #ffffff;
    text-decoration: none;
    display: inline-block
}

#MenuContent {
    width: 95%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0;
}

#MenuContent form {
    margin: 0;
    display: flex;
    gap: 4px;
}

#MenuLinks {
    flex-shrink: 0;
}

.menu-dropdown {
    position: relative;
    display: inline-block;
}

.menu-dropdown-toggle {
    cursor: pointer;
}

.menu-dropdown-toggle .fa-chevron-down {
    font-size: .65rem;
    margin-left: 3px;
    transition: transform .2s;
}

.menu-dropdown.open .menu-dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.menu-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a535c;
    min-width: 170px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    padding: 6px 0;
    z-index: 1000;
}

.menu-dropdown-content a {
    display: block;
    padding: 8px 18px;
    white-space: nowrap;
    font-size: .875rem;
}

.menu-dropdown-content a:hover {
    background: rgba(255,255,255,.1);
}

.menu-dropdown:hover .menu-dropdown-content,
.menu-dropdown.open .menu-dropdown-content,
.menu-dropdown:focus-within .menu-dropdown-content {
    display: block;
}

#CatSearch,
#PubSearch {
    width: 100%;
}

#Footer {
    width: 90%;
    text-align: center;
    font-size: 0.75em;
    margin: 30px auto 5px auto; 
    background-color: #FFFFFF;
    padding: 5px;
}

#Footer a {text-decoration: none; color: #7e387b}


/***************************************
 ** MAIN PAGE STYLES
 **************************************/
 #PageWrapper {
    width: 95%;
    margin: 20px auto;
    display: flex;
    gap: 20px;
}

#MainFeed {
    flex: 4;
    min-width: 0;
}
  
/* Ticker System */
#TickerWrap {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    overflow: hidden;
    height: 44px;
    align-items: center; 
    min-width: 0;
}
.ticker-label {
    background-color: #1a535c;
    color: #ffffff;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    z-index: 5;
}

.ticker-window { 
    flex: 1; 
    overflow: hidden;
    min-width: 0;
}

.TickerIcon img{height: 10px;}

.ticker-content { 
    display: flex; 
    white-space: nowrap; 
    width: max-content; 
    animation: tickerScroll 120s linear infinite;
}
.ticker-content:hover { 
    animation-play-state: paused;
}

.ticker-item {
    padding: 0 50px; 
    color: #333; 
    text-decoration: none; 
    font-size: 0.85rem; 
    font-weight: 700; 
    display: inline-block;
}

.ticker-item span { 
    color: #4ecdc4;
    font-weight: 800; 
    margin-left: 5px; 
}

@keyframes tickerScroll { 
    0% { transform: translateX(0); } 100% { transform: translateX(-50%); } 
}

/*********************************
 * NEWEST TABS & SCROLL
 ********************************/

 /** Header close **/
.QuickLookHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.quicklook-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.quicklook-toggle:hover {
    background: #eee;
    color: #333;
}

.quicklook-toggle.collapsed i {
    transform: rotate(180deg);
    color: #C0C0C0 !important
}

.QuickLookHeaderFaded {color: #C0C0C0 !important}
 
.newest-tabs-container { margin:10px 0 10px 0; }
.newest-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.newest-tab-btn {
    background: #eee;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    flex: 1;
    min-width: 100px;
    text-align: center;
    color: #fff;
    font-weight: 400;
    font-size: 0.75em;
}
.newest-tab-btn:hover { background: #4ecdc4; }
.newest-tab-btn.active { background: #1a535c; font-weight: 700;}
.newest-tab-content { display: none;}
.newest-tab-content.active { display: block; }
.tab-loading { text-align: center; padding: 40px 0; color: #888; font-size: 15px; }

/* Single row scroll container */
.newest-scroll-wrapper { position: relative; display: flex; align-items: center; gap: 8px; }
.newest-grid-container { 
    display: flex;
    flex-wrap: nowrap;
    gap: 16px; 
    overflow-x: auto; 
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    padding-bottom: 8px;
}
.newest-grid-container::-webkit-scrollbar { display: none; }
.newest-card { 
    flex-shrink: 0;
    width: 300px;
}

.scroll-btn {
    background: #1a535c;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.scroll-btn:hover { background: #555; }
.scroll-btn:disabled { background: #ccc; cursor: not-allowed; opacity: 0.5; }
/* .muted class no longer used — inline styles handle the disabled look */

@media (max-width: 600px) {
    .newest-tabs { gap: 4px; }
    .newest-tab-btn { padding: 8px 10px; font-size: 13px; min-width: 80px; }
    .newest-card { width: 260px; }
    .scroll-btn { width: 32px; height: 32px; font-size: 16px; }
}

/**********************************
 * NEWEST CARDS
 *********************************/
 .newest-card {background:#fff; border:1px solid #ddd; border-radius:8px; padding:16px; display:flex; flex-direction:column;}

 .newest-card .category-pill {    
    color: #fff; 
    padding: 3px 10px; 
    border-radius: 4px; 
    font-size: 0.65rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    display: inline-block; 
    margin-bottom: 12px; 
    width: 30%;
}

.newest-card h3 {margin:0 0 -10px 0; 
    font-size:16px;
    line-height:1.4;
}
.newest-card h3 a {text-decoration:none; color:#222;}
.newest-excerpt-container {
    margin:0 0 5px 0; font-size:13px; color:#666;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes content apart */
    height: 100%; 
}

.newest-card a.NewestReadArticle {
  margin-bottom: 3px;
  display: inline-block;
  align-self: flex-end;
  margin-top: auto;   /* Pushes it to the bottom */
  margin-left: auto;  /* Pushes it to the right */
  width: fit-content;
  text-decoration: none; color: #1a535c; 
  font-weight: 700;
  font-size: 0.75em;
}


.publicationDetails {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
}

.publication-logo-wrapper {
    width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: left;
    flex-shrink: 0;
}

.publication-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.publicationNameTime {
    text-align: right;
}

.newest-card .coverage-bar {margin: 0 }

/*********************************
 * Sidebar Elements
 ********************************/
#Sidebar { 
    flex: 12%; 
    position: sticky;
    top: 180px; 
    height: calc(100vh - 200px); 
    overflow-y: auto;
    scrollbar-width: thin; 
    padding-right: 5px;
    margin: 0;
}

#Sidebar::-webkit-scrollbar {
    width: 4px;
}

#Sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.sidebar-box { 
    background: #fff; 
    border: 1px solid #e1e4e8; 
    padding: 8px 18px; border-radius: 8px; 
    margin-bottom: 18px;
}

.sidebar-title {
    color: #333;
    font-size: 1.1rem; 
    font-weight: 900; 
    margin-top: 10px; 
    margin-bottom: 15px; 
    padding-bottom: 10px; 
    border-bottom: 3px solid #1a535c;
    text-transform: uppercase; 
}

/* ── Sidebar Navigation (mobile) ──────────────── */
.sidebar-nav { display: none; }

.sidebar-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-links > a,
.sidebar-nav-toggle {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    transition: background .15s;
}

.sidebar-nav-links > a:hover,
.sidebar-nav-toggle:hover {
    background: rgba(0,0,0,.05);
}

.sidebar-nav-toggle {
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sidebar-nav-toggle .fa-chevron-down {
    font-size: .65rem;
    margin-left: 6px;
    transition: transform .2s;
}

.sidebar-nav-toggle.open .fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar-nav-sub {
    display: none;
    padding-left: 16px;
}

.sidebar-nav-sub.open {
    display: block;
}

.sidebar-nav-sub a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #555;
    text-decoration: none;
    font-size: .875rem;
    transition: background .15s;
}

.sidebar-nav-sub a:hover {
    background: rgba(0,0,0,.05);
}

/** Sidebar flyout styles for mobile **/
/* ── Hamburger Button ───────────────────────────────────── */

#SidebarToggle {
    position: fixed;
    top: 16px;
    right: 64px;        /* sits to the left of the dark mode toggle */
    z-index: 9999;

    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);

    background-color: #1a535c;
    color: #ffffff;
    font-size: 1rem;

    display: none;      /* hidden on desktop — shown via media query below */
    align-items: center;
    justify-content: center;

    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
}

#SidebarToggle:hover {
    transform: scale(1.1);
    background-color: #4ecdc4;
    border-color: rgba(255, 255, 255, 0.7);
}


/* ── Backdrop ───────────────────────────────────────────── */

#SidebarBackdrop {
    display: none;
    position: fixed;
    inset: 0;           /* covers the entire viewport */
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#SidebarBackdrop.is-visible {
    display: block;
}

#SidebarBackdrop.is-open {
    opacity: 1;
}

#SidebarCloseBtn {
    display: none;      /* hidden on desktop */
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
}

#SidebarCloseBtn button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

#SidebarCloseBtn button:hover {
    color: #1a535c;
    background: rgba(0,0,0,0.05);
}

#SidebarSupport a {text-decoration: none; color: #4ecdc4}

#SupportKWWDButton {width: 175px;
                    height: 48px;
                    background-image: url('/img/support-kwwdcoding.png');
                    cursor: pointer;
                    display: block;
                    margin: 0 auto;
                    }

#SupportKWWDButton:hover {background-image: url('/img/support-kwwdcoding-hover.png');}

/** Search forms and filtering **/

#SearchForm {min-height: 70px;}

.search-form { 
    display: flex; 
    gap: 5px; 
}

.search-input { 
    flex: 1; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-family: inherit; 
    width: 100%;
    display: block;
}

#ArchiveSearchExplanation {display: block;}
#ArchiveSearchExplanation {font-size: 0.65em; display: inline-block;}
#ArchiveSearchTooltip {font-size: 0.85em !important; display: inline-block}

.search-btn { 
    background-color: #1a535c;
    color: #fff; 
    border: none; 
    padding: 0 15px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: 700; 
}

.active-filter-box { 
    background: #333; 
    color: #fff;
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 10px; 
}

.active-filter-box small { 
    text-transform: uppercase; 
    font-weight: 900; 
    font-size: 0.65rem; 
    color: #4ecdc4; 
    display: block; 
    margin-bottom: 5px; 
}
.active-filter-box .tag-pill { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-weight: 700; 
    text-transform: uppercase;
}

.active-filter-box .clear-btn { 
    color: #fff; 
    text-decoration: none; 
    font-size: 1.2rem; 
    line-height: 1; 
}

.filter-pill { 
    display: inline-block; 
    background: #1a535c; 
    color: #fff; 
    padding: 4px 10px; 
    border-radius: 20px; 
    margin: 3px; 
    font-size: 0.85em; 
}

.filter-pill a { 
    color: #930b0b; 
    text-decoration: none; 
    margin-left: 8px; 
    font-weight: bold; 
}

.filter-clear-all {
    margin-top:10px; 
    right:0;
}

.filter-clear-all a {
    font-size:0.65em; 
    color:#4ecdc4; 
    text-decoration: none; 
    font-weight: 900; 
    text-transform: uppercase;
}

/*************************** 
 * Publication Filter
 **************************/
.filter-scroll-area-pub {
    max-height: 130px; 
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 5px;
    background: #fafafa;
    border-radius: 4px;
}

.filter-scroll-area-pub::-webkit-scrollbar {
    width: 6px;
}
.filter-scroll-area-pub::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

.pub-filter-item {
    display: block;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.pub-filter-item:hover {
    background: #f0f0f0;
    color: #000;
}

.pub-filter-item.active-pub {
    background: #333;
    color: #fff;
    font-weight: bold;
}

/*************************** 
 * Category Filter
 **************************/
.filter-scroll-area-cat {
    max-height: 130px;
    overflow-y: auto; 
    border: 1px solid #eee;
    padding: 5px;
    background: #fafafa;
    border-radius: 4px;
}

.filter-scroll-area-cat::-webkit-scrollbar {
    width: 6px;
}
.filter-scroll-area-cat::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

.cat-filter-item{
    display: block;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.cat-filter-item:hover {
    background: #f0f0f0;
}

.cat-filter-item.active-cat {
    background: #333;
    color: #fff;
    font-weight: bold;
}

/***************************
 * Article Cards
 **************************/
.news-card { 
    background: #fff; 
    border: 1px solid #e1e4e8; 
    border-radius: 8px; 
    padding: 18px; 
    margin-bottom: 20px; 
    position: relative; 
}

.news-card h2 {
    word-break: break-word;
    overflow-wrap: break-word;
}

.news-card h2 a {
    color: #1a535c; 
    text-decoration: none
}

.news-card p a {
    color: #1a535c; 
    text-decoration: none;
    font-weight: 650;
}

.news-card .MetaDateLink {
    color: #1a535c; 
    text-decoration: none;
}

.category-pill {
    color: #fff; 
    padding: 3px 10px; 
    border-radius: 4px; 
    font-size: 0.65rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    display: inline-block; 
    margin-bottom: 12px; 
}

.article-tags {
    background:rgba(255,248,220, 0.1);
    border: 1px solid #CCC; 
    border-radius: 5px; 
    margin: 0 0 15px 0; 
    padding: 10px; 
    position: relative; 
    z-index: 2;
}

.article-tags-header {
    color: #DDD;
    font-weight: 900; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    position: absolute; 
    margin: -12px 0 0 8px; 
    z-index: 10; 
    background-color: #ffffff; 
    padding: 3px; 
    border:1px solid #ffffff; 
    border-radius: 3px;
}

.tag-link, .article-tag-link { 
    display: inline-block; 
    background: #f7fff7; 
    border: 1px solid #ddd; 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    text-decoration: none; 
    color: #555; 
    margin: 0 4px 6px 0; 
    font-weight: 700; 
    text-transform: uppercase;
}

.tag-link:hover { 
    background-color: #1a535c;
    color: #fff; 
}
.active-tag { 
    background-color: #1a535c !important;
     color: #fff !important; }

.tag-count { 
    font-size: 0.65rem; 
    opacity: 0.6; 
    margin-left: 4px; }

.tag-hidden { display: none; }
.article-tags.expanded .tag-hidden { display: inline; }
.tag-more-btn {
    display: inline-block;
    cursor: pointer;
    background: #e8e8e8;
    border: 1px solid #ccc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #666;
    font-weight: 700;
    margin: 0 4px 6px 0;
    user-select: none;
}
.tag-more-btn:hover { background: #d0d0d0; }
.article-tags.expanded .tag-more-btn { display: none; }

.news-card .meta {
    margin: 10px 0 10px 0;
}

.news-card .meta .MetaPublicationLink {
    color: #333; 
    text-decoration: none;
}

.news-card .logo-container {
  width: 100px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  float: right;
}

.news-card .logo-container img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.news-card .excerpt {
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.5em;
}

.ReadArticle a{float: right; text-decoration: none; color: #1a535c; font-weight: 700}

/**********************
 * RELATED ARTICLES
 **********************/
.related-explanation {
    float: right; 
    cursor: help; 
    color: #1a535c
}

.related-coverage {
    background:rgba(255,248,220, 0.1);
    border: 1px solid #CCC;
    padding: 20px 15px 10px 15px;
    margin: 15px 0px;
    border-radius: 8px;
}

.related-coverage h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.related-header {
    color: #DDD;
    font-weight: 900; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    position: absolute; 
    margin: -12px 0 0 5px; 
    z-index: 10; 
    background-color: #ffffff; 
    padding: 3px; 
    border:1px solid #ffffff; 
    border-radius: 3px;
}

.related-coverage ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-coverage li {
    font-size: 0.85rem;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 10px;
}

.related-coverage li a {
    color: #222;
    text-decoration: none;
    font-weight: bold;
}

.related-coverage li a:hover {
    color: #1a535c;
}

.rel-date {
    color: #888;
    font-size: 0.75rem;
}

.rel-pub-count {
    font-weight: 900;
    color: #1a535c
}

.rel-pub-meta {
    margin: 0 0 0 14px;
}

.rel-bullet {
    color: #888;
    font-size: 0.75rem;
    margin: 0 3px 0 0;
}

.rel-pub {
    color: #888;
    font-size: 0.75rem;
}

/** Related bias styles **/
.rel-bias-tag {
    display: inline-block;
    width: 6px;
    height: 14px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
}

.related-spacer {
    flex-shrink: 0;
    width: auto;
    float: none;
    display: inline-block;
}

.related-link-meta {
    display: block;
    width: auto;
    flex: 1;
    min-width: 0;  
    word-break: break-word;
    overflow-wrap: break-word;
}

.related-link-meta i {
    font-size: 0.75em; 
    color: #4ecdc4;
}


.ExtremeLeftBias {background-color: var(--extreme-left-bias);}
.LeftBias {background-color: var(--left-bias);}
.LeansLeftBias {background-color: var(--leans-left-bias);}
.NeutralBias {background-color: var(--neutral-bias);}
.LeansRightBias {background-color: var(--leans-right-bias);}
.RightBias {background-color: var(--right-bias);}
.ExtremeRightBias {background-color: var(--extreme-right-bias);}
.UnratedBias {background-color: var(--unrated-bias);}

.ExtremeLeftBiasText {color: var(--extreme-left-bias) }
.LeftBiasText { color: var(--left-bias) }
.LeansLeftBiasText {color: var(--leans-left-bias)}
.NeutralBiasText { color: var(--neutral-bias); }
.LeansRightBiasText { color: var(--leans-right-bias); }
.RightBiasText { color: var(--right-bias) }
.ExtremeRightBiasText { color: var(--extreme-right-bias); }
.UnratedBiasText { color: var(--unrated-bias); }

/** Quick Look Bias **/
.QuickBias {display: block; padding: 0 5px 0 0; margin-left: auto;}
.QuickBias.ExtremeLeftBias {border-right: 5px solid var(--extreme-left-bias); background: none !important;}
.QuickBias.LeftBias {border-right: 5px solid var(--left-bias); background: none !important;}
.QuickBias.LeansLeftBias {border-right: 5px solid var(--leans-left-bias); background: none !important;}
.QuickBias.NeutralBias {border-right: 5px solid var(--neutral-bias); background: none !important;}
.QuickBias.LeansRightBias {border-right: 5px solid var(--leans-right-bias); background: none !important;}
.QuickBias.RightBias {border-right: 5px solid var(--right-bias); background: none !important;}
.QuickBias.ExtremeRightBias {border-right: 5px solid var(--extreme-right-bias); background: none !important;}
.QuickBias.UnratedBias {border-right: 5px solid var(--unrated-bias); background: none !important;}


/* Base styling for Bias Links in Sidebar */
.bias-filter-link {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px; 
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    margin: 0 4px 8px 0;
    color: #fff;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.8; 
}

.bias-filter-link:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.active-bias {
    opacity: 1 !important;
    border: 4px solid #ffa500 !important; 
    transform: scale(1.05);
    background-color: #1a535c;
}

.MediaFeedrName {color: #1a535c; text-transform: lowercase; font-weight: 500;}

#PageContent {font-size: 1.15em; line-height: 1.3em}

#PageContent h1 {color: #1a535c}

#PageContent ul li {margin: 0 0 10px 0;}

#PageContent a {color: #4ecdc4; text-decoration: none;}

#biasRatingSpacer {width: 30px;}
#BiasKey {width: 125px}

/*#biasExplanationTable th, #biasExplanationTable td {border:1px solid red;}
#biasExplanationTable td {padding: 10px;}*/

#biasExplanationTable tr {height: 20px;}

.biasExplaination {width: 20px; height: 20px; border:1px solid rgb(80, 80, 78); display: inline-block; border-radius: 50%; margin: 4px 5px 0 10px}

.biasRowEven {background-color:rgba(179, 179, 177, 0.2)}

/**********************
 * Pagination 
 **********************/

.pagination {
    display: flex;
    justify-content: center;
    align-items: center; 
    flex-wrap: wrap;
    gap: 6px;
    margin: 40px 0; 
}

.page-link {
    padding: 10px 14px;
    min-width: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #1a535c; 
    font-weight: 600; 
}

.page-link.active {
    background-color: #1a535c;
    color: #fff; }

/***********************
 * Coverage bar
 **********************/

.coverage-bar { 
    padding-top: 15px; 
    border-top: 1px solid #f0f0f0; 
    margin-top: 15px; 
    clear: both;
}

.coverage-header {color: #767676; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.65rem;
    margin: 0 0 8px 0;
    display: inline-block;
    }

.spectrum-container {
    position: relative;
    width: 100%;
    height: 24px;
    margin-bottom: 10px;
}

/* The Pointer Arrow */
.bias-pointer {
    position: absolute;
    top: 0;
    width: 0; 
    height: 0; 
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 15px solid #4ecdc4; 
    transform: translateX(-50%);
    z-index: 2;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
    cursor: pointer;
}

.spectrum-legend {
    display: flex;
    justify-content: space-between;
    margin-top: -10px; 
    margin-bottom: 20px;
}

.spectrum-legend span {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #999;
}

.legend-left { color: #cc4e5c !important; }
.legend-center { color: #a9a9a9 !important; }
.legend-right { color: #4682b4 !important; }

/* Ensure the bar itself has a slight shadow for depth */
.bias-spectrum { 
    width: 100%; 
    height: 10px; 
    border-radius: 5px; 
    margin-bottom: 15px; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

/**********************************
 ** SOCIAL SHARE ICONS
 *********************************/
.socialShareIcons {display: block}
.ShareLabel {margin:0; display: inline-block; width: 80px; font-size: 0.75em; padding: 5px 0 0 0}

.socialShareIcons ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.socialShareIcons ul li {
    float: none;
    margin: 0;
}

/* Ensure social icons are large enough to tap (44px minimum) */
.social-button {
    font-size: 1.8em;
    padding: 4px;
    display: inline-block;
    min-width: 36px;
    min-height: 36px;
    line-height: 1;
    color: #4ecdc4;
    cursor: pointer;
    background: none;
    border: none;
}


/***************************************
 ** SUBMIT RSS FEED FORM
 **************************************/
/* ── Skip to content ─────────────────────── */
.skip-link {
    position: absolute;
    top: -999px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a535c;
    color: #fff;
    padding: 10px 20px;
    z-index: 10000;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
}
.skip-link:focus {
    top: 0;
}

/* ── Reset & base ────────────────────────── */
        :root {
            --ink:      #4ecdc4;
            --muted:    #5a5a78;
            --rule:     #e0dff5;
            --surface:  #f7f6fc;
            --white:    #ffffff;
            --accent:   #1a535c;
            --accent-h: #e1e4e8;
            --success:  #059669;
            --error:    #dc2626;
            --radius:   10px;
            --shadow:   0 4px 32px rgba(79,70,229,.10);
        }

        /* ── request-card ────────────────────────────────── */
        .request-card {
            background: var(--white);
            border-radius: 18px;
            box-shadow: var(--shadow);
            width: 100%;
            /*max-width: 560px;*/
            overflow: hidden;
            animation: rise .45s cubic-bezier(.22,1,.36,1) both;
            color: #555555;
            flex: 2;
        }

        @keyframes rise {
            from { opacity:0; transform:translateY(18px); }
            to   { opacity:1; transform:translateY(0); }
        }

        .request-card-header {
            background: var(--accent);
            padding: 2rem 2.25rem 1.75rem;
            position: relative;
            overflow: hidden;
        }

        .request-card-header::after {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(ellipse at 80% -10%, rgba(78,205,196,.3) 0%, transparent 65%);
            pointer-events: none;
        }

        .request-card-header h1 {
            font-family: "Quicksand", sans-serif;
            font-weight: 600;
            font-size: 1.65rem;
            color: #fff;
            line-height: 1.2;
            position: relative;
            z-index: 1;
        }

        .request-card-header p {
            margin-top: .45rem;
            font-size: .875rem;
            color: rgba(255,255,255,.75);
            position: relative;
            z-index: 1;
        }

        /* ── Body ────────────────────────────────── */
        .request-card-body { padding: 2rem 2.25rem 2rem 2.25rem; }

        .request-card-body hr {background-color: rgba(54, 26, 92, 0.3); border: none; height: 1px;}

        /* ── Alerts ──────────────────────────────── */
        .alert {
            border-radius: var(--radius);
            padding: .9rem 1.1rem;
            font-size: .875rem;
            margin-bottom: 1.5rem;
            line-height: 1.5;
        }
        .request-alert-success {
            background: #d1fae5;
            border-left: 4px solid var(--success);
            color: #065f46;
        }
        .request-alert-error {
            background: #fee2e2;
            border-left: 4px solid var(--error);
            color: #991b1b;
        }
        .alert ul { margin: .4rem 0 0 1.1rem; }

        /* ── Fields ──────────────────────────────── */
        .field { margin-bottom: 1.25rem; }

        label {
            display: block;
            font-size: .8125rem;
            font-weight: 500;
            letter-spacing: .03em;
            margin-bottom: .4rem;
            color: var(--muted);
            text-transform: uppercase;
        }

        label .req { color: var(--accent); margin-left: 2px; }

        .request-card input[type="text"],
        .request-card input[type="email"],
        .request-card input[type="url"],
        .request-card textarea {
            width: 100%;
            padding: .7rem .95rem;
            border: 1.5px solid var(--rule);
            border-radius: var(--radius);
            font-family: "Quicksand", sans-serif;
            font-size: .9375rem;
            font-weight: 300;
            color: var(--ink);
            background: var(--white);
            transition: border-color .2s, box-shadow .2s;
            outline: none;
        }

        .request-card input:focus, .request-card textarea:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(79,70,229,.12);
        }

        .request-card textarea { resize: vertical; min-height: 100px; }

        /* ── Radio group ─────────────────────────── */
        .request-radio-group {
            display: flex;
            gap: 1rem;
            margin-top: .1rem;
        }

        .request-radio-pill {
            flex: 1;
            position: relative;
        }

        .request-radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }

        .request-radio-pill label {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .5rem;
            padding: .65rem 1rem;
            border: 1.5px solid var(--rule);
            border-radius: var(--radius);
            cursor: pointer;
            font-size: .9rem;
            text-transform: none;
            letter-spacing: 0;
            font-weight: 400;
            color: var(--muted);
            transition: border-color .2s, background .2s, color .2s;
        }

        .request-radio-pill input:checked + label {
            border-color: var(--accent);
            background: rgba(79,70,229,.07);
            color: var(--accent);
            font-weight: 500;
        }

        /* ── request-hint ─────────────────────────────────── */
        .request-hint {
            font-size: .775rem;
            color: var(--muted);
            margin-top: .35rem;
        }

        /* ── Honeypot (visually & functionally hidden) */
        .hp-field {
            position: absolute;
            left: -9999px;
            height: 0;
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
        }

        /* ── Submit button ───────────────────────── */
        .request-btn-submit {
            width: 100%;
            padding: .85rem;
            background: var(--accent);
            color: var(--white);
            border: none;
            border-radius: var(--radius);
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: background .2s, transform .15s;
            margin-top: .5rem;
        }

        .request-btn-submit:hover  { background: var(--accent-h); }
        .request-btn-submit:active { transform: scale(.98); }

        /* ── Roadmap item ────────────────────────── */
        .roadmap-item {
            display: flex;
            gap: 1rem;
            padding: 1.25rem 0;
            border-bottom: 1px solid var(--rule);
        }
        .roadmap-item:last-child { border-bottom: none; }

        .roadmap-vote {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: .25rem;
            min-width: 48px;
            flex-shrink: 0;
        }

        .roadmap-vote-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
            color: #d1d5db;
            transition: color .2s, transform .15s;
            line-height: 1;
        }
        .roadmap-vote-btn:hover { color: #ef4444; transform: scale(1.15); }
        .roadmap-vote-btn.voted { color: #ef4444; }

        .roadmap-vote-count {
            font-size: .8rem;
            font-weight: 600;
            color: var(--muted);
        }

        .roadmap-content { flex: 1; min-width: 0; }

        .roadmap-title {
            font-family: "Quicksand", sans-serif;
            font-size: 1.05rem;
            font-weight: 600;
            margin: 0 0 .3rem;
            color: var(--ink);
        }

        .roadmap-desc {
            font-size: .875rem;
            color: var(--muted);
            margin: 0 0 .6rem;
            line-height: 1.55;
        }

        .roadmap-meta {
            display: flex;
            gap: .5rem;
            align-items: center;
            flex-wrap: wrap;
        }

        .roadmap-category {
            font-size: .7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: .05em;
            color: var(--muted);
            background: var(--surface);
            padding: 2px 10px;
            border-radius: 10px;
        }

        .roadmap-status {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 10px;
            font-size: .7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: .05em;
            color: #fff;
        }

        /* ── Footer note ─────────────────────────── */
        .request-card-footer {
            text-align: center;
            font-size: .775rem;
            color: var(--muted);
            padding: 0 2.25rem 1.5rem;
        }


/******************************************
    ** ADVERTS
******************************************/
        .in-feed-advert {
            overflow: hidden;
            text-align: center;
        }

        .advert-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            opacity: 0.75;
            margin-bottom: 0.4rem;
            display: block;
        }

        .advert-embed,
        .in-feed-advert img {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 0 auto;
        }

/*****************************************        
 ** DONATE BUTTON
 ****************************************/
 #donate-button-container {margin: 0 auto; width: 300px;}

/*-------------------------------------------------------------
  MOBILE STYLES
-------------------------------------------------------------*/

@media (max-width: 400px) {
    .news-card .logo-container {
        float: none;
        margin: 0 0 10px 0;
        width: 80px;
        height: 30px;
    }
}

/*-------------------------------------------------------------
  SMALL MOBILE  (≤ 380px) — extreme narrow (e.g. iPhone SE)
-------------------------------------------------------------*/
@media (max-width: 380px) {
    .news-card {
        padding: 10px;
        border-radius: 6px;
    }

    .news-card h2 {
        font-size: 0.95rem;
    }

    .coverage-header {
        font-size: 0.6rem;
    }

    .ticker-label {
        display: none;
    }
}

/*-------------------------------------------------------------
  MOBILE  (≤ 600px) — tighten everything up
-------------------------------------------------------------*/
@media (max-width: 600px) {
    #Header {
        margin: 6px 0;
    }

    #MenuContent {
        width: 100%;
        flex-direction: column;
        gap: 6px;
        padding: 8px 10px;
    }

    #MenuContent form {
        width: 100%;
    }

    .menu-dropdown-content {
        position: static;
        transform: none;
        background: rgba(0,0,0,.15);
        border-radius: 6px;
        box-shadow: none;
        min-width: auto;
    }

    .menu-dropdown-content a {
        font-size: .825rem;
        padding: 6px 16px;
    }

    .menu-search-input {
        flex: 1;
        max-width: 100%;
    }

    #TickerWrap {
        height: 40px;
    }

    .ticker-label {
        padding: 0 10px;
        font-size: 0.6rem;
    }

    .ticker-item {
        padding: 0 24px;
    }

    .news-card {
        padding: 12px;
    }

    .spectrum-legend span {
        font-size: 0.6rem;
    }

    .page-link {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    #Footer {
        width: 98%;
        margin: 20px auto 5px auto;
    }

    .bias-filter-link {
        font-size: 0.65rem;
        padding: 4px 8px;
        margin: 0 2px 6px 0;
    }

    .tag-link,
    .article-tag-link {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/*-------------------------------------------------------------
  TABLET  (≤ 900px) — sidebar moves below the feed
-------------------------------------------------------------*/
@media (max-width: 900px) {

    /** Logo **/

    #HeaderLogo {
        content: url('../img/mediafeedr-logo-mobile.png');
        max-height: 58px;
        width: auto;
    }

    /* Add right padding to the header so the logo text
       doesn't slide under the two fixed buttons (hamburger
       + dark mode toggle = ~112px total width including gaps) */
    #Header {
        padding: 0 120px 0 10px;
    }

    #logocontainer {
        margin: 0;          /* left-align on mobile so it clears the buttons */
        max-width: 280px;
    }

    #PageWrapper {
        flex-direction: column;
        width: 97%;
        margin: 15px auto;
        gap: 16px;
    }

    #Sidebar {
        position: static;
        height: auto;
        overflow-y: visible;
        width: 100%;
        padding-right: 0;
    }

    .filter-scroll-area-pub,
    .filter-scroll-area-cat {
        max-height: 200px; 
    }

    /* Hide main menu links on mobile — nav moves into sidebar drawer */
    #MenuLinks { display: none; }

    /* Show sidebar navigation */
    .sidebar-nav { display: block; }

    /** Sidebar Flyout **/

    /* Show the hamburger button */
    #SidebarToggle {
        display: flex;
    }

    /* Override the static positioning from mobile-fixes.css
       and turn the sidebar into a fixed drawer */
    #Sidebar {
        position: fixed !important;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 360px;
        height: 100vh !important;
        overflow-y: auto !important;
        z-index: 999;
        padding: 20px 15px;
        padding-right: 15px;

        /* Slide off-screen to the right by default */
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);

        /* Ensure the sidebar has a solid background in the drawer */
        background-color: #f5f5f5;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    }

    /* Slide in when open */
    #Sidebar.is-open {
        transform: translateX(0);
    }

    /* Close button inside the drawer */
    #SidebarCloseBtn {
        display: flex;
    }
}

/** Pause the news ticker based on user
 ** settings in the OS for people with
 ** motion issues 

 @media (prefers-reduced-motion: reduce) {
    .ticker-content {
        animation-play-state: paused;
    }
}**/

@media (prefers-reduced-motion: reduce) {
    .ticker-content {
        animation-duration: 600s; /* much slower, not stopped */
    }
}

/* ── New Articles Banner ── */
#NewArticlesBanner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #e8f5e9;
    border-bottom: 2px solid #4caf50;
    color: #2e7d32;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease;
}
#NewArticlesBanner a {
    color: #1b5e20;
    text-decoration: underline;
    cursor: pointer;
}
#NewArticlesBanner a:hover {
    color: #000;
}
.banner-sep {
    margin: 0 8px;
    opacity: 0.4;
}
#NewArticlesBanner.banner-hiding {
    opacity: 0;
}

/* ── Cookie Consent Banner ── */
#CookieConsent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: #f5f5f5;
    border-top: 2px solid #ddd;
    color: #333;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.85rem;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
#CookieConsent a {
    color: #1a535c;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}
#CookieConsent a:hover {
    color: #000;
}
