.post-box {
  border: 2px solid #1C1C1C;
  border-radius: 10px;
  overflow: hidden;
  font-family: 'Orbitron', monospace;
  margin: 2rem auto;
  background-color: #f1f3e6;
  max-width: 70ch; /* wider than the default 60ch or 40em */
}

/* TITLE */
.post-title {
  background-color: #1C1C1C;
  color: #F1FAEE;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 0.6rem 1rem;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  text-align: left;
  text-transform: uppercase;
}

/* DIRECT LINK */
/* Hide anchor link by default */
.direct-link {
  opacity: 0;
  text-decoration: none;
  transition: opacity 0.2s ease-in-out;
  margin-left: 0.4ch;
  color: inherit;
}

/* Show on heading hover */
h1:hover .direct-link,
h2:hover .direct-link,
h3:hover .direct-link,
h4:hover .direct-link,
h5:hover .direct-link,
h6:hover .direct-link {
  opacity: 1;
}

.direct-link:visited {
  color: #1C1C1C;
}

/* TABLE OF CONTENTS */
.toc-floating {
  position: relative; /* or static */
  margin-left: 0;
  max-width: 100%;
  padding-left: 1rem;
  font-size: 0.9rem;
  line-height: 1;
}

.toc-heading {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.toc-list,
.toc-list ul {
  list-style: none;
  margin: 0;
  padding-left: 0.75rem;
}

.toc-item--h1 > a {
  font-weight: bold;
  margin-top: 0.5rem;
  display: block;
}

.toc-item--h2 > a {
  margin-left: 1rem;
  font-weight: normal;
  color: #555;
}

.toc-item--h3 > a {
  margin-left: 2rem;
  font-weight: lighter;
  color: #777;
}

.toc-list a {
  text-decoration: none;
  color: #1C1C1C;
}

.toc-list a:hover {
  text-decoration: underline;
  color: #e63946;
}

/* HORIZONTAL DIVIDERS */
.post-divider {
  height: 1px;
  background-color: #1C1C1C;
  margin: 0;
  padding: 0;
}

/* CONTENT BLOCKS */
.post-row {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  margin: 0;
  color: #1C1C1C;
  text-align: left;
}

code {
  font-family: monospace;
  background-color: #8e829b;
  color: #f1f3e6;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.95em;
}

/* METADATA GRID */
.post-metadata {
  display: flex;
  align-items: stretch;
  color: #1C1C1C;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  margin: 0;
  padding: 0;
  font-size: 1.0rem;
  gap: 0em;
}

.post-metadata li {
  list-style: none;
  margin: 0;
  display: flex;
  padding: 0.1rem 0.5rem;
  padding-top: 0.1rem;
  padding-right: 0.2rem;
  padding-bottom: 0.1rem;
  padding-left: 0.2rem;
  align-items: center;
  white-space: nowrap;
}

.post-metadata time {
	margin-right: 0em;
}


.meta-divider {
  background-color: #1C1C1C;
  width: 1px;
  transform: scaleX(0.5);
  transform-origin: center;
}

.post-tags {
  gap: 0rem;
}

/* IMAGE STYLING */

figure {
  margin: 1.5rem 0;
  text-align: center;
}
figcaption {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.25rem;
}
.frame {
  border: 1px solid #ddd;
  border-radius: 6px;
}
.breakout {
  max-width: 100%;
}

/* Stack Date and Tags on small screens, hide the vertical divider */
@media (max-width: 600px) {
  .post-metadata {
    display: block;                /* stop flex so items flow vertically */
  }

  .post-metadata li {
    display: block;                /* each li on its own line */
    white-space: normal;           /* allow wrapping */
    padding: 0.1rem 0.5rem;
  }

  .meta-date {
    white-space: nowrap;           /* keep date on one line */
  }

  .meta-divider {
    display: none;                 /* remove the vertical bar */
    transform: scaleX(0);
  }

  .meta-tags {
    border-top: 2px solid #000;    /* horizontal divider between lines */
    padding-top: 0.25rem;          /* tight spacing */
  }
}
