:root {
  --bg: #fafaf8;
  --surface: #f0eeea;
  --border: #e0dbd4;
  --accent-red: #c0301c;
  --accent-green: #1a8a4a;
  --accent-yellow: #9a7008;
  --text: #1a1714;
  --muted: #555;
  --card: #ffffff;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

header {
  margin-bottom: 56px;
}

.eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 16px;
}

h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

h1 em {
  font-style: italic;
  color: #d4a000;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 520px;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 20px;
}

.card-label {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Form elements */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 0.9rem;
  padding: 12px 14px;
  border-radius: 8px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select:focus {
  outline: none;
  border-color: var(--accent-yellow);
}

select option {
  background: var(--surface);
}

/* Steigerungsanzeige */
.scenarios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.scenario {
  border-radius: 10px;
  padding: 20px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.scenario.ndr {
  background: rgba(248, 68, 42, 0.06);
  border-color: rgba(232, 64, 42, 0.2);
}

.scenario.gewerkschaft {
  background: rgba(42, 232, 122, 0.06);
  border-color: rgba(42, 232, 122, 0.2);
}

.scenario-tag {
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.scenario.ndr .scenario-tag {
  color: var(--accent-red);
}
.scenario.gewerkschaft .scenario-tag {
  color: var(--accent-green);
}

.scenario-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.amount {
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  line-height: 1;
}

.scenario.ndr .amount {
  color: var(--text);
}
.scenario.gewerkschaft .amount {
  color: var(--accent-green);
}

.amount-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.disclaimer {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.disclaimer-link {
  color: var(--muted);
  text-decoration: none;
  font-family: "DM Mono", monospace;
}

.disclaimer-link:hover {
  color: var(--text);
}

.chart-wrapper {
  position: relative;
  height: 320px;
}

@media (max-width: 560px) {
  .chart-wrapper {
    height: 480px;
  }
}

.gew-mindest-note {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--accent-green);
  line-height: 1.5;
  border-top: 1px solid rgba(42, 232, 122, 0.2);
  padding-top: 10px;
}

/* Diff box */
.diff-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 20px;
  display: none;
}

.diff-card.visible {
  display: block;
}

.diff-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.diff-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 380px;
}

.diff-text strong {
  color: var(--text);
  font-weight: 600;
}

.diff-amount {
  text-align: right;
}

.diff-number {
  font-family: "DM Serif Display", serif;
  font-size: 2.8rem;
  color: var(--accent-yellow);
  line-height: 1;
}

.diff-number-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Timeline */
.timeline {
  display: none;
  margin-top: 0;
}

.timeline.visible {
  display: block;
}

.timeline-title {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.tl-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 0.82rem;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.tl-date {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.tl-ndr {
  color: var(--text);
}
.tl-gew {
  color: var(--accent-green);
  font-weight: 500;
}

.tl-diff {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  color: var(--accent-yellow);
  text-align: right;
}

.tl-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-style: italic;
}

.tl-header {
  display: grid;
  grid-template-columns: 110px 1fr 1fr auto;
  gap: 12px;
  padding: 0 14px;
  margin-bottom: 4px;
}

.tl-col-label {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Info box */
.info-box {
  background: rgba(245, 197, 24, 0.05);
  border: 1px solid rgba(245, 197, 24, 0.15);
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.info-box strong {
  color: var(--accent-yellow);
}

/* Divider */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.current-salary-display {
  font-family: "DM Mono", monospace;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.current-salary-display span {
  color: var(--text);
  font-size: 1rem;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .scenarios {
    grid-template-columns: 1fr;
  }
  .tl-row {
    grid-template-columns: 80px 1fr 1fr auto;
    font-size: 0.75rem;
  }
  .diff-inner {
    flex-direction: column;
  }
  .diff-amount {
    text-align: left;
  }
}
