/* The runway modal.
 *
 * Class names are runway-modal.js's and are not touched here — this file only
 * decides how the dialog looks, and the copy inside it is the JS's business.
 *
 * It follows .gantt-overlay / .gantt-editor in index.html rather than inventing
 * a second dialog: same scrim, same navy card, same 10px radius, same shadow,
 * same muted #9fb4c6 for secondary text. There are two dialogs on this page and
 * they must not read as coming from two different sites.
 *
 * Colours come through the site's own custom properties with a literal
 * fallback, so the file still renders correctly if it is ever loaded on a page
 * that does not declare them.
 *
 * The trigger link is styled in index.html beside the rest of the body copy —
 * a.runway-link used to be declared in both places, which is one definition too
 * many for a rule about how a link in a paragraph looks.
 */

.rw-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(8, 28, 48, 0.72);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
    overflow: auto;
}
.rw-overlay[hidden] {
    display: none;
}

/* A reading width, not the editor's 1100px: this dialog is prose, and the
   grid that needed twelve months to fit is next door. */
.rw-strip {
    position: relative;
    width: min(760px, 100%);
    margin: auto;
    max-height: 100%;
    overflow: auto;
    background: var(--navy, #0c2d4a);
    color: #e8eef4;
    border: 1px solid #2a4d6c;
    border-radius: 10px;
    padding: 26px 28px 30px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.rw-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2a4d6c;
    border-radius: 6px;
    background: transparent;
    color: #9fb4c6;
    font: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}
.rw-close:hover {
    background: #10395c;
    border-color: #3c6a92;
    color: #fff;
}

/* Clears the close button, which the eyebrow and the heading both run towards. */
.rw-eyebrow,
.rw-strip h2 {
    padding-right: 44px;
}

.rw-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #9fb4c6;
    margin: 0 0 6px;
}

.rw-strip h2 {
    color: var(--gold, #e8a317);
    font-size: clamp(28px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.2px;
    margin: 0 0 12px;
}

.rw-lede {
    max-width: 46em;
    font-size: 17px;
    line-height: 1.55;
    color: #d5e0ea;
    margin: 0 0 22px;
}

.rw-formula {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    background: var(--navy-deep, #081c30);
    border: 1px solid #2a4d6c;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 22px;
    font-size: 17px;
    color: #e8eef4;
}
.rw-formula b {
    color: var(--gold, #e8a317);
    font-weight: 700;
}

.rw-signs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 0 0 22px;
}
/* Alive and dead used to be solid green and red panels. On a navy card that is
   the loudest thing on the page and belongs to no other section of the site;
   the distinction lives in the left edge and the heading instead, which is the
   same move .rw-tower makes for the statute. */
.rw-sign {
    background: var(--navy-deep, #081c30);
    border: 1px solid #2a4d6c;
    border-left: 4px solid #2a4d6c;
    border-radius: 8px;
    padding: 14px 16px;
}
.rw-sign strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.rw-sign p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #d5e0ea;
}
.rw-alive {
    border-left-color: var(--green, #1f8a4c);
}
.rw-alive strong {
    color: #57c281;
}
.rw-dead {
    border-left-color: #c23b22;
}
.rw-dead strong {
    color: #e8806a;
}

.rw-marks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0 0 22px;
}
.rw-marks div {
    background: var(--navy-deep, #081c30);
    border: 1px solid #2a4d6c;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
}
.rw-marks b {
    display: block;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.05;
    color: var(--gold, #e8a317);
}
.rw-marks span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #9fb4c6;
}

.rw-burn {
    max-width: 46em;
    font-size: 16px;
    line-height: 1.55;
    color: #d5e0ea;
    margin: 0 0 26px;
}
.rw-burn strong {
    color: #fff;
}

.rw-tower {
    background: var(--navy-deep, #081c30);
    border: 1px solid #2a4d6c;
    border-left: 4px solid var(--gold, #e8a317);
    border-radius: 8px;
    padding: 16px 18px;
    max-width: 46em;
}
.rw-tower h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--gold, #e8a317);
    margin: 0 0 6px;
}
.rw-tower p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: #d5e0ea;
}
.rw-tower strong {
    color: #fff;
}

@media (max-width: 640px) {
    .rw-overlay {
        padding: 12px;
    }
    .rw-strip {
        padding: 22px 18px 24px;
        border-radius: 8px;
    }
    .rw-signs,
    .rw-marks {
        grid-template-columns: 1fr;
    }
}
