:root {
  --ecampus-blue: #004b8d;
  --ecampus-blue-dark: #173c78;
  --ecampus-link: #00589c;
  --ecampus-green: #82aa3f;
  --ecampus-rule: #dce5ef;
  --ecampus-soft: #f5f9fc;
  --text: #1f2933;
  --muted: #5e6b75;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--white);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.42;
}

a {
  color: var(--ecampus-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--ecampus-blue-dark);
}

img {
  display: block;
  max-width: 100%;
}

.ticker-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  background: var(--white);
  overflow: hidden;
}

.ticker-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 9px 2px;
}

.ticker-entry {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0 10px;
  border-bottom: 1px solid var(--ecampus-rule);
}

.ticker-entry:last-child {
  border-bottom: 0;
}

.entry-marker {
  width: 0;
  height: 0;
  margin: 7px 0 0 5px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--ecampus-blue-dark);
}

.entry-body {
  min-width: 0;
}

.entry-content {
  display: block;
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 400;
  text-decoration: none;
}

.entry-content *,
.entry-meta,
.entry-meta *,
.ticker-foot,
.ticker-foot * {
  font-weight: 400 !important;
}

.entry-content p {
  margin: 0 0 6px;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content a {
  color: var(--ecampus-link);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content:hover,
.entry-content:focus {
  color: var(--ecampus-blue-dark);
  text-decoration: none;
}

.entry-content:focus {
  outline: 2px solid rgba(0, 75, 141, 0.25);
  outline-offset: 2px;
}

.media-grid {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: 10px;
}

.media-grid--multi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-link {
  display: block;
  overflow: hidden;
  width: 100%;
  border-radius: 4px;
  background: transparent;
  text-decoration: none;
}

.media-link img {
  width: auto;
  max-width: min(100%, clamp(260px, 72vw, 420px));
  max-height: 500px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 4px;
  background: transparent;
}

.media-grid--multi .media-link img {
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: none;
  max-height: 190px;
  object-fit: cover;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.entry-meta a {
  color: var(--muted);
  text-decoration: none;
}

.entry-meta a:hover,
.entry-meta a:focus {
  text-decoration: underline;
}

.ticker-foot {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  padding: 8px 9px;
  border-top: 1px solid var(--ecampus-rule);
  color: var(--text);
  font-size: 12px;
  background: var(--ecampus-soft);
}

.load-state {
  min-height: 22px;
  padding: 6px 0 8px 21px;
  color: var(--muted);
  font-size: 12px;
}

.rss-dot {
  position: relative;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-top: 2px;
  border-radius: 2px;
  background: var(--ecampus-link);
}

.rss-dot::before,
.rss-dot::after {
  position: absolute;
  content: "";
  border: 2px solid var(--white);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 8px 0 0;
}

.rss-dot::before {
  right: 2px;
  bottom: 2px;
  width: 5px;
  height: 5px;
}

.rss-dot::after {
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 8px;
}

.stale-note {
  color: var(--muted);
}

.empty-state,
.message-box {
  margin: 9px;
  padding: 9px;
  border: 1px solid var(--ecampus-rule);
  border-radius: 4px;
  background: var(--ecampus-soft);
  color: var(--muted);
}

@media (max-width: 360px) {
  body {
    font-size: 13px;
  }

  .media-link img {
    max-width: min(100%, 82vw);
    max-height: 360px;
  }

  .media-grid--multi {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 300px) {
  .media-link img {
    max-width: min(100%, 78vw);
    max-height: 300px;
  }
}
