/* The "If you're attacked" guide. One reading column; on wide screens the
   contents list sits in a sticky column on the left. On phones everything is
   one column and the contents list comes right after the emergency contacts. */
.guide {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "header"
        "intro"
        "contacts"
        "toc"
        "body";
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.65;
}
.guide-header { grid-area: header; }
.guide-intro { grid-area: intro; }
.guide-contacts { grid-area: contacts; }
.guide-toc { grid-area: toc; }
.guide-body { grid-area: body; }

@media (min-width: 992px) {
    .guide {
        max-width: 1040px;
        grid-template-columns: 240px minmax(0, 720px);
        grid-template-areas:
            ".   header"
            "toc intro"
            "toc contacts"
            "toc body";
        column-gap: 3rem;
    }
    .guide-toc {
        align-self: start;
        position: sticky;
        top: 1.5rem;
        margin-top: 0.3rem;
    }
}

/* Header */
.guide .eyebrow {
    margin: 0.5rem 0 0.8rem;
    color: var(--hm-accent);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}
.guide h1 {
    margin-bottom: 0.4em;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.2;
}
.guide-updated {
    color: var(--hm-muted);
    font-size: 0.9rem;
}
.guide-intro {
    font-size: 1.15rem;
}

/* Emergency contacts: the one thing to take away even without reading on. */
.guide-contacts {
    margin: 0.5rem 0 2rem;
    padding: 1.1rem 1.3rem 0.4rem;
    background: var(--hm-panel);
    border: 1px solid var(--hm-border);
    border-left: 4px solid var(--hm-accent);
    border-radius: 0.5rem;
}
.guide-contacts > p:first-child {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}
.guide-contacts .table {
    --bs-table-bg: transparent;
}
.guide-contacts thead {
    display: none;  /* "What / Contact" says nothing the rows don't */
}
.guide-contacts td:last-child {
    min-width: 11rem;
}
.guide-contacts tr:last-child td {
    border-bottom: 0;
}
/* On phones each contact is a label with its number under it: two columns
   would squeeze the labels to a word per line. */
@media (max-width: 575.98px) {
    .guide-contacts tr,
    .guide-contacts td {
        display: block;
    }
    .guide-contacts tr {
        padding: 0.55rem 0;
        border-bottom: 1px solid var(--hm-border);
    }
    .guide-contacts tr:last-child {
        border-bottom: 0;
    }
    .guide-contacts td {
        padding: 0 0.5rem;
        border: 0;
    }
    .guide-contacts td:first-child {
        color: var(--hm-muted);
        font-size: 0.88rem;
    }
}

/* Contents list */
.guide-toc {
    margin-bottom: 2rem;
    font-size: 0.92rem;
    line-height: 1.4;
}
.guide-toc-title {
    margin-bottom: 0.6rem;
    color: var(--hm-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}
.guide-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 2px solid var(--hm-border);
}
.guide-toc li a {
    display: block;
    margin-left: -2px;
    padding: 0.35rem 0 0.35rem 0.9rem;
    border-left: 2px solid transparent;
    color: var(--hm-ink);
    text-decoration: none;
}
.guide-toc li a:hover {
    border-left-color: var(--hm-accent);
    color: var(--hm-accent);
}

/* Article body */
.guide-body h2 {
    margin: 2.8rem 0 0.9rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--hm-border);
    font-size: 1.55rem;
    scroll-margin-top: 1rem;
}
.guide-body h2:first-child {
    margin-top: 0;
}
.guide-body p,
.guide-body ul,
.guide-body ol {
    margin-bottom: 1.1rem;
}
.guide-body li {
    margin-bottom: 0.5rem;
}
.guide-body li::marker {
    color: var(--hm-accent);
    font-weight: 700;
}
.guide strong {
    color: #fff;
}
.guide em {
    color: var(--hm-ink);
}

/* Phone numbers are tel: links; keep them readable as numbers. */
.guide a[href^="tel:"] {
    color: inherit;
    white-space: nowrap;
    text-decoration-color: var(--hm-accent);
    text-underline-offset: 0.2em;
}

/* Tables scroll sideways inside their box on narrow screens. */
.guide-table {
    overflow-x: auto;
    margin-bottom: 1.2rem;
}
.guide .table {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}
.guide .table th {
    color: var(--hm-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.guide-body .table td {
    min-width: 9rem;
}

/* Sources: long list of references, kept small. */
#sources ~ ul {
    font-size: 0.9rem;
    color: var(--hm-muted);
}

/* Closing call to action */
.guide-cta {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--hm-panel);
    border: 1px solid var(--hm-border);
    border-radius: 0.5rem;
}
.guide-cta h2 {
    margin: 0 0 0.5rem;
    padding: 0;
    border: 0;
    font-size: 1.3rem;
}
.guide-cta .btn {
    margin: 0.3rem 0.4rem 0 0;
}
