:root {
  --navy: #071a46;
  --blue: #0d3b88;
  --royal: #132c91;
  --gold: #ffc91d;
  --red: #f32423;
  --ink: #0a1736;
  --muted: #53627d;
  --line: #cbd6e8;
  --panel: #f7f9fd;
  --white: #ffffff;
  --shadow: 0 18px 38px rgba(4, 15, 45, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: auto;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(18, 87, 174, 0.48), transparent 34%),
    linear-gradient(145deg, #031133 0%, #072a65 42%, #031134 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.board {
  width: 100%;
  min-width: 1200px;
  min-height: 720px;
  height: 100vh;
  max-width: 1920px;
  max-height: 1080px;
  margin: 0 auto;
  padding: 16px 18px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 30vw, 430px);
  grid-template-rows: clamp(118px, 13vh, 142px) minmax(0, 1fr) auto;
  gap: 8px;
}

.topbar {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(430px, 0.9fr) minmax(360px, 1.1fr) minmax(220px, 300px);
  align-items: center;
  gap: 18px;
  min-height: 0;
  color: var(--white);
}

.brand {
  display: grid;
  grid-template-columns: clamp(70px, 6vw, 82px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding-left: 4px;
}

.crest {
  width: clamp(70px, 6vw, 82px);
  aspect-ratio: 1;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
}

.crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.1);
  transform-origin: center;
}

.campus-name {
  margin: 0;
  font-size: clamp(20px, 1.7vw, 32px);
  line-height: 1.02;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.campus-name-small {
  margin-top: 3px;
}

.tagline {
  min-height: 86px;
  padding-left: 24px;
  display: grid;
  align-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.58);
  min-width: 0;
}

.tagline p {
  margin: 0;
  font-size: clamp(20px, 1.45vw, 28px);
  line-height: 1.16;
  font-weight: 900;
}

.tagline-sub {
  margin-top: 5px !important;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(14px, 0.95vw, 18px) !important;
  font-style: italic;
  font-weight: 700 !important;
  line-height: 1.18 !important;
}

.tagline span {
  color: var(--gold);
}

.clock-card {
  justify-self: end;
  width: min(100%, 300px);
  min-height: 104px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.clock-icon {
  position: relative;
  width: 54px;
  aspect-ratio: 1;
  border: 7px solid var(--white);
  border-radius: 50%;
  flex: 0 0 auto;
}

.clock-icon::before,
.clock-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  border-radius: 999px;
  background: var(--white);
  transform-origin: 50% 0;
}

.clock-icon::before {
  height: 25px;
  transform: translate(-50%, -3px) rotate(0deg);
}

.clock-icon::after {
  height: 30px;
  transform: translate(-50%, -3px) rotate(132deg);
}

#clock {
  display: block;
  color: var(--white);
  font-size: clamp(30px, 2.2vw, 42px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
}

#date {
  margin: 8px 0 0;
  color: var(--white);
  font-size: clamp(14px, 0.95vw, 18px);
  font-weight: 600;
  text-align: right;
}

.content-grid {
  display: contents;
}

.sidebar,
.main-stage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.sidebar {
  grid-column: 2;
  grid-row: 1 / 3;
  height: 100%;
}

.main-stage {
  grid-column: 1;
  grid-row: 2;
}

.panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff, #f5f7fc);
  box-shadow: var(--shadow);
}

.panel-title,
.news-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0;
}

.panel-title {
  padding: 0 16px;
  color: var(--white);
  background: linear-gradient(135deg, #0e4fa9, #152486);
}

.panel-title.purple {
  background: linear-gradient(135deg, #221f95, #4b2bb5);
}

.panel-title.green {
  background: linear-gradient(135deg, #047857, #0f766e);
}

.panel-title h2,
.section-label h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.icon {
  width: 30px;
  height: 30px;
  display: inline-block;
  border: 3px solid currentColor;
  border-radius: 6px;
  flex: 0 0 auto;
}

.calendar {
  position: relative;
}

.calendar::before {
  content: "";
  position: absolute;
  inset: 8px 5px auto;
  height: 3px;
  background: currentColor;
  box-shadow: 0 8px 0 currentColor;
}

.megaphone {
  position: relative;
  border: 0;
}

.megaphone::before {
  content: "";
  position: absolute;
  inset: 8px 6px;
  clip-path: polygon(0 30%, 52% 12%, 52% 88%, 0 70%);
  background: currentColor;
}

.megaphone::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 10px;
  width: 8px;
  height: 15px;
  border-right: 4px solid currentColor;
  border-radius: 50%;
}

.lecturer {
  position: relative;
  border-radius: 50%;
}

.lecturer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
}

.lecturer::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 16px;
  height: 9px;
  border-radius: 999px 999px 0 0;
  background: currentColor;
  transform: translateX(-50%);
}

.timeline {
  margin: 0;
  padding: 16px 18px 14px;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding-bottom: 16px;
}

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 93px;
  top: 23px;
  width: 1px;
  height: calc(100% - 10px);
  background: #7287b4;
}

.timeline time {
  color: #132c91;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.timeline time span {
  display: block;
}

.timeline time .time-separator {
  margin: 2px 0;
  line-height: 0.8;
}

.timeline div {
  position: relative;
  padding-left: 16px;
  border-bottom: 1px dashed #d4dbea;
}

.timeline div::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 7px;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #17329c;
  z-index: 1;
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline strong {
  font-size: 21px;
  line-height: 1.2;
}

.timeline span {
  margin-top: 6px;
  color: #111827;
  font-size: 17px;
}

.announcements {
  flex: 1 1 0;
  min-height: 0;
}

#announcement-list {
  height: calc(100% - 48px);
  overflow: hidden;
}

.announcement-track.is-sliding {
  animation: panel-slide-up 22s linear infinite;
}

.lecturer-status {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lecturer-slider {
  flex: 1;
  height: auto;
  overflow: hidden;
  background: #f8fafc;
}

#lecturer-status-list {
  display: grid;
  min-height: 100%;
  gap: 10px;
  padding: 12px 16px;
}

#lecturer-status-list.is-sliding {
  animation: panel-slide-up 18s linear infinite;
}

.lecturer-item {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 112px;
  padding: 16px 16px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(10, 23, 54, 0.06);
}

.lecturer-item strong {
  display: block;
  color: #071a46;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lecturer-item span {
  display: inline-flex;
  margin-top: 9px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.lecturer-item.unavailable span {
  color: #991b1b;
  background: #fee2e2;
}

.lecturer-item small {
  display: block;
  margin-top: 7px;
  color: #53627d;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  margin: 0 14px;
  padding: 11px 0;
  border-bottom: 1px dashed #cfd8ea;
}

.notice time {
  display: grid;
  place-items: center;
  width: 48px;
  height: 54px;
  border: 2px solid #2834a2;
  border-radius: 6px;
  color: #17206d;
  text-transform: uppercase;
}

.notice b {
  font-size: 22px;
  line-height: 1;
}

.notice span {
  display: block;
}

.notice p {
  margin: 0;
  align-self: center;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.32;
}

.notice p span {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.panel-action {
  min-height: 52px;
  margin: 16px 14px 14px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, #212a95, #4b2bb5);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-action span,
.news-header a span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  color: #19278d;
  font-size: 32px;
  line-height: 1;
}

.hero {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #0fa3ee;
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: #09245a;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 240ms ease;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4, 17, 50, 0.16), transparent 42%);
}

.hero-copy {
  display: none;
}

.hero-copy p {
  margin: 0 0 18px;
  font-size: clamp(30px, 2.3vw, 44px);
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0 0 24px;
  color: var(--gold);
  font-size: clamp(58px, 4.6vw, 86px);
  line-height: 1.08;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy span {
  display: block;
  width: min(100%, 520px);
  font-size: clamp(21px, 1.45vw, 28px);
  line-height: 1.48;
  font-weight: 600;
}

.slider-dots {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 22px;
  display: flex;
  gap: 14px;
  transform: translateX(-50%);
}

.slider-dots span {
  width: 28px;
  height: 13px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.slider-dots .active {
  background: var(--gold);
}

.ticker {
  grid-column: 1 / 3;
  grid-row: 3;
  min-height: 52px;
  display: grid;
  grid-template-columns: 250px 1fr;
  overflow: hidden;
  border-radius: 8px;
  background: var(--white);
}

.ticker strong {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 26px;
  color: var(--white);
  background: var(--red);
  font-size: 21px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticker strong::after {
  content: "";
  position: absolute;
  top: 0;
  right: -32px;
  border-top: 26px solid transparent;
  border-bottom: 26px solid transparent;
  border-left: 32px solid var(--red);
}

.ticker-window {
  overflow: hidden;
}

.ticker p {
  width: max-content;
  margin: 0;
  padding-left: 56px;
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: 52px;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  animation: ticker 32s linear infinite;
}

.ticker span {
  width: 2px;
  height: 24px;
  background: #66739a;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes lecturer-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes panel-slide-up {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

@media (max-width: 1200px) {
  .board {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tagline {
    min-height: auto;
    padding: 18px 0 18px 24px;
  }

  .clock-card {
    justify-self: stretch;
  }

  .content-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
  }

  .sidebar,
  .main-stage,
  .ticker {
    grid-column: auto;
    grid-row: auto;
  }

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

@media (orientation: portrait) {
  body {
    overflow: hidden;
  }

  .board {
    width: 100%;
    min-width: 0;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
    gap: 14px;
    min-height: auto;
    align-items: center;
  }

  .brand {
    grid-template-columns: 88px minmax(0, 1fr);
    padding-left: 0;
  }

  .crest {
    width: 88px;
  }

  .campus-name {
    font-size: clamp(34px, 5.4vw, 58px);
  }

  .tagline {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 10px 0 10px 18px;
  }

  .tagline p {
    font-size: clamp(24px, 4vw, 42px);
  }

  .tagline-sub {
    white-space: normal;
    font-size: clamp(16px, 2.4vw, 26px) !important;
  }

  .clock-card {
    width: 100%;
    min-height: auto;
    padding: 4px 0;
  }

  .content-grid {
    flex: 1 1 auto;
    display: grid;
    grid-template-rows: minmax(360px, 42vh) minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
  }

  .main-stage {
    order: 1;
    flex: 1 1 auto;
    min-height: 0;
  }

  .hero {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  .sidebar {
    order: 2;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
  }

  .announcements {
    min-height: 0;
    flex: initial;
    display: flex;
    flex-direction: column;
  }

  #announcement-list {
    flex: 1;
    height: auto;
  }

  .lecturer-status {
    flex: initial;
    display: flex;
    flex-direction: column;
  }

  .lecturer-slider {
    flex: 1;
    height: auto;
  }

  #lecturer-status-list {
    height: auto;
    min-height: 100%;
  }

  .ticker {
    grid-template-columns: 1fr;
  }

  .ticker strong {
    min-height: 44px;
    padding-left: 18px;
  }

  .ticker strong::after {
    display: none;
  }
}

@media (max-height: 760px) and (min-width: 1201px) {
  .board {
    grid-template-rows: 112px minmax(0, 1fr) auto;
    padding: 8px 16px;
    gap: 8px;
  }

  .topbar {
    gap: 14px;
  }

  .panel-title,
  .news-header {
    min-height: 44px;
  }

  .panel-title h2,
  .section-label h2 {
    font-size: 16px;
  }

  .announcements {
    flex: 1 1 0;
  }

  .lecturer-status {
    flex: 1 1 0;
  }

  .lecturer-slider,
  #lecturer-status-list {
    min-height: 100%;
    height: auto;
  }

  .lecturer-item {
    min-height: 84px;
    padding: 11px 13px;
  }

  .lecturer-item strong {
    font-size: 16px;
  }

  .notice p {
    font-size: 17px;
  }

  .ticker {
    min-height: 46px;
  }

  .ticker strong,
  .ticker p {
    min-height: 46px;
    font-size: 17px;
  }
}

@media (max-width: 760px) {
  .board {
    padding: 12px;
  }

  .brand {
    padding-left: 0;
  }

  .crest {
    width: 82px;
  }

  .clock-card {
    min-height: 120px;
    padding: 18px;
  }

  .clock-icon {
    width: 58px;
    border-width: 6px;
  }

  .hero {
    min-height: 440px;
  }

  .hero-copy {
    width: 100%;
    padding: 56px 28px 0;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .ticker {
    grid-template-columns: 1fr;
  }

  .ticker strong::after {
    display: none;
  }

}

@media (orientation: portrait) {
  .board {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  .content-grid {
    flex: 1 1 auto;
    display: grid;
    grid-template-rows: minmax(0, 1.08fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
  }

  .main-stage {
    grid-row: 1;
    flex: initial;
    min-height: 0;
    grid-column: auto;
  }

  .hero {
    flex: initial;
    min-height: 0;
    height: 100%;
  }

  .sidebar {
    display: contents;
  }

  .announcements,
  .lecturer-status {
    flex: initial;
    min-height: 0;
  }

  .announcements {
    grid-row: 2;
  }

  .lecturer-status {
    grid-row: 3;
  }

  #announcement-list,
  .lecturer-slider {
    flex: 1;
    height: auto;
    min-height: 0;
  }

  .ticker {
    flex: 0 0 auto;
  }
}
