/* Daniel Dorff website - responsive layout, version 1.0
   Desktop formatting is intentionally left untouched.
   Save beside index.htm, not in the images folder. */
 
@media screen and (max-width: 1116px) {
    table[width="1100"] {
        width: 100%;
        max-width: 100%;
    }
    td, th { overflow-wrap: anywhere; }
    img { max-width: 100%; height: auto; }
    iframe, video, audio, object, embed { max-width: 100%; }
    table[width="1100"] td[width="1025"] { width: auto; }
    table[width="1100"] td[width="1025"] + td { width: 70px; }
    table[width="1100"] td[width="1025"] + td img { max-width: 90px; }
    td[width="670"], td[width="700"] { width: 63%; }
    td[width="400"] { width: 37%; }
}
 
@media screen and (max-width: 700px) {
    body { margin: 10px; line-height: 1.4; }
    table[width="1100"] { table-layout: fixed; }
    table[width="1100"] td { height: auto; }
    /* Keep the standard masthead together. */
    table[width="1100"]:first-of-type td[width="1025"] { width: auto; }
    table[width="1100"]:first-of-type td[width="1025"] + td { width: 70px; }
    table[width="1100"]:first-of-type font[size="6"],
    table[width="1100"]:first-of-type font[size="30"] { font-size: 24px; }
    /* Stack editorial text and illustrations, but not navigation tables. */
    table[width="1100"]:not(:first-of-type):has(td[width="670"], td[width="700"]) > tbody > tr > td {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        box-sizing: border-box;
    }
    table[width="1100"]:not(:first-of-type):has(td[width="670"], td[width="700"]) > tbody > tr > td[bgcolor="#004574"],
    table[width="1100"]:not(:first-of-type):has(td[width="670"], td[width="700"]) > tbody > tr > td[bgcolor="#333333"] { padding: 5px; }
    table[width="1100"]:not(:first-of-type):has(td[width="670"], td[width="700"]) td img { float: none; }
    table[width="1100"]:not(:first-of-type):has(td[width="670"], td[width="700"]) td div[align="right"] { text-align: center; }
    /* Home navigation: retain its two parallel lists and hide only the
       rowspan portrait on phones. Footer photographs remain visible. */
    table[width="1100"]:has(td[rowspan="16"]) { table-layout: auto; }
    table[width="1100"]:has(td[rowspan="16"]) td[rowspan="16"] { display: none; }
    table[width="1100"]:has(td[rowspan="16"]) td { width: auto; }
    table[width="1100"]:has(td[rowspan="16"]) font[size="5"] { font-size: 17px; }
    table[width="1100"]:has(td[rowspan="16"]) td { padding: 3px 5px 3px 0; }
}

 