.bac-shell {
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  margin: 24px auto 60px;
  padding: 0;
  color: #101828;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.bac-shell .calc-page-head {
  margin-bottom: 20px;
}

.bac-shell .calc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #667085;
  font-size: 12px;
}

.bac-shell .calc-breadcrumbs a {
  color: #667085;
  text-decoration: none;
}

.bac-shell .calc-breadcrumbs a:hover,
.bac-shell .calc-breadcrumbs a:focus-visible {
  color: #2364d2;
  text-decoration: underline;
}

.bac-shell .calc-card {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(20, 24, 30, 0.08);
  border-radius: 12px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.7);
}

.bac-hero {
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #f4fbf7 100%);
}

.bac-kicker {
  margin: 0 0 8px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bac-hero h1 {
  margin: 0 0 12px;
  color: #101828;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.bac-shell .calc-page-intro {
  margin: 0;
  max-width: 760px;
  color: #475467;
  font-size: 15px;
  line-height: 1.6;
}

.bac-safety-note {
  display: grid;
  gap: 8px;
  align-content: center;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  padding: 16px;
  color: #7c2d12;
  margin-top: 16px;
}

.bac-safety-note strong {
  font-size: 18px;
  line-height: 1.25;
}

.bac-safety-note span {
  color: #9a3412;
  font-size: 14px;
  line-height: 1.55;
}

.bac-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.bac-panel {
  display: grid;
  gap: 16px;
}

.bac-panel-head {
  display: grid;
  gap: 4px;
}

.bac-panel-head-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.bac-panel h2,
.bac-result-card h2,
.bac-reference h2 {
  margin: 0;
  color: #101828;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.bac-panel-head p,
.bac-result-card p,
.bac-reference p {
  margin: 0;
}

.bac-panel-head p {
  color: #667085;
  font-size: 14px;
  line-height: 1.55;
}

.bac-field-grid {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(260px, 430px);
  gap: 14px;
  align-items: end;
}

.bac-field {
  max-width: 430px;
}

.bac-field:first-child {
  max-width: 520px;
}

.bac-field,
.bac-drink-row label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.bac-field input,
.bac-field select,
.bac-drink-row input,
.bac-drink-row select {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #ffffff;
  color: #101828;
  font: inherit;
  font-size: 15px;
  padding: 0 12px;
}

.bac-field input:focus,
.bac-field select:focus,
.bac-drink-row input:focus,
.bac-drink-row select:focus {
  border-color: #0f766e;
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.bac-inline-control {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.bac-inline-control span {
  color: #475467;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.bac-time-control {
  grid-template-columns: 110px auto 110px auto;
}

.bac-custom-factor[hidden] {
  display: none;
}

.bac-validation {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.bac-drink-list {
  display: grid;
  gap: 10px;
}

.bac-drink-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(100px, 0.7fr) 40px;
  gap: 10px;
  align-items: end;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #f9fafb;
  padding: 12px;
}

.bac-remove-drink {
  width: 36px;
  height: 44px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #ffffff;
  color: #667085;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.bac-remove-drink:hover,
.bac-remove-drink:focus-visible {
  border-color: #b42318;
  color: #b42318;
}

.bac-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bac-action-section {
  display: block;
}

.bac-btn {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 16px;
  background: #ffffff;
  color: #101828;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.bac-btn-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.bac-btn-secondary:hover,
.bac-btn-secondary:focus-visible {
  border-color: #0f766e;
}

.bac-result-card {
  display: grid;
  gap: 14px;
}

.bac-result-label {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bac-result-value {
  color: #101828;
  font-size: clamp(56px, 8vw, 88px);
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: 0;
}

.bac-result-card p {
  color: #475467;
  font-size: 15px;
  line-height: 1.6;
}

.bac-meter {
  height: 14px;
  overflow: hidden;
  border: 1px solid #dbe5f4;
  border-radius: 999px;
  background: #eef2f6;
}

.bac-meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #22c55e;
  transition: width 0.24s ease;
}

.bac-meter-fill[data-level="zero"],
.bac-meter-fill[data-level="low"] {
  background: #22c55e;
}

.bac-meter-fill[data-level="moderate"] {
  background: #eab308;
}

.bac-meter-fill[data-level="elevated"] {
  background: #f97316;
}

.bac-meter-fill[data-level="high"],
.bac-meter-fill[data-level="severe"] {
  background: #dc2626;
}

.bac-result-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bac-result-stats article {
  display: grid;
  gap: 4px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #f9fafb;
  padding: 12px;
}

.bac-result-stats span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.bac-result-stats strong {
  color: #101828;
  font-size: 16px;
  line-height: 1.25;
}

.bac-reference {
  margin-top: 16px;
}

.bac-reference h2 {
  margin-bottom: 8px;
}

.bac-reference p {
  color: #344054;
  font-size: 15px;
  line-height: 1.65;
}

.bac-reference p + p {
  margin-top: 12px;
}

.bac-reference ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #344054;
}

.bac-reference li {
  margin: 2px 0;
  color: #344054;
  font-size: 15px;
  line-height: 1.65;
  padding-bottom: 4px;
}

.bac-reference a {
  color: #101828;
  font-weight: 600;
  text-decoration: none;
}

.bac-reference a:hover,
.bac-reference a:focus-visible {
  color: #2364d2;
  text-decoration: none;
}

.bac-reference .calc-faq {
  display: grid;
  gap: 10px;
}

.bac-reference .calc-faq-item {
  overflow: hidden;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #ffffff;
}

.bac-reference .calc-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  color: #101828;
  font-size: 17px;
  font-weight: 700;
}

.bac-reference .calc-faq-item summary::-webkit-details-marker {
  display: none;
}

.bac-reference .calc-faq-item > p {
  margin: 0;
  padding: 0 14px 14px;
}

@media (max-width: 760px) {
  .bac-field-grid {
    grid-template-columns: 1fr;
  }

  .bac-drink-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 36px;
  }

  .bac-drink-row label:first-child {
    grid-column: 1 / -1;
  }

  .bac-remove-drink {
    grid-column: 3;
    grid-row: 2 / span 2;
    height: 100%;
    min-height: 44px;
  }
}

@media (max-width: 620px) {
  .bac-shell {
    width: calc(100% - 20px);
    margin-top: 20px;
    margin-bottom: 42px;
  }

  .bac-shell .calc-card {
    padding: 16px;
  }

  .bac-field-grid,
  .bac-result-stats,
  .bac-panel-head-row {
    grid-template-columns: 1fr;
  }

  .bac-drink-row {
    grid-template-columns: 1fr;
  }

  .bac-drink-row label:first-child,
  .bac-remove-drink {
    grid-column: auto;
    grid-row: auto;
  }

  .bac-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
