/*
    Shared scaffold: .stage / .sidebar / .column / .ad-rail
    Page-type blocks live in .column:
    comic   — .chrome + .page-frame
    index   — .masthead + .icon-row + .updates + .site-foot
    insider — .title-box + .article
*/

* { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
}

img {
  max-width: 100%;
  height: auto;
}

body {
    margin: 0;
    background: #000;
    color: #fff;
    font: 14px/1.40 Arial, Helvetica, sans-serif;
}

a { color: #fff; }
a:visited { color: #c0c0c0; }
a:active { color: #3fbbed; }

.datestamp {
  color: #3fbbed;
}

.stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 12px 32px;
}

.sidebar {
    width: 160px;
    flex: 0 0 160px;
    font-size: 13px;
    text-align: center;
}

.sidebar p {
    font-size: 14px;
    line-height: 1.0;
    margin: 0 0 10px;
}

.sidebar p a {
    display: inline-block;
    padding: 2px 0;
}

.column {
    width: 825px;
    flex: 0 0 825px;
    min-width: 0;
/*    outline: 1px solid red; */
}

.ad-rail {
    width: 160px;
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-label {
    margin: 32px 0 12px;
    padding: 6px 8px;
    border-top: 1px solid #444;
    color: #888;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Comic */
.chrome {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0px 0;
}

.chrome a {
    display: inline-block;
    text-decoration: none;
}

.page-frame {
    width: 825px;
    height: 1200px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    margin-top: 0;
    margin-bottom: 0;
}

.page-frame img {
    display: block;
    margin-top: 0;
    margin-bottom: 0;
}

/* Index */
.masthead {
    text-align: center;
}

.masthead .tagline {
    margin: 0 auto 0;
    max-width: 640px;
    
}

.icon-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    margin: 12px 0;
}

.icon-row a {
    display: block;
    width: 110px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;    
    color: #3fbbed;
}

.icon-row img {
    display: block;
    margin: 0 auto 0px;
    border: 0;
}

.updates {
    width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
/*    outline: 1px solid lime; */
}

.updates-art {
    float: right;
    margin: 0 0 12px 16px;
    border: 0;
}

.updates-links img {
    border: 0;
    vertical-align: middle;
}

.site-foot {
    text-align: center;
    margin: 24px 0 0;
}

.site-foot .fineprint {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: flex-start;
    font-size: 11px;
    color: #bbb;
    margin-top: 12px;
}

.site-foot .fineprint p {
    margin: 0;
    max-width: 260px;
}

/* Insider */
.title-box {
width: 600px;
margin: 16px auto;
text-align: center;
background-image: url(images/generic_title_bg.gif);
}

.title-box .title-top,
.title-box .title-bottom {
    line-height: 0;
    font-size: 0;
}

.title-box img {
    display: block;
}

.title-box h1 {
    display: block;
    font: italic bold 24px/1.2 Arial, Helvetica, sans-serif;
    margin: 0;
}
.article {
    width: 800px;
    margin: 24px auto 0;
}

.article h1 {
    font: italic bold 22px Arial, Helvetica, sans-serif;
    
}

.article h2 {
    font : bold 20px Arial, Helvetica, sans-serif;
}

.article h3 {
    font : italic bold 20px Arial, Helvetica, sans-serif;
}

.article h4 {
    font: italic bold 17px Arial, Helvetica, sans-serif;
    margin: 0;
}
.article h4 + p {
  margin-top: 0;
}

.article h5 {
    font : bold 15px Arial, Helvetica, sans-serif;
    margin : 0;
}
.article h5 + p {
  margin-top: 0;
}

.article h6 {
    font : italic 15px Arial, Helvetica, sans-serif;
    margin : 0;
}
.article h6 + p {
  margin-top: 0;
}

.article .question {
  margin: 1em 3em;
  color: #3fbbed;
  font-size: 14px;
}

.article .float-right {
  float: right;
  margin: 0 0 12px 16px;
}

.article a{ color: #3fbbed;  }
.article a:visited { color: #3499c2; }
.article a:hover { color: #6ad5ff; }
.article a:active {  color: #fff;
}

.article figure {
  margin: 0 0 1em;
}

.article figure > img,
.article figure > table {
  margin-bottom: 0;
}

.article figcaption,
.article .caption {
  margin: 0.15em 0 1em;
  font: 10px/1.3 Verdana, Geneva, sans-serif;
  color: #3fbbed;
  text-align: center;
}

.article .float-left {
  float: left;
  margin: 0 16px 12px 0;
}

.cast-entry {
  overflow: hidden;
  margin: 0 0 1.2em;
}
/* Ads */
.ad {
    display: flex;
    flex-direction: column;   /* text above image */    
    align-items: center;
    justify-content: flex-start;
    font-size: 13px;
    text-align: center;
}

.ad-vertical p {
    margin: 0 0 0px;
}

.ad-vertical {
    width: 160px;
    height: auto;
}

.ad-vertical img {
  display: block;
  max-width: 100%;
  height: auto;
}

.ad-horizontal {
    width: 320px;
    height: 50px;
    margin: 16px auto;
}

.mobile-ad { display: none; }

.toc {
  float: right;
  width: 11em;
  margin: 0 0 12px 16px;
  padding: 8px 10px;
  border: 1px solid #444;
  font-size: 13px;
  line-height: 1.35;
}

.toc-title {
  margin: 0 0 6px;
  font-weight: bold;
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
}

/* Insider hub (insider.html) — two-column catalog */
.catalog-intro { margin: 0 0 1em; }

.warning { color: #fce922; }

.catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
  clear: both;
}

.catalog h2 {
  font: italic bold 16px Arial, Helvetica, sans-serif;
  margin: 1.1em 0 0.4em;
}

.catalog ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog li {
  margin: 0 0 0.25em; 
  line-height: 1.1;
}

.catalog a {
  color: #3fbbed;
  font-style: italic;
  font-weight: bold;
}

.catalog .updated {
  color: #fce922;
  font-style: normal;
  font-weight: normal;
}

.catalog .status-wip { color: #ff9900; }
.catalog .status-tbd { color: #cecece; font-style: italic;}

.catalog .subhead {
  margin: 0.35em 0 0.15em 0.6em;
  font-style: italic;
  font-weight: bold;
  color: #3fbbed;
}

.catalog .nested { margin-left: 1.4em; }

.search-box { margin: 24px 0 8px; }

.article .val { color: #3fbbed; }

.ship-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px 20px;
  margin: 16px 0;
}

.ship-card h3 {
  font: italic bold 17px Arial, Helvetica, sans-serif;
  margin: 0 0 0.35em;
}

.ship-card .stats,
.ship-card .weapons {
  margin: 0 0 0.6em;
}

@media (max-width: 1200px) {
    .ad-rail { display: none; }
    .mobile-ad { display: block; }
}

@media (max-width: 1040px) {
    
    .toc {
    float: none;
    width: auto;
    margin: 0 0 16px;
    }
    
    .stage {
    flex-direction: column;
    align-items: center;
    padding: 8px;
    }

    .column {
    order: 1;
    width: auto;
    max-width: 825px;
    flex: 0 1 auto;
    }

    .sidebar {
    order: 2;
    width: auto;
    max-width: 825px;
    flex: 0 1 auto;
    margin-top: 24px;
    font-size: 15px;
    }

    .page-frame,
    .article,
    .updates,
    .title-box,
    .masthead {
    width: auto;
    max-width: 825px;
    margin-left: auto;
    margin-right: auto;
 
    }

    .page-frame {
    height: auto;
    aspect-ratio: 825 / 1200;
    }

    .page-frame img {
    max-width: 100%;
    height: auto;
    }

    .updates {
    overflow: visible;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    }

    .updates-art {
    float: none;
    display: block;
    margin: 0 auto 12px;
    max-width: 100%;
    height: auto;
    }

    img {
    max-width: 100%;
    height: auto;
    }

    .site-foot .fineprint {
        flex-wrap: wrap;
    }

    .site-foot .fineprint p {
        max-width: none;
        flex: 1 1 12em;
    }

    .column,
    .updates,
    .article,
    .title-box,
    .masthead,
    .site-foot {
        width: auto;
        max-width: 825px;
        min-width: 0;
    }

    .title-box img,
    .masthead img,
    .site-foot img,
    .updates-art {
        display: block;
        max-width: 100%;
        height: auto;
    }

    .icon-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .icon-row a {
        width: auto;
        flex: 0 1 110px;
    }

    .catalog {
        grid-template-columns: 1fr;
    }

    .ship-grid {
        grid-template-columns: 1fr;
    }
}