html, body {
  margin: 0;
  min-height: 100%;
  background: url('https://www.transparenttextures.com/patterns/subtle-white-feathers.png'), #00000A;
  color: #FFA500;
  font-family: 'Verdana', sans-serif;
  font-size: 16px;
  scroll-padding-top: 120px;
}

body {
  display: flex;
  flex-direction: column;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;              /* fixed height */
  line-height: 60px;         /* vertically center text */
  background: linear-gradient(#FF8C00, #CC6600);
  padding: 0 1rem;           /* horizontal padding */
  text-align: left;
  border-bottom: 4px double #FFB347;
  z-index: 1100;             /* above nav */
}

header h1 {
  font-size: 2rem;
  text-shadow: 2px 2px 0 #000;
  color: #FFFFFF;
  margin: 0;
}

.marquee {
  position: fixed;
  top: 60px;  /* just below header */
  left: 200px; /* to the right of nav */
  right: 0;
  height: 30px; /* adjust height as needed */
  background: #222;
  color: #FFA500;
  font-weight: bold;
  padding: 0.3rem 1rem;
  overflow: hidden;
  white-space: nowrap;
  z-index: 1050;
}

.layout {
  display: flex;
  flex-grow: 1;
  align-items: stretch;
}

nav {
  position: fixed;
  top: 60px;       /* start below header */
  left: 0;
  height: calc(100vh - 60px);  /* fill viewport minus header */
  overflow-y: auto;
  background-color: #111;
  width: 200px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-right: 4px double #FFB347;
  box-sizing: border-box;
  z-index: 1000;
}

nav .menu-item {
  color: #FFA500;
  text-decoration: none;
  margin: 0.5rem 0;
  font-weight: bold;
  cursor: pointer;
}

nav .submenu {
  display: none;
  flex-direction: column;
  margin-left: 1rem;
  background-color: #331a00;
  border-left: 2px solid #FFB347;
  padding-left: 0.5rem;
}

nav .submenu a {
  font-weight: normal;
  color: #FFDD99;
  text-decoration: none;
  margin: 0.25rem 0;
}

nav .submenu a:hover {
  text-decoration: underline;
  color: #FFFFFF;
}

main {
  margin-left: 200px;     /* for fixed nav */
  margin-top: 90px;       /* 60px header + 30px marquee */
  padding: 2rem;
  max-width: 1200px;
  margin-right: auto;
  flex: 1;
  position: relative;     /* ensure stacking context */
  z-index: 1;             /* behind marquee */
}

.charts-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.chart-container {
  background: #331a00;
  border: 2px ridge #FFB347;
  padding: 1rem;
  margin-bottom: 2rem;
  flex: 1;
  min-width: 500px;
}

.counter {
  color: #FFA500;
  margin-top: 1rem;
  text-align: center;
  font-size: 1.1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

th, td {
  padding: 0.5rem;
  border: 1px solid #FFB347;
  text-align: left;
  color: #FFDD99;
}

th {
  background-color: #442200;
  color: #FFA500;
}

/* Comparison table specific styles */
#comparisonTable td:nth-child(n+2) {
  font-weight: bold;
}

#comparisonTable td:empty {
  color: #666;
  text-align: center;
}

#comparisonTable td:empty::after {
  content: "—";
}

.change-indicator {
  display: inline-block;
  margin-right: 4px;
}

.change-indicator.up {
  color: #00FF00;
}

.change-indicator.down {
  color: #FF4444;
}

/* Highlight rows on hover */
#comparisonTable tbody tr:hover {
  background-color: #442200;
}

footer {
  background: #222;
  color: #FFB347;
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
}
