body {
    margin: 0;
    background: #efefef;
    font-family: Arial, sans-serif;
    color: #111;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

.panel {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 14px;
}

h1,
h2 {
    margin: 0 0 12px;
}

.notice {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.notice.error {
    border: 1px solid #d49292;
    background: #ffe9e9;
}

.notice.ok {
    border: 1px solid #9bc79b;
    background: #e9f8e9;
}

.grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 8px 12px;
    align-items: center;
}

.grid .full {
    grid-column: 1 / -1;
}

input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #888;
    padding: 7px;
    font-size: 16px;
    border-radius: 2px;
    background: #fff;
}

textarea.big {
    min-height: 70px;
}

textarea.notes {
    min-height: 86px;
}

.hint {
    font-size: 14px;
    color: #333;
}

.required {
    color: #b00020;
    font-weight: 700;
}

.warning-text {
    font-weight: 700;
    margin: 4px 0 8px;
}

.warn {
    color: #c73030;
    font-size: 16px;
    line-height: 1.3;
    margin-top: 8px;
}

.radio-row label,
.check-row label {
    margin-right: 12px;
}

button {
    border: 1px solid #777;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 9px 14px;
    font-size: 15px;
    cursor: pointer;
}

button.primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(110px, 1fr));
    gap: 8px;
    overflow-x: auto;
}

.category-header {
    padding: 8px;
    min-height: 62px;
    line-height: 1.08;
    font-size: 20px;
    font-weight: 500;
}

.course-list {
    padding: 6px;
    background: #fff;
}

.course-item,
.course-check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
    font-size: 20px;
}

.rank-select {
    width: 62px;
    font-size: 15px;
}

.term-options,
.past-positions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.term-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.past-positions {
    margin-bottom: 14px;
}

.past-positions-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.past-positions-row label {
    min-width: 52px;
}

.past-positions-row input {
    max-width: 90px;
}

.intro {
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }

    .course-item,
    .course-check-item {
        font-size: 18px;
    }

    .category-header {
        font-size: 24px;
    }
}

@media (max-width: 720px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .course-item,
    .course-check-item {
        font-size: 18px;
    }

    .category-header {
        font-size: 22px;
    }

    .past-positions-row {
        flex-wrap: wrap;
    }

    .past-positions-row label {
        min-width: 70px;
    }
}
