.bnb {
  --bnb-radius: 20px;
  display: block;
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px var(--gutter) 0;
  color: var(--ink);
}

.bnb-intro {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.bnb-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  margin-bottom: 16px;
}

.bnb-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 auto 14px;
  max-width: 640px;
}

.bnb-byline {
  font-size: 14px;
  color: var(--muted);
}

.bnb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.bnb-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.bnb-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--bnb-radius);
  padding: 28px;
}

.bnb-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.bnb-card-titles {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.bnb-step {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral-tint);
  color: var(--coral-text);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bnb .bnb-card-title {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin: 3px 0 2px;
}

.bnb-card-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.bnb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bnb-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.bnb-input-wrap {
  position: relative;
  display: block;
}

.bnb-input {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
  appearance: none;
}

select.bnb-input {
  padding-right: 38px;
  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 1.5l5 5 5-5' fill='none' stroke='%23111827' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.bnb-input-wrap .bnb-input {
  padding-right: 44px;
}

.bnb-input::-webkit-outer-spin-button,
.bnb-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bnb-input:hover {
  border-color: #d1d5db;
}

.bnb-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 118, 117, 0.22);
}

.bnb-input[aria-invalid="true"] {
  border-color: #dc2626;
}

.bnb-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

.bnb-hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.bnb-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.bnb-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.bnb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bnb-chip {
  min-height: 42px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.bnb-chip:hover {
  border-color: var(--coral);
}

.bnb-chip[aria-checked="true"] {
  background: var(--coral-text);
  border-color: var(--coral-text);
  color: var(--white);
}

.bnb-switch {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
}

.bnb-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.bnb-switch-ui {
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  margin-top: 2px;
  transition: background 0.2s ease;
}

.bnb-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2);
  transition: transform 0.2s ease;
}

.bnb-switch input:checked + .bnb-switch-ui {
  background: var(--coral-text);
}

.bnb-switch input:checked + .bnb-switch-ui::after {
  transform: translateX(18px);
}

.bnb-switch input:focus-visible + .bnb-switch-ui {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.bnb-switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}

.bnb-switch-text span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.bnb-summary {
  position: sticky;
  top: 96px;
}

.bnb-summary-inner {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--bnb-radius);
  padding: 28px 24px 22px;
}

.bnb .bnb-summary-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}

.bnb-empty p {
  color: var(--footer-text);
  font-size: 15px;
  line-height: 1.55;
  padding: 18px 0 24px;
}

.bnb-hero {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.bnb-hero-num {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  color: var(--white);
}

.bnb-hero-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--footer-text);
}

.bnb-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 16px;
}

.bnb-stats div {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.bnb-stats dt {
  font-size: 12px;
  color: var(--footer-text);
}

.bnb-stats dd {
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
  margin: 2px 0 0;
}

.bnb-small {
  font-size: 12px;
  line-height: 1.5;
  color: #9ca3af;
  margin-top: 14px;
}

.bnb-article {
  max-width: 820px;
  margin: 56px auto 0;
}

.bnb-article h2:first-child {
  margin-top: 0;
}

.bnb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .bnb-layout {
    grid-template-columns: 1fr;
  }
  .bnb-summary {
    position: static;
  }
}

@media (max-width: 720px) {
  .bnb {
    padding-top: 32px;
  }
  .bnb-card {
    padding: 20px 16px;
  }
  .bnb-grid-2 {
    grid-template-columns: 1fr;
  }
  .bnb-hero-num {
    font-size: 52px;
  }
}

@media print {
  body {
    background: #fff;
  }
  .bnb-layout {
    display: block;
  }
  .bnb-summary {
    position: static;
  }
  .bnb-summary-inner {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
  }
  .bnb-stats div {
    background: #f9fafb;
  }
}

.bnb-segment {
  display: inline-flex;
  background: var(--placeholder);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}

.bnb-segment-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  min-height: 36px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.bnb-segment-btn[aria-checked="true"] {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
}

.bnb-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bnb-grid-2.bnb-gap-top {
  margin-top: 18px;
}

.bnb-span-2 {
  grid-column: span 2;
}

.bnb-hint-gap {
  display: block;
  margin-top: 10px;
}

.bnb-chip small {
  font-weight: 500;
  color: inherit;
  opacity: 0.75;
  margin-left: 4px;
}

.bnb-switch + .bnb-switch {
  margin-top: 10px;
}

.bnb-diagram-card {
  margin-top: 28px;
}

.bnb-diagram {
  margin: 0;
  border-radius: 16px;
  background: #fbf7f4;
  border: 1px solid var(--border);
  overflow: hidden;
}

.bnb-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .bnb-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bnb-span-2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 400px) {
  .bnb-grid-3,
  .bnb-grid-4 {
    grid-template-columns: 1fr;
  }
}

.bnb-mode {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.bnb-walls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bnb-wall {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px 16px;
  background: var(--soft);
}

.bnb-wall-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 28px;
}

.bnb-wall-name {
  font-weight: 700;
  font-size: 15px;
}

.bnb-wall-auto {
  font-size: 13px;
  color: var(--muted);
}

.bnb-remove {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--coral-text);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 4px;
  min-height: 32px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bnb-remove:hover {
  color: var(--ink);
}

.bnb-wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bnb-add {
  margin-top: 12px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px dashed #d1d5db;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.bnb-add:hover {
  border-color: var(--coral);
  color: var(--coral-text);
}

.bnb-chip[aria-pressed="true"] {
  background: var(--coral-text);
  border-color: var(--coral-text);
  color: var(--white);
}

.bnb-chips-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
}

.bnb-sub-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.bnb-hero {
  margin-top: 4px;
}

.bnb-exact {
  font-size: 13.5px;
  color: var(--footer-text);
  margin-top: 8px;
  line-height: 1.5;
}

.bnb-stats dd {
  font-variant-numeric: tabular-nums;
}

.bnb-stat-sub {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
  line-height: 1.4;
}

.bnb-check {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--footer-text);
  border-top: 1px solid var(--footer-border);
  padding-top: 14px;
}

.bnb-check strong {
  color: var(--white);
}

.bnb-alts-wrap {
  margin-top: 14px;
}

.bnb-alts-label {
  font-size: 12.5px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.bnb-alts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bnb-alt {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--footer-border);
  background: transparent;
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bnb-alt:hover {
  border-color: var(--coral);
  background: rgba(255, 118, 117, 0.12);
}

.bnb-alt:focus-visible,
.bnb-chip:focus-visible,
.bnb-segment-btn:focus-visible,
.bnb-add:focus-visible,
.bnb-remove:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.bnb-summary .bnb-alt:focus-visible {
  outline-color: var(--coral);
}

.bnb-notes {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bnb-notes li {
  font-size: 13px;
  line-height: 1.5;
  color: #fde68a;
  background: rgba(253, 230, 138, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
}

.bnb-empty-text {
  color: var(--footer-text);
  font-size: 15px;
  line-height: 1.55;
  padding: 18px 0 24px;
}

.bnb-out-card {
  margin-top: 28px;
}

.bnb-out-card[hidden] {
  display: none;
}

.bnb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  max-height: 480px;
  overflow-y: auto;
}

.bnb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.bnb-table th,
.bnb-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.bnb-table thead th {
  position: sticky;
  top: 0;
  background: var(--coral-tint);
  font-size: 13px;
  font-weight: 700;
}

.bnb-table tbody tr:last-child th,
.bnb-table tbody tr:last-child td {
  border-bottom: 0;
}

.bnb-table td:nth-child(3) {
  font-weight: 700;
  color: var(--coral-text);
}

.bnb-article .bnb-article-table {
  overflow-x: auto;
  margin: 20px 0;
}

.bnb-article .bnb-article-table table {
  margin: 0;
  min-width: 520px;
}

@media (max-width: 720px) {
  .bnb-wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bnb-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 359px) {
  .bnb-stats {
    grid-template-columns: 1fr;
  }
}

.bnb [hidden] {
  display: none !important;
}

.bnb-grid-2.bnb-no-top {
  margin-top: 0;
}

.bnb-grid-3 + .bnb-chips-label {
  margin-top: 18px;
}

.bnb-article > p:first-child {
  margin-top: 0;
}

.bnb-mode .bnb-segment-btn {
  flex: 1 1 auto;
}

@media (max-width: 560px) {
  .bnb-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 14px;
  }
  .bnb-mode .bnb-segment-btn {
    border-radius: 10px;
    line-height: 1.25;
    padding: 8px 10px;
  }
  .bnb-table th,
  .bnb-table td {
    padding: 9px 10px;
  }
  .bnb-wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bnb-chip[aria-pressed="true"] small {
  opacity: 1;
}

.bnb-article p,
.bnb-article li,
.bnb-card-sub,
.bnb-hint {
  text-wrap: pretty;
}

.bnb-article h2,
.bnb-article h3,
.bnb-title {
  text-wrap: balance;
}

.bnb ::selection {
  background: var(--coral-tint-2);
  color: var(--ink);
}

.bnb-summary ::selection {
  background: var(--coral-text);
  color: var(--white);
}

.bnb-input {
  caret-color: var(--coral-text);
}

.bnb-remove {
  min-height: 40px;
}
