/* Base layout */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f5f7;
    color: #252a31;
    font: 16px/1.6 Arial, Helvetica, sans-serif;
}

a {
    color: #245b91;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.header {
    background: #202833;
    color: #fff;
}

.site-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 22px;
}

.site-logo {
    display: inline-block;
    margin-bottom: 12px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.main-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.main-navigation a {
    color: #e8edf2;
}

.content {
    max-width: 1180px;
    min-height: 65vh;
    margin: 28px auto;
    padding: 28px;
    background: #fff;
    border: 1px solid #e0e4e8;
}

h1,
h2,
h3 {
    line-height: 1.25;
}

h1 {
    margin-top: 0;
}

.meta,
.muted {
    color: #68717c;
    font-size: 14px;
}

.site-footer {
    padding: 20px;
    color: #68717c;
    text-align: center;
}

/* News and content entries */
.news-entry {
    margin-bottom: 34px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e3e6e9;
}

.rich-content img {
    max-width: 100%;
    height: auto;
}

.latest-updates,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.latest-updates a,
.tag-list a,
.tag-list span {
    padding: 3px 9px;
    background: #edf1f5;
    border-radius: 3px;
}

.content-list,
.tutorial-list,
.team-list {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.content-item {
    display: flex;
    gap: 20px;
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid #e3e6e9;
}

.content-preview {
    width: 180px;
    max-width: 35%;
    height: auto;
    object-fit: contain;
    align-self: flex-start;
}

.content-item-details {
    min-width: 0;
    flex: 1;
}

.tutorial-card {
    width: 260px;
    max-width: 100%;
}

.tutorial-card img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.tutorial-hero {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.team-member {
    display: flex;
    gap: 18px;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid #e3e6e9;
}

.team-avatar,
.profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 0;
    list-style: none;
}

/* Forms and administration */
.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 760px;
    margin: 18px 0 32px;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: bold;
}

input,
textarea,
select,
button {
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd2d9;
    border-radius: 3px;
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    background: #fff;
}

button {
    width: fit-content;
    border-color: #245b91;
    background: #245b91;
    color: #fff;
    cursor: pointer;
}

button:hover {
    background: #19466f;
}

.secondary-button {
    background: #68717c;
    border-color: #68717c;
}

.message {
    padding: 10px 14px;
    border-radius: 3px;
}

.message.error {
    background: #fce8e8;
    color: #8a2020;
}

.message.success {
    background: #e7f5eb;
    color: #205c32;
}

.admin-dashboard,
.section-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 28px;
}

.admin-dashboard a,
.section-links a {
    padding: 9px 12px;
    background: #edf1f5;
    border-radius: 3px;
}

.admin-list {
    padding-left: 20px;
}

.admin-list li {
    margin: 10px 0;
}

.inline-form {
    display: inline;
}

.inline-form button,
.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #a12d2d;
    text-decoration: underline;
}

.repeat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}

.repeat-row input {
    flex: 1 1 220px;
}

.admin-preview {
    max-width: 220px;
    height: auto;
}

.nabi-editor {
    border: 1px solid #cbd2d9;
    border-radius: 3px;
}

.nabi-toolbar {
    min-height: 42px;
    padding: 6px;
    border-bottom: 1px solid #cbd2d9;
}

.nabi-content {
    min-height: 220px;
    padding: 12px;
}

.nabi-content:focus {
    outline: 2px solid #8bb8e0;
}

@media (max-width: 700px) {
    .page-content {
        margin: 12px;
        padding: 18px;
    }

    .content-item,
    .team-member {
        flex-direction: column;
    }

    .content-preview {
        width: 100%;
        max-width: 100%;
        max-height: 260px;
    }

    .main-navigation {
        flex-direction: column;
    }
}
