body {
    background: #f4f6f8;
    font-family: Arial, sans-serif;
    padding: 40px;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto; /* centers the container */
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: none;
    font-size: 15px;
}

button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #0078ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #005fcc;
}

#result {
    margin-top: 20px;
    background: #f1f1f1;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
}

/* Result card styling */
.result-card {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 6px solid #0078ff;
    font-size: 15px;
    line-height: 1.45;
    margin-top: 15px;
    white-space: normal !important;
}

/* Stronger colour-coded backgrounds */
.risk-high {
    border-left-color: #e63946;
    background: #ffe5e7;
}

.risk-medium {
    border-left-color: #ffb703;
    background: #fff4d6;
}

.risk-low {
    border-left-color: #2a9d8f;
    background: #e3f7f4;
}

/* Loading indicator */
.loading {
    padding: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    font-style: italic;
    color: #555;
}

/* Base spacing */
.result-card div {
    margin-bottom: 4px;
}

/* Remove gap under "Reasons:" */
.result-card div:nth-of-type(3) {
    margin-bottom: 0 !important;
}

/* List spacing */
.result-card ul {
    margin: 0 0 6px 20px !important;
    padding: 0;
}

.result-card ul li {
    margin: 2px 0;
}

/* Section separators */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 12px 0;
}

/* Safe rewrite box */
.rewrite-box {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-top: 4px;
    white-space: normal;
}
.top-nav {
    text-align: center;
    margin-bottom: 25px;
}

.top-nav a {
    display: inline-block;
    margin: 6px 12px;
    text-decoration: none;
    color: #0077cc;
    font-weight: 500;
}
footer {
    text-align: center;
}