/* Lauer.io – gemeinsame Gestaltung der persönlichen Rechner
   (Wohin gehen meine Steuern, Rentenrechner, KI-Jobcheck).
   Baut auf /styles.css auf und nutzt dessen Tokens. Zone 2 nach DESIGN.md. */

.rx-hero {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  background: var(--blue-050);
}

.rx-hero h1 {
  max-width: 48rem;
  margin: 0.6rem 0 1rem;
  color: var(--ink);
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.07;
  letter-spacing: -0.02em;
}

.rx-hero__lead {
  max-width: 44rem;
  margin: 0;
  font-size: 1.15rem;
}

.rx-privacy {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  max-width: 44rem;
  margin: 1.2rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid #b9e3da;
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: #0d5f55;
  font-size: 0.92rem;
}

.rx-privacy strong { color: #0a4d45; }

.rx-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.rx-card {
  min-width: 0;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(0, 61, 102, 0.08);
}

.rx-card > h2 {
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.rx-card h3 {
  margin: 1.4rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rx-hint {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rx-sticky {
  position: sticky;
  top: 6rem;
}

/* Eingaben */
.rx-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.8rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line-soft);
}

.rx-field:last-child { border-bottom: 0; }

.rx-field > label,
.rx-field > .rx-label {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.rx-field output,
.rx-field .rx-value {
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.rx-field .rx-sub {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.rx-field input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 1.9rem;
  margin: 0;
  accent-color: var(--blue-800);
  cursor: pointer;
  touch-action: pan-y;
}

.rx-field input[type="text"],
.rx-field input[type="number"],
.rx-field select {
  min-width: 0;
  width: 9.5rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rx-field select { text-align: left; width: 17rem; max-width: 100%; }

.rx-field input:hover,
.rx-field select:hover { border-color: var(--blue-700); }

.rx-field input[aria-invalid="true"] {
  border-color: var(--danger, #a33a22);
  background: #fbe9ea;
}

.rx-error {
  grid-column: 1 / -1;
  color: var(--danger, #a33a22);
  font-size: 0.85rem;
}

.rx-error:empty { display: none; }

.rx-seg {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.rx-seg button {
  min-height: 2.5rem;
  padding: 0.35rem 0.9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue-800);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rx-seg button[aria-pressed="true"] {
  background: var(--blue-800);
  color: #fff;
}

.rx-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.45rem 0;
  font-size: 0.95rem;
  cursor: pointer;
}

.rx-check input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.2rem;
  accent-color: var(--blue-800);
}

/* Ergebnis */
.rx-result {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--blue-900);
  color: #fff;
}

.rx-result__kicker {
  margin: 0;
  color: #bfe3ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rx-result__big {
  margin: 0.2rem 0 0.3rem;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.rx-result__text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.rx-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rx-share button {
  min-height: 2.6rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rx-share button.rx-primary {
  border-color: #fff;
  background: #fff;
  color: var(--blue-900);
}

.rx-share button:hover { border-color: #fff; }

.rx-msg {
  margin: 0.7rem 0 0;
  color: #d9f4ef;
  font-size: 0.9rem;
  min-height: 1.3em;
}

.rx-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.rx-kpi {
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-muted);
}

.rx-kpi__t {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rx-kpi__v {
  margin-top: 0.1rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.rx-kpi__s {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Balken */
.rx-bars {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.rx-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.8rem;
  font-size: 0.92rem;
}

.rx-bar__label { min-width: 0; overflow-wrap: anywhere; }

.rx-bar__value {
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rx-bar__track {
  grid-column: 1 / -1;
  height: 0.55rem;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line-soft);
}

.rx-bar__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--blue-800);
  transform-origin: left center;
}

.rx-bar--teal .rx-bar__fill { background: var(--teal); }
.rx-bar--orange .rx-bar__fill { background: var(--orange); }
.rx-bar--muted .rx-bar__fill { background: #9aa9b6; }

.rx-note {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--blue-050);
  color: var(--blue-900);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rx-note--warn {
  border-color: #f3d3a6;
  background: #fdf3e4;
  color: #6b4000;
}

.rx-note:empty { display: none; }

.rx-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.rx-table th,
.rx-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
}

.rx-table th:first-child,
.rx-table td:first-child { text-align: left; }

.rx-table th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rx-method ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.6;
}

.rx-method li + li { margin-top: 0.35rem; }

.rx-sources {
  margin: 0.4rem 0 0;
  padding-left: 1.3rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.rx-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.rx-related a {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 100ms ease-out;
}

.rx-related a:hover { border-color: var(--blue-700); }
.rx-related a:active { transform: scale(0.99); }

.rx-related strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
}

.rx-seg button:active,
.rx-share button:active { transform: scale(0.98); }

.rx-seg button,
.rx-share button { transition: transform 100ms ease-out; }

@media (max-width: 1020px) {
  .rx-layout { grid-template-columns: 1fr; }
  .rx-sticky { position: static; }
}

@media (max-width: 520px) {
  .rx-card { padding: 1.1rem 1rem; }
  .rx-kpis { grid-template-columns: 1fr; }
  .rx-field input[type="text"],
  .rx-field input[type="number"] { width: 7.5rem; }
  .rx-field select { width: 100%; grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .rx-seg button,
  .rx-share button,
  .rx-related a { transition: none; }
  .rx-seg button:active,
  .rx-share button:active,
  .rx-related a:active { transform: none; }
}

@media (prefers-contrast: more) {
  .rx-card,
  .rx-kpi { border-color: var(--ink); }
}

@media print {
  .rx-share,
  .rx-privacy,
  .site-header,
  .notice-bar { display: none !important; }
  .rx-card { box-shadow: none; break-inside: avoid; }
  .rx-layout { grid-template-columns: 1fr; }
  .rx-sticky { position: static; }
  .rx-result { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
}
