/* =========
   Base / Theme
   ========= */
:root{
    --brand: #0050aa;
    --brand-contrast: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e5e7eb;
    --focus: #2563eb;
    --success: #16a34a;
    --error: #dc2626;
    --radius: 10px;
    --shadow: 0 6px 18px rgba(17, 24, 39, .08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    color: var(--text);
    background: linear-gradient(180deg, var(--bg), #eef2f7);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========
   Layout
   ========= */
.container{
    max-width: 860px;
    padding: 24px;
    margin: 24px auto 48px;
}

h1{
    margin: 0 0 20px;
    font-weight: 700;
    font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
    color: var(--brand);
    letter-spacing: .2px;
}

.subtle{
    color: var(--muted);
    margin: -8px 0 20px;
}

/* Card / Form Shell */
form{
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

fieldset{
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 16px;
    margin: 0 0 16px;
}

legend{
    padding: 0 8px;
    font-weight: 600;
    color: var(--brand);
}

/* =========
   Form Grid
   ========= */
.form-grid{
    display: grid;
    gap: 14px;
}

@media (min-width: 640px){
    .form-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-row{
    display: flex;
    flex-direction: column;
}

label{
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
select{
    appearance: none;
    width: 100%;
    padding: 10px 12px;
    /*border: 1px solid var(--border);*/
    border: 1px solid #6b7280;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease;
}

select{
    background-image:
            linear-gradient(45deg, transparent 50%, var(--muted) 50%),
            linear-gradient(135deg, var(--muted) 50%, transparent 50%),
            linear-gradient(to right, #fff, #fff);
    background-position:
            calc(100% - 18px) 55%,
            calc(100% - 12px) 55%,
            100% 0;
    background-size: 6px 6px, 6px 6px, 2.5rem 100%;
    background-repeat: no-repeat;
}

/* spannt über beide Spalten im Grid – auch in Safari */
.full-span {
    grid-column: 1 / -1; /* nimmt ganze Breite */
}

/* Layout: Checkbox fix links, Text flexibel rechts */
.checkline {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;   /* bei mehrzeiligem Text oben ausrichten */
    gap: 10px;
}

/* Checkbox-Box: Safari + Windows gleich */
.checkline input[type="checkbox"] {
    margin: 2px 0 0; /* leicht nach unten schieben */
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

/* Text etwas grösser */
.checktext {
    font-size: 1rem;    /* Standard ~16px */
    font-weight: 700;
    line-height: 1.5;
}

input:focus, select:focus{
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent);
}

input::placeholder{ color: #9ca3af; }

/* Helper text / errors */
.helper{ font-size: .85rem; color: var(--muted); margin-top: 6px; }
.error{ color: var(--error); }
.success{ color: var(--success); }

/* =========
   Actions
   ========= */
.actions{
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

button,
.input-button{
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}

button[type="submit"]{
    background: var(--brand);
    color: var(--brand-contrast);
    box-shadow: 0 4px 12px rgba(0,80,170,.25);
}

button[type="submit"]:hover{
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,80,170,.28);
}

button.secondary{
    background: #eef2f7;
    color: var(--text);
}

button:disabled{
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =========
   Notices
   ========= */
.notice{
    border-radius: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    margin: 0 0 14px;
}
.notice.success{
    border-color: color-mix(in srgb, var(--success) 40%, white);
    background: color-mix(in srgb, var(--success) 8%, #f8fafc);
}
.notice.error {
    border-color: var(--error);
    background: color-mix(in srgb, var(--error) 10%, #fff);
    color: var(--error);
    font-weight: 600;
}


/* =========
   Footer / Small UI
   ========= */
.small{
    font-size: .85rem;
    color: var(--muted);
}

hr{
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

/* Accessible hide (for screen readers) */
.sr-only{
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo-symbol {
    height: 60px;   /* skaliert Löwe+Wappen */
    width: auto;
}

.logo-text {
    font-size: 42px;
    font-weight: bold;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
}

.lektion-block {
    margin-bottom: 1em;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}
.lektion-block strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.1em;
}
.angaben-block {
    margin-bottom: 1em;
    line-height: 1.6;
}
.output {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f9fafb;
    color: var(--text);
}
fieldset.lektion {
    margin-top: 12px;
}
.angaben-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.angaben-row {
    font-size: 0.95rem;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f9fafb;
}

.angaben-row span {
    font-weight: 600;
    margin-left: 4px;
}

.summary-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.summary-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-card li {
    margin: 0.4rem 0;
    font-size: 1.05rem;
}
