/* Geometrie-Ergänzungen für eine freie Mitte und klar getrennte Sitzpunkte. */
.parliament {
  height: clamp(230px, 30vw, 330px);
}

.seat-dot {
  z-index: 1;
  padding: 0;
  border: 1px solid rgba(33, 54, 51, .32);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .72);
}

.seat-dot:hover,
.seat-dot:focus-visible {
  z-index: 5;
}

.hemicycle-summary {
  z-index: 3;
  bottom: 7px;
  min-width: 76px;
  padding: 5px 9px 3px;
  border-radius: 18px;
  background: rgba(250, 250, 245, .94);
  pointer-events: none;
}

.hemicycle-summary b {
  line-height: .95;
}

.party-row {
  grid-template-columns: 18px minmax(0, 1fr) 92px 32px;
}

.party-color-picker {
  position: relative;
  display: block;
  width: 18px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.party-color-picker .party-color {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(33, 54, 51, .24);
  border-radius: inherit;
  background: var(--party-color);
  transition: transform .15s ease, box-shadow .15s ease;
}

.party-color-picker:hover .party-color {
  transform: scaleX(1.18);
}

.party-color-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100% !important;
  height: 100%;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  cursor: pointer;
}

.party-color-input:focus-visible + .party-color {
  box-shadow: 0 0 0 3px rgba(33, 54, 51, .2);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (max-width: 430px) {
  .party-row {
    grid-template-columns: 18px minmax(0, 1fr) 78px 32px;
  }
}

.control-grid {
  grid-template-columns: 1fr;
}

.compact-number-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.field > .input-suffix {
  display: flex;
  margin-bottom: 0;
  color: var(--ink);
}

.field > .input-suffix input {
  min-width: 0;
  border-radius: 10px 0 0 10px;
}

.field > .input-suffix b {
  min-width: 38px;
  border-radius: 0 10px 10px 0;
}

@media (max-width: 360px) {
  .compact-number-fields {
    grid-template-columns: 1fr;
  }
}

.result-method-bar {
  display: flex;
  justify-content: flex-end;
}

.parliament-head-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.parliament-card .section-head {
  flex-wrap: wrap;
}

.parliament-head-actions {
  margin-left: auto;
}

.parliament-head-actions .result-method-bar .field {
  grid-template-columns: minmax(210px, 260px);
  gap: 5px;
}

.parliament-head-actions .result-method-bar .field > span {
  margin-bottom: 0;
}

.result-method-bar .field {
  display: grid;
  grid-template-columns: auto minmax(210px, 280px);
  align-items: center;
  gap: 10px;
}

.result-method-bar .field > span {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.result-method-bar select {
  background: rgba(250, 250, 245, .78);
}

@media (max-width: 560px) {
  .result-method-bar,
  .result-method-bar .field {
    display: block;
    width: 100%;
  }

  .result-method-bar .field > span {
    margin-bottom: 7px;
  }

  .parliament-card .section-head,
  .parliament-head-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .parliament-head-actions {
    width: 100%;
  }
}

.intro-compact {
  display: block;
  padding-top: 16px;
  padding-bottom: 16px;
}

.intro-compact h2 {
  max-width: none;
}

/* UX-Feinschliff: einheitliche, ruhige Formulare und vollständige Zustände. */
.party-row input:not(.party-color-input),
.field input,
.field select,
select {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .78rem;
}

.party-row input:focus,
.field input:focus,
select:focus {
  box-shadow: none;
}

.party-row input:focus-visible,
.field input:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

#methodSelect {
  min-width: 230px;
  padding-right: 36px;
  background-color: rgba(255, 255, 255, .78);
  cursor: pointer;
}

#methodSelect:hover {
  border-color: rgba(33, 54, 51, .32);
  background-color: rgba(255, 255, 255, .94);
}

.segmented {
  padding: 3px;
  border-radius: 11px;
}

.segmented span {
  display: grid;
  min-height: 36px;
  padding: 8px 9px;
  place-items: center;
  border-radius: 8px;
  font-size: .72rem;
}

.segmented input:not(:checked) + span:hover {
  background: var(--soft);
}

.party-row {
  grid-template-columns: 28px minmax(0, 1fr) 92px 36px;
  gap: 8px;
}

.party-color-picker {
  width: 28px;
  height: 40px;
}

.party-color-picker .party-color {
  border-radius: 9px;
}

.party-color-picker:hover .party-color {
  transform: scaleX(1.08);
  box-shadow: 0 0 0 2px rgba(33, 54, 51, .1);
}

.secondary,
.delete-party {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.delete-party {
  width: 36px;
  height: 40px;
  border: 1px solid transparent;
  color: #7f4439;
}

.secondary:hover,
.delete-party:not(:disabled):hover {
  border-color: rgba(33, 54, 51, .22);
  background: rgba(33, 54, 51, .09);
}

.secondary:active,
.delete-party:not(:disabled):active {
  transform: translateY(1px);
}

.delete-party:disabled {
  cursor: not-allowed;
  opacity: .32;
}

.control-grid legend,
.field > span,
.field-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.3;
}

.party-row input {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1120px) and (min-width: 981px) {
  .parliament-head-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 4px;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .party-row {
    grid-template-columns: 26px minmax(0, 1fr) 76px 36px;
  }

  #methodSelect {
    min-width: 0;
  }
}

.parliament-card .legend {
  gap: 10px 18px;
  margin-top: clamp(18px, 2vw, 24px);
}

.parliament-card .legend span {
  gap: 7px;
  font-size: .78rem;
  line-height: 1.35;
}

.parliament-card .legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

.calculation-example {
  margin: 15px 0 17px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .5);
}

.calculation-example p {
  margin: 7px 0 0;
  color: var(--ink);
}

.equation-list {
  display: grid;
  gap: 6px;
  max-width: 360px;
  margin: 11px 0;
  padding: 0;
  list-style: none;
}

.equation-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--soft);
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}

.reality-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(250, 250, 245, .78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.reality-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 22px;
  list-style: none;
  cursor: pointer;
}

.reality-card summary::-webkit-details-marker {
  display: none;
}

.reality-card[open] summary > span:last-child {
  transform: rotate(45deg);
}

.reality-content {
  padding: 0 22px 24px;
}

.reality-lead {
  max-width: 820px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: .8rem;
  line-height: 1.6;
}

.reality-steps {
  display: grid;
  gap: 0;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.reality-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  padding: 0 0 19px;
}

.reality-steps li:not(:last-child)::before {
  position: absolute;
  top: 34px;
  bottom: 0;
  left: 16px;
  width: 1px;
  background: var(--line);
  content: "";
}

.reality-steps li > span {
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: .72rem;
  font-weight: 800;
}

.reality-steps h3,
.reality-example h3 {
  font-size: .84rem;
}

.reality-steps p,
.reality-example p,
.reality-boundary,
.reality-sources {
  margin-top: 5px;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.55;
}

.reality-steps .is-lab-step > span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.reality-steps .is-lab-step > div {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--soft);
}

.reality-example {
  padding: 17px;
  border: 1px solid rgba(198, 156, 69, .38);
  border-radius: 14px;
  background: rgba(198, 156, 69, .11);
}

.reality-example p {
  color: var(--ink);
}

.reality-boundary {
  padding: 14px 16px;
  border-left: 4px solid var(--ink);
  background: rgba(255, 255, 255, .42);
  color: var(--ink);
}

.reality-sources {
  margin-top: 16px;
  font-size: .64rem;
}

.reality-sources a {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 560px) {
  .reality-content {
    padding-right: 16px;
    padding-left: 16px;
  }
}
.soft-note {
  display: grid;
  gap: 0.25rem;
}

.share-correction {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}
