* {
  box-sizing: border-box;
}

.row {
  display: flex;
}

/* Create two equal columns that sits next to each other */
.column {
  flex: 45%;
  padding: 10px;
}
body  {
/* 6F7D8C;  77A0A9  EAC8CA F2D5F8 */
  color: #6F7D8C;
  background-color: #101010;
}

h2, h3 {
  color: #77A0A9;
}

a:link {
  color: #ecdbba;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: #c69749;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: #b8e1dd;
  background-color: transparent;
  text-decoration: underline;
}

a:active {
  color: yellow;
  background-color: transparent;
  text-decoration: underline;
}

hr {
    height: 1px;
    color: #77A0A9;
    background: #77A0A9;
    font-size: 0;
    border: 0;
}

footer {
  border-top: 1px solid #77A0A9;
}

caption {
  color: #77A0A9;
  font-size: 1.2em;
}

td {
  padding-left: 15px;
  padding-right: 15px;
  width: 310px;
}

ul.topnav {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #333;
}

ul.topnav li {float: right;}

ul.topnav li a {
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

ul.topnav li a:hover:not(.active) {background-color: #111;}

ul.topnav li a.active {background-color: #77A0A9;}

ul.topnav li.right {float: right;}

@media screen and (max-width: 600px) {
  ul.topnav li.right, 
  ul.topnav li {float: none;}
}

/* ---- Accessibility & layout enhancements (2025-12) ---- */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  line-height: 1.6;
}

/* Provide a consistent content width without constraining full-bleed elements */
#page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 1rem 1rem;
}

main {
  display: block;
  padding: 1rem 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

/* Skip link (visible on keyboard focus) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: #77A0A9;
  color: #101010;
  z-index: 9999;
}

.skip-link:focus,
.skip-link:active {
  left: 0.5rem;
  top: 0.5rem;
  outline: 2px solid #ecdbba;
  outline-offset: 2px;
}

/* Improve keyboard focus visibility site-wide */
a:focus-visible {
  outline: 2px solid #ecdbba;
  outline-offset: 2px;
}

/* Top navigation: replace floats with flex for predictable ordering */
ul.topnav {
  display: flex;
  justify-content: flex-end;
  gap: 0;
}

ul.topnav li {
  float: none;
}

ul.topnav li a.active,
body.home ul.topnav a[href="index.xhtml"],
body.messages ul.topnav a[href="messages.xhtml"] {
  background-color: #77A0A9;
  color: #101010;
  text-decoration: none;
}

/* Footer layout: allow wrapping on smaller screens */
.row {
  flex-wrap: wrap;
  gap: 1rem;
}

.column {
  flex: 1 1 320px;
}

/* Message index navigation */
.yearnav,
.monthnav {
  margin: 0.75rem 0 1.25rem 0;
}

.yearnav ul,
.monthnav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.yearnav a[aria-current="page"] {
  font-weight: bold;
  text-decoration: underline;
}

.monthnav span[aria-disabled="true"] {
  opacity: 0.6;
}

/* Message “cards” (replaces layout tables) */
.month {
  margin: 2rem 0;
}

.month-title {
  margin: 0 0 0.75rem 0;
}

.message-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 520px));
  justify-content: center;
  gap: 1rem;
}

.message-card {
  border: 1px solid #77A0A9;
  border-radius: 10px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
}

.message-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.message-card time {
  font-weight: 700;
}

.message-card iframe {
  width: 100%;
  border: 0;
}

/* Utility: visually hidden but accessible */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.message-audio {
  margin-top: auto;
  width: 100%;
  display: block;
}

.audio-panel {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  padding: 14px;
  margin-top: 10px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  
  /* Background image + readability overlay */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.75)),
    url("/images/audio/AudioPlayerImage.png");
  background-size: contain;
  background-position: center; /* keeps the cross visible */
  background-repeat: no-repeat;
  background-color: #000;
}