.bf-heading {
  margin: 0 0 20px;
  padding: clamp(18px, 2.3vw, 30px);
  background: linear-gradient(105deg, #f5c044, #ffe69a 64%, #fff4cb);
  border: 1px solid #e5bc54;
  border-radius: 16px;
}
.bf-heading h1 { margin: 0 0 8px; color: #402d10; }
.bf-heading p { color: #5f4921; }
.bf-shell {
  --bf-ink: #493a21;
  --bf-muted: #705f45;
  --bf-line: #e6d8b9;
  --bf-tint: #fff7e4;
  display: grid;
  gap: 18px;
  color: var(--bf-ink);
}
.bf-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.bf-pane, .bf-method { padding: clamp(16px,1.8vw,26px); border-color: var(--bf-line); background: white; }
.bf-pane h2 { font-size: 20px; margin: 0 0 16px; color: var(--bf-ink); }
.bf-switch { display: inline-flex; padding: 3px; gap: 3px; margin-bottom: 18px; border: 1px solid var(--bf-line); border-radius: 9px; background: #fff8e8; }
.bf-switch button { border-radius: 6px; color: var(--bf-muted); padding: 7px 18px; font-weight: 600; font-size: 14px; }
.bf-switch button[aria-pressed=true] { color: #402b03; background: #f2c34f; }
.bf-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 16px; }
.bf-field { display: grid; gap: 7px; font-size: 14px; font-weight: 550; color: var(--bf-ink); }
.bf-control { display: flex; align-items: center; gap: 6px; padding: 0 9px 0 11px; min-height: 41px; background: white; border: 1px solid #cdbc96; border-radius: 8px; }
.bf-control:focus-within { border-color: #9c690f; box-shadow: 0 0 0 2px #d6941f28; }
.bf-control input { width: 100%; min-width: 0; padding: 8px 0; margin: 0; font-size: 16px; font-weight: 550; color: var(--bf-ink); background: transparent; border: none; outline: none; }
.bf-control input::placeholder { color: #80755e; font-size: 14px; font-weight: 400; }
.bf-control > span { color: var(--bf-muted); font-size: 13px; font-weight: 400; white-space: nowrap; }
.bf-field select { min-width: 0; width: 100%; height: 41px; border: 1px solid #cdbc96; border-radius: 8px; padding: 0 8px; background: white; color: var(--bf-ink); }
.bf-note, .bf-warning { font-size: 14px; line-height: 1.65; margin: 12px 0 0; }
.bf-note { color: var(--bf-muted); }
.bf-warning { color: #765014; background: #fff2cf; border-radius: 7px; padding: 8px 11px; }
.bf-result { border-top: 4px solid #dfa728; }
.bf-result table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bf-result table th, .bf-result table td { padding: 9px 7px; border-bottom: 1px solid #eee6d5; text-align: right; font-variant-numeric: tabular-nums; white-space: normal; }
.bf-result table th:first-child { text-align: left; width: 44%; }
.bf-result thead th { background: #fbeabe; color: #62460f; font-size: 14px; font-weight: 650; }
.bf-result tbody th { font-size: 14px; font-weight: 450; color: var(--bf-ink); background: transparent; }
.bf-result tbody th small { display: block; color: var(--bf-muted); font-weight: 400; font-size: 12px; }
.bf-result .bf-emphasis { background: var(--bf-tint); }
.bf-result .bf-emphasis td { font-weight: 700; color: #805411; }
.bf-lookup .bf-field { max-width: 220px; }
.bf-references { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 13px; }
.bf-reference { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--bf-line); border-radius: 9px; background: var(--bf-tint); }
.bf-reference > span { font-size: 14px; color: var(--bf-ink); }
.bf-reference output { font-size: 20px; font-weight: 700; color: #78510e; font-variant-numeric: tabular-nums; }
.bf-reference small { font-size: 13px; color: var(--bf-muted); }
.bf-method { padding: 15px 20px; }
.bf-method summary { font-weight: 600; cursor: pointer; }
.bf-method div { font-size: 14px; color: var(--bf-muted); line-height: 1.75; }
.bf-method div p { margin: 8px 0 0; }
@media(max-width:1140px) { .bf-columns { grid-template-columns: 1fr; } }
@media(max-width:700px) {
  .bf-references { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bf-pane { padding: 15px; }
  .bf-columns, .bf-shell, .bf-fields { gap: 12px; }
  .bf-result table td { font-size: 14px; }
}
@media(max-width:370px) { .bf-fields { grid-template-columns: 1fr; } }
