/* ==========================================================================
   Polyhedra Stylesheet
   ========================================================================== */

/* 1. Global Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px; /* Base readable text size */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #222222;
  background-color: #fcfcfc;
  
  /* Center the page on wide screens and prevent edge-to-edge stretching */
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* 2. Overrides for any remaining legacy <font> tags (Safety Net) */
font, big, small {
  font-family: inherit !important;
  font-size: inherit !important;
}

/* 3. Typography & Headings */
h1, h2, h3, h4 {
  color: #111111;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

p {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}

/* 4. Links */
a {
  color: #0056b3;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease-in-out;
}

a:visited {
  color: #6f42c1; /* Modern, readable purple */
}

a:hover, a:focus {
  color: #003366;
  text-decoration-thickness: 2px;
}

/* 5. Responsive Images & 3D Previews */
img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

/* Banner image at top */
img[src*="poly.gif"] {
  display: block;
  margin-bottom: 12px;
}

/* Polyhedron preview thumbnail rows */
a > img[src$=".gif"] {
  margin: 4px;
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a > img[src$=".gif"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 6. Lists */
ul {
  padding-left: 24px;
  margin-top: 0.5em;
  margin-bottom: 1.2em;
}

li {
  margin-bottom: 0.4em;
}

/* 7. Notice / Announcement Callout (e.g., The Scott Vorthmann / VRML note) */
/* If you wrap that block in a <div class="notice"> or keep the red font */
.notice,
p:has(a[href*="vrml-revival"]) {
  background-color: #fff3f3;
  border-left: 4px solid #d9383a;
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  margin: 1.2em 0;
  font-size: 0.95rem;
}

/* 8. "NEW" and "UPDATED" Badges */
span[style*="color: rgb(255, 0, 0)"],
span[style*="color: #ff0000"] {
  display: inline-flex;
  align-items: center;
  background-color: #ffe5e5;
  color: #b30000 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Hide the tiny arrow.jpg icon inside modern badges */
span[style*="color: rgb(255, 0, 0)"] img[src*="arrow.jpg"],
span[style*="color: #ff0000"] img[src*="arrow.jpg"] {
  display: none;
}

/* 9. Mobile Adjustments */
@media (max-width: 600px) {
  body {
    padding: 16px 12px;
  }
  
  /* Stack 3D preview images on small screens */
  p:has(img[src$=".gif"]) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}