:root {
  --bf-bg: #8fa5b2;
  --bf-bg-soft: #b2c2cc;
  --bf-surface: #8fa5b2;
  --bf-surface-muted: #b2c2cc;
  --bf-ink: #1f2a32;
  --bf-muted: #5f6d75;
  --bf-line: #244f78;
  --bf-primary: #244f78;
  --bf-primary-dark: #172d42;
  --bf-accent: #9a6a2d;
  --bf-accent-soft: #b2c2cc;
  --bf-gold: #9a6a2d;
  --bf-shadow: 0 14px 32px rgba(23, 45, 66, .10);
  --bf-radius: 8px;
  --bf-max: 1000px;
  --bf-gutter: 28px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  width: 100%;
}

body {
  margin: 0 !important;
  min-width: 0;
  width: 100%;
  min-height: 100vh;
  color: var(--bf-ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background:
    linear-gradient(180deg, var(--bf-bg-soft) 0%, var(--bf-bg) 56%, #7f98a7 100%);
}

a {
  color: var(--bf-primary);
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

a:hover,
a:focus {
  color: var(--bf-accent);
  text-decoration: none;
}

.container,
#container,
.mainmswarea {
  width: min(var(--bf-max), calc(100vw - var(--bf-gutter))) !important;
  max-width: var(--bf-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.navbar,
body > .navbar,
body > .navbar-inner,
.bf-hero,
.bf-carousel,
#carousel,
.py-5.bg-dark,
footer.bg-dark,
.bg-dark .m-0.text-center.text-white,
.bf-nav-bar,
.bf-nav-inner,
nav.bf-nav-bar,
header .bf-nav-bar,
.bf-site-header nav,
.bf-brand,
.bf-header-inner,
.bf-brand-mark,
.bf-brand-text {
  display: none !important;
}

.bf-site-header {
  margin: 0 !important;
  padding: 10px 0 0 !important;
  background: transparent !important;
  border-bottom: 0;
  box-shadow: none;
}

.bf-logo-strip {
  width: min(var(--bf-max), calc(100vw - var(--bf-gutter)));
  max-width: var(--bf-max);
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  line-height: 0;
  background: transparent;
  margin-left: auto !important;
  margin-right: auto !important;
}

.bf-logo-strip a {
  display: block;
  max-width: var(--bf-max) !important;
  margin: 0 auto;
  border: 1px solid rgba(208, 162, 92, .56);
  box-shadow: 0 14px 30px rgba(23, 45, 66, .10);
}

.bf-original-logo {
  display: block;
  width: 100%;
  max-width: var(--bf-max) !important;
  height: auto;
  margin: 0 auto;
  border: 0;
}

.mainmswarea {
  margin-top: 10px;
  padding: 16px 20px 28px;
  background: rgba(255, 253, 248, .58);
  border-left: 1px solid rgba(216, 204, 186, .78);
  border-right: 1px solid rgba(216, 204, 186, .78);
  box-shadow: 0 18px 38px rgba(23, 45, 66, .07);
}

.bf-page {
  transform: none !important;
  zoom: 1 !important;
}

.bf-page > .row {
  margin-left: 0;
  margin-right: 0;
}

.bf-page > .row > [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

h1,
h2,
.bf-page h1,
.bf-page h2 {
  margin: 0 0 14px;
  padding: 0;
  color: var(--bf-primary-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.12;
  border: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 880px;
  font-size: 38px;
}

h2 {
  font-size: 25px;
}

.bf-kicker {
  margin: 0 0 5px;
  color: var(--bf-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.panel,
.bf-card,
.bf-welcome-card {
  overflow: hidden;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--bf-line) !important;
  border-radius: var(--bf-radius) !important;
  box-shadow: 0 12px 30px rgba(31, 42, 46, .07) !important;
}

.panel-body {
  padding: 16px;
}

.panel-heading {
  color: var(--bf-primary-dark) !important;
  background: var(--bf-surface-muted) !important;
  border-bottom: 1px solid var(--bf-line) !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.highlight,
.table th {
  color: var(--bf-primary);
}

.bf-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
}

.bf-category-grid::before {
  content: "Family Recipe Index";
  display: block;
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--bf-primary-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.12;
}

.bf-category-grid > [class*="col-"] {
  float: none;
  width: auto;
  padding: 0;
}

.bf-category-grid .bf-card {
  height: 100%;
  box-shadow: 0 10px 28px rgba(23, 45, 66, .08) !important;
}

.bf-category-grid .panel-body {
  padding: 12px;
}

.bf-category-item {
  margin: 0;
  padding: 0;
}

.bf-category-link,
.parent a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 16px;
  align-items: center;
  column-gap: 12px;
  min-height: 48px;
  padding: 11px 14px;
  color: var(--bf-ink);
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--bf-radius);
  background: transparent;
}

.bf-category-link::after,
.parent a::after {
  content: "\f054";
  grid-column: 3;
  justify-self: end;
  color: var(--bf-primary);
  font-family: "Font Awesome 5 Free";
  font-size: 12px;
  font-weight: 900;
}

.bf-category-link:hover,
.parent a:hover {
  color: var(--bf-primary-dark);
  background: var(--bf-surface-muted);
  border-color: var(--bf-line);
}

.bf-category-count {
  grid-column: 2;
  justify-self: end;
  color: var(--bf-muted);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.children {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 3px 0 12px;
  padding: 0 14px;
  color: transparent;
}

.children a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--bf-primary);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(36, 79, 120, .20);
  border-radius: 999px;
  background: #b2c2cc;
}

.children a:hover {
  color: #8fa5b2;
  background: var(--bf-primary);
  border-color: var(--bf-primary);
}

.bf-category-grid hr,
.parent + hr {
  display: none;
}

.bf-page > .row > .col-lg-12 > h1 {
  position: relative;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.bf-page > .row > .col-lg-12 > h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bf-primary), var(--bf-accent), var(--bf-gold));
}

.recipearea,
.bf-recipe-card {
  position: relative;
  margin-bottom: 10px;
}

.bf-page {
  counter-reset: recipe-card;
}

.bf-recipe-card {
  box-shadow: 0 10px 26px rgba(31, 42, 46, .065) !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.bf-recipe-card:hover {
  border-color: rgba(36, 79, 120, .34) !important;
  box-shadow: 0 16px 36px rgba(23, 45, 66, .12) !important;
  transform: translateY(-2px);
}

.bf-recipe-card .panel-body {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.bf-recipe-card .panel-body::before {
  counter-increment: recipe-card;
  content: counter(recipe-card, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--bf-primary-dark);
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  background: var(--bf-bg-soft);
  border: 1px solid var(--bf-line);
}

.bf-recipe-card .panel-body::after {
  content: "\f061";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--bf-surface);
  font-family: "Font Awesome 5 Free";
  font-size: 13px;
  font-weight: 900;
  border-radius: 50%;
  background: var(--bf-primary);
}

.bf-recipe-card .row,
.bf-recipe-card [class*="col-"] {
  float: none;
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
}

.bf-recipe-card h2 {
  margin: 0 0 6px;
  padding: 0;
  color: var(--bf-ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  border: 0;
}

.bf-recipe-card h2 a {
  color: inherit;
}

.bf-recipe-card h2 a:hover {
  color: var(--bf-primary);
}

.bf-recipe-card .author,
.bf-recipe-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--bf-muted);
  font-size: 14px;
  font-style: normal;
}

.bf-recipe-card-meta i,
.bf-date i {
  color: var(--bf-gold);
}

.author a:empty,
.chef:empty,
.cheflink a:empty,
.bf-submitted-by a:empty {
  display: none;
}

.bf-submitted-by:has(a:empty),
.bf-meta-pill:has(.chef:empty),
.cheflink:has(a:empty) {
  display: none;
}

.recipearea .image,
.bf-recipe-card .image,
.recipearea img,
.bf-recipe-card img {
  display: none !important;
}

.recipearea .data,
.bf-recipe-card .data {
  float: none !important;
  width: 100% !important;
  min-width: 0;
}

.mmpages {
  margin-top: 24px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pagination > li {
  display: inline-flex;
}

.pagination > li > a,
.pagination > li > span {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bf-primary);
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-radius) !important;
  background: var(--bf-surface);
}

.pagination > .active > a,
.pagination > .active > span {
  color: #fff;
  background: var(--bf-primary);
  border-color: var(--bf-primary);
}

.pagination > li > a:hover {
  color: #fff;
  background: var(--bf-accent);
  border-color: var(--bf-accent);
}

.bf-recipe-shell {
  max-width: 1000px;
  margin: 0 auto;
}

.bf-recipe-title {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 20px 24px;
  color: #fff;
  border-radius: var(--bf-radius);
  background:
    linear-gradient(135deg, rgba(23, 45, 66, .98), rgba(36, 79, 120, .96) 62%, rgba(94, 86, 74, .92));
  box-shadow: var(--bf-shadow);
}

.bf-recipe-title::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .10;
  background-image:
    linear-gradient(45deg, transparent 46%, rgba(255, 255, 255, .65) 47%, rgba(255, 255, 255, .65) 53%, transparent 54%);
  background-size: 22px 22px;
}

.bf-recipe-title > * {
  position: relative;
}

.bf-print-icon {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  border: 1px solid rgba(208, 162, 92, .70);
  border-radius: 50%;
  background: rgba(7, 29, 49, .34);
}

.bf-print-icon:hover,
.bf-print-icon:focus {
  color: #071d31;
  background: #d0a25c;
  border-color: #d0a25c;
}

.bf-recipe-title .bf-kicker {
  color: #ead8bb;
}

.bf-recipe-title h1 {
  max-width: 820px;
  margin: 0;
  padding: 0 46px 0 0;
  color: #fff;
  font-size: 40px;
  border: 0;
}

.bf-recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.bf-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 10px;
  color: #f8fffb;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
}

.bf-meta-pill a {
  color: inherit;
}

.bf-recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.bf-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--bf-primary-dark);
  font-weight: 500;
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-radius);
  background: var(--bf-surface);
  box-shadow: 0 8px 20px rgba(31, 42, 46, .055);
}

.bf-button:hover,
.bf-button:focus {
  color: #fff;
  border-color: var(--bf-primary);
  background: var(--bf-primary);
}

.bf-recipe-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
}

.bf-recipe-section {
  margin: 0;
}

.bf-recipe-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--bf-primary-dark);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
}

.bf-recipe-section h2 i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border-radius: 50%;
  background: var(--bf-primary);
}

.bf-recipe-section .bf-card {
  min-height: 100%;
}

.ingredients,
.bf-instructions {
  color: #2d383a;
  font-size: 17px;
  line-height: 1.6;
}

.ingredients {
  background:
    linear-gradient(90deg, rgba(36, 79, 120, .10) 0, rgba(36, 79, 120, .10) 4px, transparent 4px);
}

.bf-instructions {
  background:
    linear-gradient(90deg, rgba(154, 106, 45, .12) 0, rgba(154, 106, 45, .12) 4px, transparent 4px);
}

.ingredients br,
.bf-instructions br {
  display: block;
  content: "";
  margin: 4px 0;
}

.hitcount {
  margin-top: 10px;
  color: var(--bf-muted);
  font-size: 14px;
  font-style: normal;
  text-align: right;
}

.form-control {
  height: auto;
  padding: 11px 12px;
  color: var(--bf-ink);
  border: 1px solid var(--bf-line);
  border-radius: var(--bf-radius);
  box-shadow: none;
}

.form-control:focus {
  border-color: rgba(36, 79, 120, .55);
  box-shadow: 0 0 0 3px rgba(36, 79, 120, .12);
}

.input-group-addon {
  color: var(--bf-primary-dark);
  border-color: var(--bf-line);
  background: var(--bf-surface-muted);
}

.btn-primary,
.bf-search button {
  color: #fff;
  font-weight: 500;
  border: 0;
  border-radius: var(--bf-radius);
  background: var(--bf-primary);
}

.btn-primary:hover,
.bf-search button:hover {
  color: #fff;
  background: var(--bf-accent);
}

.alert-danger {
  color: #822727;
  background: var(--bf-accent-soft);
  border-color: #f0c4bc;
}

.reciperow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin: 0 0 12px;
}

.reciperow > [class*="col-"] {
  width: auto;
  padding: 0;
}

.reciperow img,
.reciperow .text-center {
  display: none;
}

.reciperow .recipe {
  font-size: 14px;
  line-height: 1.45;
}

.reciperow .recipe > a {
  font-weight: 500;
}

.cheflink {
  color: var(--bf-muted);
}

.bf-footer {
  margin-top: 10px;
  padding: 0 14px 20px;
  color: #f4fbf7;
  background: transparent;
  border-top: 0;
}

.bf-footer-inner {
  width: min(var(--bf-max), 100%) !important;
  max-width: var(--bf-max) !important;
  margin: 0 auto !important;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  background:
    linear-gradient(135deg, #071d31 0%, #0f3f68 58%, #061727 100%);
  border: 1px solid rgba(208, 162, 92, .78);
  box-shadow: 0 12px 26px rgba(23, 45, 66, .10);
}

.bf-footer strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.bf-footer span,
.bf-footer p {
  display: block;
  margin: 0;
  color: #d9e6df;
}

.bf-footer a {
  color: #ffd7a8;
}

.bf-footer a:hover {
  color: #fff;
}

.bf-footer-private {
  text-align: right;
}

.bf-footer-private .bf-footer-admin {
  margin-top: 6px;
}

.bf-footer-private .bf-footer-admin a {
  display: inline-block;
  font-weight: 500;
}

/* Slight readability weight bump, without increasing size or going bold. */
body,
button,
input,
select,
textarea,
.form-control,
.bf-page,
.bf-category-link,
.parent a,
.bf-recipe-card,
.bf-recipe-card h2,
.bf-recipe-card-meta,
.bf-recipe-section,
.ingredients,
.bf-instructions,
.bf-button,
.bf-footer {
  font-weight: 500;
}

h1,
h2,
.bf-page h1,
.bf-page h2,
.bf-category-grid::before,
.panel-heading,
.bf-recipe-title h1,
.bf-recipe-section h2 {
  font-weight: 600;
}

@media (max-width: 991px) {
  .bf-category-grid,
  .bf-recipe-layout {
    grid-template-columns: 1fr;
  }

  .bf-recipe-title h1 {
    font-size: 38px;
  }

  .bf-footer-private {
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --bf-gutter: 24px;
  }

  .container,
  #container,
  .mainmswarea {
    width: calc(100vw - 24px) !important;
  }

  .bf-site-header {
    padding-top: 8px !important;
  }

  .mainmswarea {
    margin-top: 8px;
    padding: 14px 12px 24px;
  }

  .bf-category-grid::before,
  h1 {
    font-size: 29px;
  }

  .bf-recipe-title {
    padding: 18px 16px;
  }

  .bf-print-icon {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .bf-recipe-title h1 {
    font-size: 32px;
    padding-right: 38px;
  }

  .bf-recipe-card .panel-body {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }

  .bf-recipe-card .panel-body::before {
    width: 38px;
    height: 38px;
  }

  .bf-recipe-card .panel-body::after {
    display: none;
  }

  .panel-body {
    padding: 14px;
  }

  .bf-recipe-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 12px;
  }

  .bf-button {
    justify-content: center;
    width: 100%;
  }

  .bf-footer-inner {
    display: block;
    padding: 14px 14px;
  }

  .bf-footer-private {
    margin-top: 10px;
  }
}

/* Keep public recipe detail pages light even when an old/dark cached rule wins. */
.bf-recipe-page.mainmswarea,
.bf-recipe-page .bf-recipe-shell,
.bf-recipe-page .bf-recipe-layout,
.bf-recipe-page .bf-recipe-section {
  color: var(--bf-ink) !important;
  background: transparent !important;
}

.bf-recipe-page.mainmswarea {
  background: rgba(255, 253, 248, .58) !important;
}

.bf-recipe-page .bf-card,
.bf-recipe-page .panel {
  color: var(--bf-ink) !important;
  background: rgba(255, 255, 255, .96) !important;
  border-color: var(--bf-line) !important;
}

.bf-recipe-page .ingredients {
  color: #2d383a !important;
  background:
    linear-gradient(90deg, rgba(36, 79, 120, .10) 0, rgba(36, 79, 120, .10) 4px, transparent 4px),
    rgba(255, 255, 255, .96) !important;
}

.bf-recipe-page .bf-instructions {
  color: #2d383a !important;
  background:
    linear-gradient(90deg, rgba(154, 106, 45, .12) 0, rgba(154, 106, 45, .12) 4px, transparent 4px),
    rgba(255, 255, 255, .96) !important;
}

@media print {
  body {
    color: #111;
    background: #fff;
  }

  body::before,
  .bf-site-header,
  .bf-footer,
  .bf-recipe-actions,
  .hitcount {
    display: none !important;
  }

  .container,
  #container,
  .mainmswarea {
    width: 100% !important;
    max-width: none !important;
  }

  .panel,
  .bf-card,
  .bf-recipe-title {
    color: #111;
    background: #fff !important;
    box-shadow: none !important;
    border-color: #bbb !important;
  }
}
