body {
    font-family: Arial, sans-serif;
    background: white;
    margin: 0;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    background: white;
    border-bottom: 1px solid #ddd;
}

.header-inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: left;
    padding: 15px;
}

.nav a {
    margin-right: 10px;
}

a {
    color: lightskyblue;
    text-decoration: underline;
}

/* Cards */
.recipes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recipe-card {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.recipe-card img {
    max-width: 100%;
}

/* Tags */
.tag {
    background: lightgray;
    padding: 3px 8px;
    margin-right: 5px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Recipe layout */
.recipe-columns {
    display: flex;
    gap: 20px;
}

.recipe-columns div {
    flex: 1;
}

/* Comments feature layout and states */
.comments-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 14px;
}

.comment-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 110px;
    padding: 10px;
    font: inherit;
    border: 1px solid #bbb;
    border-radius: 8px;
    box-sizing: border-box;
}

.comment-form button,
.comment-delete-button {
    /* Shared button treatment keeps comment actions visually consistent. */
    width: fit-content;
    border: 1px solid #999;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 8px 12px;
    font: inherit;
    cursor: pointer;
}

.comment-delete-button {
    background: #fff5f5;
}

.comment-feedback,
.signin-prompt {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
}

.comment-feedback {
    background: #f3f4f6;
}

.comment-feedback.success {
    /* Green feedback signals a completed action such as posting or deleting. */
    background: #ecfdf3;
    color: #166534;
}

.comment-feedback.error {
    /* Red feedback signals validation or request failures. */
    background: #fef2f2;
    color: #991b1b;
}

.signin-prompt {
    background: #fff7ed;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.comment-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 2px solid #cfcfcf;
    border-radius: 10px;
    padding: 14px 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.95rem;
}

.comment-body {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #f7f7f7;
}

@media (max-width: 700px) {
    /* Collapse side-by-side layouts on smaller screens. */
    .recipe-columns {
        flex-direction: column;
    }

    .header-inner {
        flex-direction: column;
        gap: 10px;
    }

    .comments-header,
    .comment-meta {
        flex-direction: column;
    }
}
