body {
  margin: 0;
  display: flex;
  justify-content: center;
  /* Change this to flex-start so content starts at the top */
  align-items: flex-start; 
  min-height: 100vh;
  color: #e0e0ff;
  font-family: "Cinzel", serif;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("https://substackcdn.com/image/fetch/$s_!naXD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56ea8537-871d-48bd-b53d-9525bdbe9775_3840x2160.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

input[type="date"] {
  display: block; /* SURGICAL FIX: Allows centering */
  margin: 20px auto 30px auto; /* Centered with top/bottom gutters */
  background: #0f0f1f;
  color: #fff;
  border: 1px solid #4e4e8e;
  padding: 12px 20px;
  border-radius: 4px;
  font-family: inherit; /* Ensures it uses Cinzel if supported */
  width: 200px; /* Uniform width for better visual grounding */
  text-align: center;
  
  /* Standard blue-glow iconography */
  color-scheme: dark;
  accent-color: #a0c0ff;
}

/* Specifically targeting the calendar icon's filter for the blue glow */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(80%) sepia(20%) saturate(1000%) hue-rotate(180deg)
    brightness(110%);
}

/* --- Tiered Header Hierarchy --- */
h1 {
  line-height: 1.1; /* Tighter spacing for the tiered look */
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-the {
  font-size: 1.2rem; /* Smallest: Leave as-is anchor */
  font-weight: 400;
}

.title-brand {
  font-size: 3.5rem; /* Largest: The Hero Line */
  font-weight: 700;
  white-space: nowrap; /* Forces one line */
  letter-spacing: 2px;
}

.title-app {
  font-size: 2rem; /* Middlest: Between 'The' and 'Brand' */
  font-weight: 500;
  white-space: nowrap; /* Forces one line */
  color: #a0c0ff; /* Subtle blue shift to differentiate */
}

/* Mobile Scaling for One-Line Integrity */
@media (max-width: 768px) {
  .title-brand {
    font-size: 2.4rem; /* Scaled down to fit mobile width */
  }
  .title-app {
    font-size: 1.2rem;
  }
  .title-the {
    font-size: 0.9rem;
  }
}

.main-container {
  display: flex;
  gap: 20px;
  max-width: 900px;
  width: 90%; /* Creates healthy side gutters */
  margin: 40px auto 120px auto; /* Adds top margin and bottom buffer for footer */
}

.era-sidebar {
  flex: 1;
  background: rgba(15, 15, 30, 0.8);
  padding: 20px;
  border: 1px solid #333;
  border-radius: 12px;
  font-size: 0.9rem;
  text-align: left;
}

.era-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #222;
  padding-bottom: 10px;
}

.era-item strong {
  color: #a0c0ff;
  display: block;
  margin-bottom: 5px;
}

#output {
  display: flex;
  flex-direction: column;
  gap: 15px;
  line-height: 1.4;
  margin: 30px auto; /* Centered anchor */
  padding: 25px 40px;
  background: rgba(15, 15, 30, 0.7); /* Translucent deep blue */
  border: 1px solid rgba(160, 192, 255, 0.4); /* Subtle blue glow frame */
  border-radius: 8px;
  width: fit-content; /* Shrinks to text size */
  min-width: 300px;
  max-width: 90%; /* Prevents edge-touching on mobile */
  box-shadow: 0 0 20px rgba(0, 100, 255, 0.15);
  text-align: center;
}

.output-sun {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.output-year {
  font-size: 1.2rem;
  color: #a0c0ff;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Mobile Scaling */
@media (max-width: 768px) {
  .output-sun {
    font-size: 1.3rem;
  }
  .output-year {
    font-size: 1rem;
  }
}

/* --- TAPER FOOTER RECONSTRUCTION --- */
.taper-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 20px; /* Reduced side padding for mobile */
  background: rgba(13, 13, 26, 0.95);
  border-top: 1px solid #a0c0ff;
  font-family: "Courier New", monospace;
  font-size: 0.7rem; /* Slightly smaller for density */
  letter-spacing: 1px;
  color: #e0e0ff;
  z-index: 1000;
  
  /* Flexbox allows items to flow and wrap */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  box-sizing: border-box;
}

.footer-content {
  display: contents;
}

/* Ensure the EXE and REF anchors stay distinct */
.taper-footer span {
  white-space: nowrap;
}

/* Specific alignment to mirror the Taper Project site */
.taper-footer span:nth-child(1) {
  text-align: left;
}
.taper-footer span:nth-child(2) {
  text-align: left;
}
.taper-footer span:nth-child(3) {
  text-align: center;
}
.taper-footer span:nth-child(4) {
  text-align: right;
}

.taper-footer a {
  color: #a0c0ff;
  text-decoration: none;
  border-bottom: 1px dotted #a0c0ff;
}

.taper-footer a:hover {
  background: #a0c0ff;
  color: #0d0d1a;
}

.support-links {
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .taper-footer {
    justify-content: center; /* Centers items when they stack */
    text-align: center;
    padding: 15px;
  }
  
  .taper-footer span {
    width: 100%; /* Forces items onto new lines if needed */
    margin-bottom: 5px;
  }

  .main-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    width: 92%;
    margin-bottom: 180px; 
  }

.converter-box {
    padding: 30px;
    min-height: 480px; /* Reduced floor for mobile devices */
  }

  .era-sidebar {
    width: 100%;
    flex: none;
    padding: 20px;
    box-sizing: border-box;
    text-align: left;
  }

  h1 {
    font-size: 1.6rem;
    line-height: 2.2rem;
  }

  .title-brand {
    font-size: 2.2rem;
  }

  .title-app {
    font-size: 1.2rem;
  }

  .timeline-box h3 {
    font-size: 0.9rem;
  }

  #timeline-event {
    font-size: 0.85rem;
  }
}

/* --- ACCORD NEXUS: ACCESS DENIED --- */
.denied-message {
  color: #ff3333;
  text-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
  line-height: 1.3;
  padding: 20px;
  border: 1px solid #ff3333;
  background: rgba(40, 0, 0, 0.8);
  animation: pulse-red 2s infinite;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centering for Line 2 */
}

.denied-l1 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase; /* L1 is CAP anchor */
}

.denied-l2 {
  font-size: 2.5rem; /* Largest centered element */
  font-weight: 700;
  margin: 5px 0;
}

.denied-l3 {
  font-size: 1rem;
  font-weight: 400; /* Lighter weight as requested */
  margin-top: 10px;
}

@media (max-width: 768px) {
  .denied-l2 { font-size: 1.8rem; }
  .denied-l3 { font-size: 0.9rem; }
}

#output.denied {
  border-color: #ff3333;
  box-shadow: inset 0 0 20px rgba(255, 0, 0, 0.3);
}

@keyframes pulse-red {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.converter-box {
  flex: 2;
  background: rgba(20, 20, 40, 0.9);
  padding: 40px;
  border: 1px solid #4e4e8e;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 100, 255, 0.2);

  /* SURGICAL ADDITION: Enables the 'Push' logic */
  display: flex;
  flex-direction: column;
  min-height: 550px; /* Ensures there is a 'floor' to push toward */
}

.timeline-box {
  background: rgba(40, 20, 20, 0.4);
  padding: 15px;
  border: 1px solid #8e4e4e;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 100, 100, 0.1);

  /* SURGICAL ADDITION: Pushes the box to the absolute bottom */
  margin-top: auto; 
  margin-bottom: 0;
}

.timeline-box h3 {
  margin-top: 0;
  color: #ffcccc;
  text-transform: uppercase;
  font-size: 1rem;
  border-bottom: 1px solid #8e4e4e;
  padding-bottom: 5px;
}

#timeline-event {
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #f0d0d0;
}