
:root {
    --background: #f4f5f7;
    --surface: #ffffff;
    --text: #20252b;
    --muted: #737b85;
    --border: #dfe3e8;
    --positive: #29864f;
    --negative: #c74444;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Arial, sans-serif;
}

.header {
    background: var(--surface);
    padding: 20px 5%;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 3px;
}

.header p {
    color: var(--muted);
}

main {
    max-width: 1500px;
    margin: auto;
    padding: 30px;
}

.intro {
    margin-bottom: 30px;
}

h1 {
    font-size: 34px;
    margin-bottom: 10px;
}

h2 {
    font-size: 21px;
    margin-top: 0;
}

.intro p,
.hint {
    color: var(--muted);
    line-height: 1.6;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.project-settings {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 14px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: white;
    color: var(--text);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 2fr)
        minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

#radar {
    width: 100%;
    display: block;
    touch-action: none;
    user-select: none;
}

#triangle {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
}

.positive {
    color: var(--positive);
}

.negative {
    color: var(--negative);
}

.neutral {
    color: var(--muted);
}

.assessment-panel {
    line-height: 1.6;
}

.assessment-panel label {
    display: block;
    margin-top: 15px;
}

button {
    font: inherit;
    cursor: pointer;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
}

footer {
    text-align: center;
    padding: 25px;
    color: var(--muted);
    font-size: 13px;
}

/* Automatische Speicherung */

#save-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: #29864f;
}

#save-status::before {
    content: "✓ ";
}

#save-status.save-error {
    color: #c74444;
}

#save-status.save-error::before {
    content: "! ";
}

/* Rückgängig und Wiederholen */

.diagram-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.diagram-header h2 {
    margin: 0;
}

.history-controls {
    display: flex;
    gap: 8px;
}

.history-controls button {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    transition: background 0.15s;
}

.history-controls button:hover:not(:disabled) {
    background: #eef1f5;
}

.history-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Anpassung an kleinere Bildschirme */

@media (max-width: 900px) {

    .workspace {
        grid-template-columns: 1fr;
    }

    .project-settings {
        grid-template-columns: 1fr;
    }

    main {
        padding: 15px;
    }

    .panel {
        padding: 16px;
    }

    .header {
        flex-wrap: wrap;
        gap: 5px;
    }

    #save-status {
        margin-left: 0;
        width: 100%;
    }
}
