* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f0f3f5;
    font-size: 14px;
    color: #333;
}
.energieausweis-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 14px 30px;
}
.header {
    background: #2d6a2d;
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px 8px 0 0;
}
.header h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.header p {
    font-size: 11px;
    opacity: .8;
    margin: 0;
}
.live-bar {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.live-bar .val {
    font-weight: 700;
    font-size: 14px;
}
.klasse-badge {
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}
.scale-wrap {
    flex: 1;
    min-width: 180px;
}
.scale-bar {
    display: flex;
    height: 18px;
    border-radius: 3px;
    overflow: hidden;
}
.scale-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border-right: 1px solid rgba(255,255,255,.3);
}
.scale-arrow-row {
    position: relative;
    height: 14px;
    margin-top: 1px;
}
.scale-arrow {
    position: absolute;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #333;
}
.scale-nums {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #888;
    margin-top: 1px;
}
.container {
    background: white;
    border-radius: 0 0 8px 8px;
    padding: 20px;
}
.tab-bar {
    display: flex;
    background: white;
    border-bottom: 2px solid #3da81d;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.tab-btn {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #555;
    border-right: 1px solid #e8e8e8;
    transition: all .15s;
    white-space: nowrap;
}
.tab-btn.active {
    background: #3da81d;
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.section {
    background: white;
    border-radius: 8px;
    border: 1px solid #dde3e8;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.section h3 {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 600;
    margin: 0 0 4px;
}
.section .desc {
    font-size: 12.5px;
    color: #666;
    margin: 0 0 14px;
}
.form-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.form-row label.lbl {
    width: 250px;
    min-width: 250px;
    font-size: 13px;
    color: #444;
    padding-top: 7px;
    line-height: 1.3;
}
.form-row .inp {
    flex: 1;
    min-width: 0;
}
.info-icon {
    margin-left: 4px;
    color: #3da81d;
    cursor: help;
    font-size: 12px;
}
select, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    color: #333;
    outline: none;
    font-family: inherit;
}
select:focus, input:focus {
    border-color: #3da81d;
}
.unit {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    padding-top: 8px;
}
.inp-unit {
    display: flex;
    align-items: center;
    gap: 6px;
}
.inp-unit input {
    flex: 1;
}
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 6px;
}
.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
}
.alert-warning {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 12.5px;
    color: #5c4000;
}
.alert-info {
    background: #f5f9ff;
    border: 1px solid #d0e4ff;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 14px;
}
.alert-info table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.alert-info th, .alert-info td {
    padding: 3px 6px;
    text-align: left;
}
.nav-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}
.btn {
    padding: 9px 22px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s;
    font-family: inherit;
}
.btn-primary {
    background: #3da81d;
    color: white;
}
.btn-primary:hover {
    background: #2d8a15;
}
.btn-default {
    background: #e8e8e8;
    color: #333;
}
.btn-default:hover {
    background: #d5d5d5;
}
.btn-calc {
    background: #3da81d;
    color: white;
    padding: 12px 36px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(61,168,29,.3);
}
.preview-box {
    background: #f0f9f2;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 14px;
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-size: 13px;
}
.subsection-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #444;
    margin: 14px 0 10px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}
.cert {
    border-radius: 12px;
    padding: 22px;
    margin-top: 22px;
    border: 3px solid #ccc;
}
.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}
.cert-badge {
    color: white;
    border-radius: 8px;
    padding: 10px 22px;
    text-align: center;
    min-width: 80px;
}
.cert-badge .k {
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
}
.cert-badge .klbl {
    font-size: 10px;
    opacity: .9;
    margin-top: 2px;
}
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.cert-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e0e8e3;
    text-align: center;
}
.cert-card .icon {
    font-size: 20px;
}
.cert-card .val {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 4px;
}
.cert-card .lbl {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}
.cert-scale-box {
    background: white;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #e0e8e3;
    margin-bottom: 12px;
}
.year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.year-card {
    background: #f5f9f6;
    border-radius: 6px;
    padding: 10px 12px;
    text-align: center;
}
.year-card .period {
    font-size: 10px;
    color: #666;
    line-height: 1.3;
}
.year-card .val {
    font-size: 16px;
    font-weight: 700;
    color: #3da81d;
    margin-top: 4px;
}
.year-card .sub {
    font-size: 11px;
    color: #888;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.data-table td {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}
.data-table td:first-child {
    color: #666;
}
.data-table td:last-child {
    text-align: right;
    font-weight: 500;
}
.empf-box {
    background: #fffbf0;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #ffe0a0;
    margin-top: 12px;
}
.empf-box h4 {
    font-size: 13px;
    font-weight: 600;
    color: #7a5500;
    margin: 0 0 10px;
}
.empf-box ul {
    padding-left: 16px;
}
.empf-box li {
    font-size: 12.5px;
    color: #555;
    margin-bottom: 4px;
}
.hidden {
    display: none;
}
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
    .form-row label.lbl {
        width: 100%;
        min-width: unset;
        padding-top: 0;
        font-weight: 600;
    }
    .cert-grid {
        grid-template-columns: 1fr 1fr;
    }
    .year-grid {
        grid-template-columns: 1fr;
    }
    .tab-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}