/* Only this guide loads this file. The marker lets the theme ship before
   the CMS conversion and makes rolling the content back independent of CSS. */
@layer utilities {
    body:has([data-dd-lettering-guide]) h1.page-title {
        padding: 15px 0 0 14px;
        color: #003399;
        font-size: 40px;
        text-transform: none;
    }

    [data-dd-lettering-guide] {
        padding: 1em 1em 2em;

        .section-content {
            margin-inline: auto;
        }

        .section-content-subcontent {
            padding-block-start: .25em;
        }

        h3 {
            position: relative;
            margin: 0;
            padding: .5em 1em;
            border-radius: 20px;
            background: #0c4c94;
            color: white;
            font-size: 20px;
            font-weight: 700;
            text-transform: none;
        }

        h3::after {
            position: absolute;
            top: -.2em;
            right: .25em;
            width: 1.5em;
            height: 1.5em;
            border-radius: 50%;
            background: var(--color-dd-red);
            color: white;
            font-size: 2em;
            line-height: 1.5;
            text-align: center;
            text-shadow: 1px 1px 1px rgb(0 0 0 / .75);
            content: '?';
        }

        .content-container {
            padding: 1em;
        }

        p {
            font-size: 16px;
            font-style: normal;
            line-height: 28px;
        }

        @media (max-width: 800px) {
            h3 {
                font-size: .9em;
            }
        }
    }

    [data-dd-lettering-chart] {
        width: calc(100% - 30px);
        margin: 0 15px 1.5rem;
        border-collapse: separate;
        border-spacing: 0;
        table-layout: fixed;
        font-size: 16px;
        line-height: 28px;

        :is(th, td) {
            height: 30px;
            border: 1px solid #0c4c94;
            padding: 0;
            padding-inline-start: 15px;
            overflow-wrap: anywhere;
            text-align: start;
            vertical-align: middle;
            font-weight: 700;
        }

        /* At 320px the old column gutters leave too little room for the word
           “Maximum”. Give the text the full measure before breaking a word. */
        @media (max-width: 359px) {
            width: 100%;
            margin-inline: 0;

            :is(th, td) {
                padding-inline-start: 4px;
            }
        }

        thead {
            background: #4f81bc;
            color: white;
        }
    }
}
