*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    max-width: 1024px;
    margin: 20px auto;
    padding: 0 20px;
}

main {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    color: #111;
}

h1 {
    font-size: 2.027rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

h2 {
    font-size: 1.802rem;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 8px;
    margin-top: 40px;
}

h3 {
    font-size: 1.602rem;
    color: #0056b3;
}

h4 {
    font-size: 1.424rem;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 3px;
}

h5 {
    font-size: 1.266rem;
}

h6 {
    font-size: 1.125rem;
}

.info {
    background-color: #e7f3fe;
    border: 1px solid #b3d7ff;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.informative {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #555;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

footer p {
    text-align: center;
    max-width: none;
}

a {
    color: #004080;
    font-weight: 600;
    text-decoration: underline;
}

a:visited {
    color: #003060;
}

a:hover, a:focus {
    color: #002050;
    background-color: #e6f0fa;
    outline: 2px solid #0056b3;
    text-decoration: underline;
}

#selection-form {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #cce0ff;
}

#selection-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

#selection-form fieldset legend {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #0056b3;
}

#selection-form fieldset label {
    display: block;
    margin-bottom: 10px;
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

#generate-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    background-color: #007acc;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    margin-bottom: 10px;
}

#generate-btn:hover {
    background-color: #0056b3;
}

.secondary-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #0056b3;
    background-color: #e6f0fa;
    border: 1px solid #b3d7ff;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 10px;
    transition: background 0.2s, color 0.2s;
}

.secondary-btn:hover {
    background-color: #cce0ff;
    color: #003d66;
}

#audit-container {
    order: 2;
}

#export-options {
    order: 3;
}

.audit-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #ddd;
}

.audit-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #fff;
}

.audit-item h3 {
    margin-top: 0;
}

.test-details {
    margin-top: 10px;
}

.test-details p,
.test-details ol {
    margin: 5px 0 10px 0;
}

.test-details ol {
    padding-left: 20px;
}

.test-result-user {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.test-result-user label {
    margin-right: 15px;
    cursor: pointer;
}

.test-result-user input[type="radio"] {
    margin-right: 5px;
}

.test-notes {
    margin-top: 15px;
}

.test-notes textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.poziom {
    font-size: 0.8em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    color: white;
    display: inline-block;
    vertical-align: middle;
}

.poziom-a {
    background-color: #00538C;
}

.poziom-aa {
    background-color: #A55206;
}

/* Klasa do ukrywania elementów wizualnie, ale dostępnych dla czytników ekranu */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

p, li, label, legend {
    max-width: 65ch;
}