.beer-calc {
  max-width: 680px;
  border: 1px solid #e4e4e4;
  border-radius: 14px;
  padding: 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #fff;
}

.beer-calc__header { margin-bottom: 10px; }
.beer-calc__title { margin: 0; font-size: 1.2rem; }
.beer-calc__subtitle { margin: 6px 0 0; color: #555; font-size: 0.95rem; line-height: 1.35; }

.beer-calc__chooser {
  margin: 12px 0 6px;
  color: #555;
  font-size: 0.95rem;
}

/* Connected segmented control */
.beer-calc__tabs {
  display: inline-flex;
  border: 1px solid #cfcfcf;
  border-radius: 12px;
  overflow: hidden;
  background: #f7f7f7;
  margin: 0 0 12px;
}

.beer-calc__tab {
  border: 0;
  background: transparent;
  color: #111;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  border-right: 1px solid #cfcfcf;
  border-radius: 0;
}

.beer-calc__tab:last-child { border-right: 0; }

.beer-calc__tab.is-active {
  background: #111;
  color: #fff;
}

.beer-calc__tab:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.beer-calc__panel { display: none; }
.beer-calc__panel.is-active { display: block; }

/* FLEX layout (no grid/fr units) */
.beer-calc__grid {
  display: flex;
  gap: 12px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

.beer-calc__label {
  flex: 1 1 260px;
  min-width: 240px;
}

.beer-calc__label span {
  display: block;
  font-size: 0.95rem;
  color: #222;
  margin-bottom: 6px;
}

.beer-calc__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  font-size: 1rem;
}

.beer-calc__btn {
  display: inline-block;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1rem;
}

.beer-calc__btn:hover { filter: brightness(1.05); }

.beer-calc__result {
  margin-top: 12px;
  font-weight: 650;
  font-size: 1.05rem;
  min-height: 1.2em;
}

.beer-calc__details {
  margin-top: 12px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.beer-calc__note {
  margin: 8px 0 0;
  color: #555;
  line-height: 1.45;
  font-size: 0.95rem;
}

.beer-calc__error {
  color: #b00020;
  font-weight: 650;
}
