/* /css/tools.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: #222;
    background: #f5f7fa;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page-header {
    background: #005385;
    color: #fff;
    padding: 2rem 0;
}

.page-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
}

.lead {
    margin: 0;
    max-width: 720px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.section {
    margin: 2rem 0;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.section h2 {
    margin-top: 0;
    font-size: 1.4rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 800px) {
    .templates-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.template-text {
    width: 100%;
    min-height: 220px;
    font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    resize: vertical;
    background: #f8fafc;
}

.btn {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    background: #005385;
    color: #fff;
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
}

.btn:hover {
    opacity: 0.9;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-row label {
    font-size: 0.9rem;
}

.form-row input,
.form-row select {
    padding: 0.4rem 0.5rem;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    width: 100%;
}

.form-actions {
    margin-top: 0.75rem;
}

.result-wrapper {
    margin-top: 1.5rem;
}

details {
    margin: 0.5rem 0;
}

details summary {
    cursor: pointer;
    font-weight: 500;
}

details p {
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

/* --- Minor readability improvements for EVL page --- */

.section p,
.section li {
    font-size: 0.95rem;
}

.section h2 {
    margin-bottom: 0.5rem;
}

.section h3 {
    margin-top: 1.2rem;
    font-size: 1.1rem;
}

.template-text {
    min-height: 180px;
}

.result-wrapper textarea#evl-result {
    min-height: 220px;
}

details {
    padding: 0.4rem 0.2rem;
}

details + details {
    border-top: 1px solid #e2e8f0;
}

details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: "▸ ";
    font-size: 0.8rem;
}

details[open] summary::before {
    content: "▾ ";
}

.hidden {
    display: none !important;
}