body {
  font-family: Arial, sans-serif;
  margin:40px;
  background:#f4f6fb;
  color:#222;
}

header {
  text-align:center;
  margin-bottom:50px;
}

.subtitle {
  color:#666;
  font-size:18px;
}

h1 {
  font-size:40px;
  margin-bottom:5px;
}

/*
h2 {
  margin-top:60px;
  margin-bottom:20px;
  border-bottom:3px solid #ddd;
  padding-bottom:8px;
}
*/

h2 {
  text-align: center;
  margin-top: 40px;
  scroll-margin-top: 80px; /* adjust to your header height */
}

/* GRID LAYOUT */

.formula-grid {
  display:grid;
  /* grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); */
  /* grid-template-columns:1fr;  */
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  /* gap:22px; */
  gap:16px;
}


/* FORMULA CARD */

.card {
  background:white;
  padding:20px;
  border-radius:10px;
  box-shadow:0 3px 8px rgba(0,0,0,0.08);
  transition:transform .15s;
  /* overflow-x: auto; */
  overflow-x: visible;
}

.card:hover {
  transform:translateY(-4px);
}

.card h3 {
  margin-top:0;
  font-size:16px;
  color:#444;
  text-align:center;
}

/* Make math larger */

mjx-container {
  font-size:140%;
}

/* Card layout */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 40px auto;
}

/* Card styling */
.card {
  display: block;
  text-decoration: none;
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #2c3e50;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover effect */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* Title */
.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

/* Description */
.card-desc {
  font-size: 14px;
  color: #555;
}

.top-bar {
  background-color: white;
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-bar p {
  margin: 0;
}

.top-bar hr {
  margin: 6px auto 0 auto;
  width: 90%;
}

.table-link {
  margin: 0;
  font-size: 16px;
}


/* Make links look like buttons */
.table-link a {
  text-decoration: none;
  font-weight: bold;
  padding: 6px 12px;
  margin: 0 4px;
  border-radius: 6px;
  color: #2c3e50;
  display: inline-block;
  transition: background-color 0.15s ease;
}

/* Hover effect */
.table-link a:hover {
  background-color: #e8f0fe;
  color: #1a73e8;
}