/* Per-line page styles — loaded by templates/transit_line.html. */

.line-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.3rem 1.5rem;
    margin: 0;
}
.line-facts dt {
    color: var(--forest-green);
    font-weight: bold;
}
.line-facts dd {
    margin: 0;
    color: var(--text-body);
}

/* Body text rendered from admin-authored markdown. Inherits the
   panel background; we just tune spacing and line treatment so
   long-form reading is pleasant. */
.line-body {
    line-height: 1.55;
    font-size: 1.05rem;
}
.line-body h1,
.line-body h2,
.line-body h3 {
    color: var(--forest-green);
    margin-top: 1.4rem;
}
.line-body h1 { font-size: 1.4rem; }
.line-body h2 { font-size: 1.2rem; }
.line-body h3 { font-size: 1.05rem; }
.line-body p { margin: 0.7rem 0; }
.line-body ul,
.line-body ol { margin: 0.7rem 0 0.7rem 1.4rem; }
.line-body a {
    color: var(--forest-green);
    text-decoration: underline;
}
.line-body a:hover {
    color: var(--gold-dark);
}
.line-body blockquote {
    border-left: 3px solid var(--forest-green);
    margin: 1rem 0;
    padding: 0.3rem 0 0.3rem 1rem;
    color: var(--text-body);
    font-style: italic;
}
.line-body code {
    background: var(--cream-dark);
    color: var(--text-dark);
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
    font-family: 'VT323', monospace;
    font-size: 1rem;
}

/* Images embedded via {{ image:foo size="..." align="..." }}. The
   plugin emits a <figure> with two modifier classes — one for size,
   one for alignment. Small images float so prose wraps around them;
   medium/large/full center themselves with margins. */
.line-image {
    margin: 1rem auto;
    max-width: 100%;
}
.line-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 2px solid var(--border-outer);
}
.line-image figcaption {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #cfcfcf;
    text-align: center;
    font-style: italic;
}
.line-image--small  { width: 30%; }
.line-image--medium { width: 60%; }
.line-image--large  { width: 90%; }
.line-image--full   { width: 100%; }

.line-image--align-center { margin-left: auto; margin-right: auto; }
.line-image--align-left   { float: left;  margin-right: 1rem; }
.line-image--align-right  { float: right; margin-left: 1rem; }

/* Missing-image placeholder so a broken {{ image: }} reference is
   visible to the admin rather than silently dropped. */
.line-image--missing {
    width: 60%;
    margin: 1rem auto;
    padding: 1rem;
    border: 2px dashed var(--gold-dark);
    background: rgba(255, 215, 0, 0.12);
    text-align: center;
    color: var(--forest-green);
}
.line-image--missing code {
    color: var(--text-dark);
}

@media (max-width: 640px) {
    /* On phones, drop the floats — narrow screens don't have room
       for prose-wrap-around. Every image takes full available width. */
    .line-image--small,
    .line-image--medium,
    .line-image--large,
    .line-image--full {
        width: 100%;
        float: none;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .line-facts {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
    .line-facts dt {
        margin-top: 0.5rem;
    }
}
