body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #ddd;
    font: 10pt "Arial";
}
* {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.page {
    width: 210mm;
    min-height: 297mm;
    padding: 10mm;
    margin: 5mm auto;
    border: 1px #D3D3D3 solid;
    border-radius: 5px;
    background: white;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);
}

@page {
    size: A4;
    margin: 0;
}

td, th {
    border: solid 1px grey;
    padding: 3px;
    line-height: 3mm;
}

td {
    font-size: 12pt;
    text-align: center;
    min-width: 5mm;
}

th {
    font-weight: normal;
    font-size: 7pt;
    text-align: left;
}

th:first-child {
    text-align: center;
}

tr.group th {
    background-color: #ddd;
    font-size: 11pt;
    font-weight: bold;
    padding: 1.5mm;
    text-align: left;
}

tr.subgroup th {
    background-color: #eee;
    font-size: 8pt;
    font-weight: bold;
    padding: 3px;
    text-align: left;
}

.big-letter {
    font-size: 13pt;
}

a[rel="modal:open"] {
    border-bottom: dotted 1px red;
    text-decoration: none;
    background-color: #ffb;
    cursor: pointer;
}

input[type=checkbox] {
    margin: 0 3.5px;
}

.updates-only {
    display: none;
}

.updates-only.subgroup {
    font-style: italic;
    margin-bottom: 1mm;
}

.toolbox-button {
    position: fixed;
    z-index: 1;
    top: 10px;
    left: 10px;
    width: 100px;
    height: 100px;
    font-size: 70px;
    border: solid 1px grey;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);
    background-color: #eff;
    text-align: center;
    cursor: pointer;
}

.print-button {
    position: fixed;
    z-index: 1;
    top: 10px;
    right: 10px;
    width: 100px;
    height: 100px;
    font-size: 70px;
    border: solid 1px grey;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);
    background-color: #eff;
    text-align: center;
    cursor: pointer;
}

.donate-button {
    position: fixed;
    z-index: 1;
    bottom: 10px;
    right: 10px;
    width: 100px;
    height: 100px;
    font-size: 70px;
    border: solid 1px grey;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);
    background-color: #eff;
    text-align: center;
    cursor: pointer;
    border-radius: 50px;
    padding-top: 3px;
}

.help-button {
    position: fixed;
    z-index: 1;
    bottom: 10px;
    left: 10px;
    width: 100px;
    height: 100px;
    font-size: 70px;
    border: solid 1px grey;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1);
    background-color: #eff;
    text-align: center;
    cursor: pointer;
    border-radius: 50px;
    padding-top: 10px;
}

tr.non-printable * {
    text-decoration: line-through;
    color: #aaa;
}

tr.non-printable > * * {
    border-bottom: none;
}

.minor {
    font-size: smaller;
    font-style: italic;
}

.banner {
    margin-top: 0;
    min-height: auto;
    padding: 10px 20px 15px 20px;
    background-color: #444;
    color: #eee;
    font-size: 100%;
}

.banner > div {
    display: flex;
    justify-content: space-between;
}

.banner-check {
    font-size: 70px;
}

.ad {
    font-size: 100%;
    line-height: normal;
    text-align: left;
    padding: 10px 10px;
    background-color: #444;
    background: linear-gradient(180deg, rgba(68,68,68,1) 0%, rgba(68,68,68,1) 20%, rgba(9,9,121,0.7) 60%, rgba(0,123,156,1) 100%);
    color: #eee;
}

.ad a {
    color: #fff;
}

.ad p {
    text-align: justify;
}

table.table-comparison th,
table.table-comparison td {
    font-size: 75%;
    text-align: left;
    line-height: normal;
}

table.table-comparison th {
    font-weight: bold;
    background-color: #eee;
    text-align: center;
}

table.table-comparison td {
    vertical-align: top;
}

table.table-comparison .table-comparison-best {
    background-color: #cfc;
}

table.table-comparison .table-comparison-good {
    background-color: #efe;
}

table.table-comparison .table-comparison-worse {
    background-color: #fed;
}

table.table-comparison .table-comparison-worst {
    background-color: #fcc;
}

@media screen {
    .page {
        max-width: 100vw;
    }

    select {
        max-width: 80vw;
    }
}

p.paperclip:before {
    content: "📎";
    font-size: 150%;
}

.check-specific {
    font-style: italic;
}

/* ---- выбор роли ---- */
#role-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.role-btn {
    flex: 1 1 180px;
    text-align: left;
    padding: 10px 12px;
    border: 2px solid #aaa;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.role-btn b {
    display: block;
    font-size: 12pt;
    margin-bottom: 3px;
}

.role-btn span {
    font-size: 9pt;
    color: #555;
}

.role-btn.active {
    border-color: #2a7;
    background: #e8fff3;
}

.print-title {
    margin: 0 0 3mm 0;
    font-size: 13pt;
}

.checklist {
    width: 100%;
}

/* колонка сложности: цветной квадратик размером с чекбокс */
td.diff-cell {
    line-height: 0;
    vertical-align: middle;
}

td.diff-head {
    font-size: 7pt;
    line-height: normal;
}

a.diff-square[rel="modal:open"] {
    display: inline-block;
    width: 13px;
    height: 13px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 2px;
    cursor: pointer;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

a.diff-square.diff-green[rel="modal:open"] {
    background-color: #3cb44b;
}

a.diff-square.diff-yellow[rel="modal:open"] {
    background-color: #f5c518;
}

a.diff-square.diff-red[rel="modal:open"] {
    background-color: #e53935;
}

tr.non-printable a.diff-square {
    opacity: 0.35;
}

.role-note {
    font-style: italic;
    color: #555;
}

@media screen and (max-width: 550px) {
    .banner-check {
        display: none;
    }
    
    .banner > div {
        justify-content: center;
    }
    
    .toolbox-button, .print-button, .donate-button, .help-button {
        width: 50px;
        height: 50px;
        font-size: 35px;
    }

    .jquery-modal.blocker {
        padding: 20px 0;
    }

    .jquery-modal.blocker .modal {
        padding: 0 10px;
    }
}

@media screen and (max-width: 431px) {
    body {
        margin: 0;
        font-size: 12pt;
    }
    
    .page {
        width: 100vw;
        height: auto;
        margin-left: 0;
        margin-right: 0;
        padding: 10px 0;
    }

    .non-printable.page {
        padding: 10px;
    }

    .modal {
        max-width: 90vw;
        font-size: 14pt;
    }
    
    .checklist tr td:last-child:not(:first-child),
    .checklist tr td:nth-last-child(2) {
        display: none;
    }
    
    td, th {
        line-height: normal;
    }
    
    td {
        font-size: 14pt;
    }

    th {
        font-size: 9pt;
    }

    tr.group th {
        font-size: 13pt;
    }

    tr.subgroup th {
        font-size: 10pt;
    }

    .big-letter {
        font-size: 15pt;
    }
}

@media print {
    html, body {
        width: 210mm;
        height: 297mm;
        background: white;
    }

    .page {
        margin: 0;
        border: initial;
        border-radius: initial;
        width: initial;
        min-height: initial;
        box-shadow: initial;
        background: initial;
        page-break-after: always;
    }

    .non-printable {
        display: none;
    }

    .checklist tr > *:nth-child(1) {
        display: none;
    }

    a[rel="modal:open"] {
        text-decoration: none;
        color: black;
        background-color: transparent;
        border-bottom: none !important;
    }

    a.diff-square[rel="modal:open"] {
        border-bottom: 1px solid rgba(0, 0, 0, 0.4) !important;
    }
}
