@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --pink:        #CF1152;
  --pink-hover:  #a80d42;
  --pink-light:  #f9e8ef;
  --pink-border: #f2bccf;
  --green:       #73B600;
  --green-bg:    #f4fad6;
  --green-border:#b3d000;
  --warn-bg:     #fffbeb;
  --warn-border: #f59e0b;
  --text:        #262E31;
  --text-muted:  #49585F;
  --border:      #CED4DA;
  --bg:          #F2F7FA;
  --white:       #FFFFFF;
  --radius:      4px;
}

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

body {
  font-family: 'Source Sans 3', 'Avenir Next LT', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

/* ── Top bar ─────────────────────────────────────────── */
.site-bar {
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-bar .logo-mark {
  width: 36px;
  height: 36px;
  background: var(--pink);
  border-radius: 50%;
  flex-shrink: 0;
}
.site-bar .site-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-bar .site-tagline {
  font-size: 0.75rem;
  color: #999;
  margin-left: auto;
  font-style: italic;
}

/* ── Page wrapper ────────────────────────────────────── */
.page-wrap {
  width: 100%;
  max-width: 620px;
  padding: 2.5rem 1rem 3rem;
}

/* ── Page title ──────────────────────────────────────── */
.page-title {
  margin-bottom: 1.75rem;
}
.page-title h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.page-title p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}
.page-title .accent-line {
  width: 48px;
  height: 3px;
  background: var(--pink);
  margin: 0.6rem 0 0;
  border-radius: 2px;
}

/* ── Card ────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--pink);
  border-radius: var(--radius);
}
.card-body { padding: 2rem; }

/* ── Section labels ──────────────────────────────────── */
.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pink);
  margin: 1.75rem 0 0.9rem;
}
.section-title:first-child { margin-top: 0; }

/* ── Fields ──────────────────────────────────────────── */
.field { margin-bottom: 1.1rem; }

label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
label .hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: #999;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .unit {
  position: absolute;
  right: 0.8rem;
  font-size: 0.85rem;
  color: #aaa;
  pointer-events: none;
}

input[type="number"] {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 2.75rem 0.6rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}
input[type="number"]:focus {
  border-color: var(--pink);
  background: var(--white);
}

/* Slider */
.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.slider-val {
  min-width: 4rem;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--pink);
}

/* ── Divider ─────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 1.5rem 0;
}

/* ── EK summary ──────────────────────────────────────── */
.ek-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fafafa;
  border: 1px solid var(--border);
  border-left: 3px solid var(--pink);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.ek-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ek-badge {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
}
.ek-hart  { background: #dbeafe; color: #1e40af; }
.ek-weich { background: #fef3c7; color: #92400e; }

/* ── Button ──────────────────────────────────────────── */
.btn {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: var(--radius);
  background: var(--pink);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--pink-hover); }

/* ── Result panel ────────────────────────────────────── */
.result {
  display: none;
  margin-top: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.result.show { display: block; }

.result-header {
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.result.ok   .result-header { background: var(--green-bg);  color: #3a6000; border-bottom: 1px solid var(--green-border); }
.result.warn .result-header { background: var(--warn-bg);   color: #7c3a00; border-bottom: 1px solid var(--warn-border); }
.result.fail .result-header { background: var(--pink-light); color: #7a0030; border-bottom: 1px solid var(--pink-border); }

.result-body { padding: 1.25rem; background: var(--white); }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
}
.result-item label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #999;
  margin-bottom: 0.15rem;
}
.result-item .val {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
}
.ek-hart-item  label { color: #1e40af; }
.ek-weich-item label { color: #92400e; }

/* Ratio bar */
.ratio-bar-wrap { margin: 1.25rem 0 0; }
.ratio-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.ratio-bar-bg {
  height: 8px;
  background: #e9ecef;
  border-radius: 99px;
  overflow: hidden;
}
.ratio-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}
.result.ok   .ratio-bar-fill { background: var(--green); }
.result.warn .ratio-bar-fill { background: #f59e0b; }
.result.fail .ratio-bar-fill { background: var(--pink); }

/* Fehler-Liste */
.fehler-liste {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.6;
}
.fehler-liste li::before { content: '→ '; font-weight: 700; }

/* ── Footnote ────────────────────────────────────────── */
.footnote {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  line-height: 1.5;
}
