/* ==========================================================================
   Ideavezy — theme for Favorite Recipe
   ========================================================================== */

:root {
  --bg: #FAF6EE;
  --paper: #FFFDF9;
  --band: #F3EDE1;
  --ink: #2B2A1F;
  --muted: #5F5B4B;
  --line: #E5DDCD;
  --green: #4B5E1E;
  --green-dark: #3A4916;
  --green-tint: #EEF0E2;
  --gold: #B8935A;
  --alert: #A23A2A;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(43, 42, 31, .06), 0 6px 18px -10px rgba(43, 42, 31, .22);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.hl-wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.hl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hl-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--green); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.hl-skip:focus { top: 12px; color: #fff; }
.hl-ico { flex: 0 0 auto; display: block; }

/* Buttons ---------------------------------------------------------------- */
.hl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  background: var(--green); color: #fff;
  border: 0; border-radius: var(--radius);
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.hl-btn:hover { background: var(--green-dark); color: #fff; }
.hl-btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.hl-btn--lg { min-height: 50px; padding: 0 26px; font-size: 17px; }
.hl-btn--block { width: 100%; }
.hl-btn--ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.hl-btn--ghost:hover { background: var(--green); color: #fff; }

/* Header ----------------------------------------------------------------- */
.hl-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 249, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.hl-header__bar { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.hl-logo { display: block; flex: 0 0 auto; }
.hl-logo img { display: block; height: 40px; width: auto; }
.hl-logo--sm img { height: 28px; }

.hl-nav { flex: 1 1 auto; }
.hl-nav__list { display: flex; align-items: stretch; gap: 8px; margin: 0; padding: 0 0 0 16px; list-style: none; }
.hl-nav__list > li { position: relative; display: flex; align-items: center; }
.hl-nav__link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 68px; padding: 0 14px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px;
  box-shadow: inset 0 -3px 0 transparent;
}
.hl-nav__link:hover { color: var(--green); }
.hl-nav__link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--green); }

.hl-drop .hl-nav__link { padding-right: 4px; }
.hl-drop__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 44px; margin-right: 6px; padding: 0;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.hl-drop__toggle[aria-expanded="true"] .hl-ico { transform: rotate(180deg); }
.hl-drop__panel {
  position: absolute; top: 100%; left: 50%;
  width: min(640px, 80vw); padding: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 18px 40px -18px rgba(43, 42, 31, .35);
  visibility: hidden; opacity: 0; transform: translate(-50%, -4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.hl-drop:hover .hl-drop__panel,
.hl-drop__panel.is-open { visibility: visible; opacity: 1; transform: translate(-50%, 0); transition-delay: 0s; }
.hl-drop__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px; margin: 0; padding: 0; list-style: none; }
.hl-drop__grid a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 8px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; font-size: 15px;
}
.hl-drop__grid a:hover { background: var(--green-tint); color: var(--green-dark); }
.hl-drop__grid small { color: var(--muted); font-size: 13px; }

.hl-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hl-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; border-radius: 50%; color: var(--ink); cursor: pointer;
}
.hl-iconbtn:hover { background: var(--green-tint); color: var(--green-dark); }
.hl-tools__link { padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.hl-tools__link:hover { color: var(--green); }
.hl-tools__add { margin-left: 10px; }
.hl-burger { display: none; }
.hl-burger__close, .hl-burger.is-open .hl-burger__open { display: none; }
.hl-burger.is-open .hl-burger__close { display: block; }

.hl-searchbar { border-top: 1px solid var(--line); background: var(--paper); padding: 12px 0; }
.hl-mobile { border-top: 1px solid var(--line); background: var(--paper); padding: 8px 0 20px; }
.hl-mobile__list { margin: 0 0 16px; padding: 0; list-style: none; }
.hl-mobile__list a {
  display: block; padding: 14px 4px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font: 600 20px/1.2 var(--serif);
}
.hl-mobile__list a[aria-current="page"] { color: var(--green); }

/* Search field ----------------------------------------------------------- */
.hl-search {
  display: flex; align-items: center;
  background: #fff; border: 1px solid #D9D0BE; border-radius: var(--radius);
  box-shadow: 0 2px 8px -4px rgba(43, 42, 31, .2);
  overflow: hidden;
}
.hl-search > .hl-ico { margin-left: 16px; color: var(--ink); }
.hl-search input {
  flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 14px;
  background: transparent; border: 0; font-size: 16px; color: var(--ink);
}
.hl-search input::placeholder { color: #6E6A5A; }
.hl-search input:focus { outline: none; }
.hl-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(75, 94, 30, .18); }
.hl-search .hl-btn { align-self: stretch; min-height: 0; border-radius: 0; padding: 0 20px; }
.hl-search--bar { max-width: 760px; }
.hl-search--bar input { height: 48px; }

/* Hero ------------------------------------------------------------------- */
.hl-hero { position: relative; isolation: isolate; overflow: hidden; }
.hl-hero__media { position: absolute; inset: 0; z-index: -1; }
.hl-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: block; }
.hl-hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(250, 246, 238, .97) 0%, rgba(250, 246, 238, .9) 30%, rgba(250, 246, 238, .35) 50%, rgba(250, 246, 238, 0) 62%);
}
.hl-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "copy rotd" "search rotd";
  align-content: center;
  column-gap: 32px;
  min-height: clamp(400px, 40vw, 540px);
  padding-top: 56px; padding-bottom: 56px;
}
.hl-hero__copy { grid-area: copy; max-width: 520px; }
.hl-hero h1 {
  margin: 0 0 20px;
  font: 700 clamp(44px, 5.6vw, 76px)/1.02 var(--serif);
  letter-spacing: -0.02em; color: var(--ink);
}
.hl-hero h1 em { display: block; font-style: italic; font-weight: 600; color: var(--green); }
.hl-hero__copy p { margin: 0 0 28px; max-width: 30em; font-size: 18px; line-height: 1.55; color: var(--ink); }
.hl-hero__search { grid-area: search; max-width: 480px; align-self: start; }

.hl-rotd {
  grid-area: rotd; justify-self: end; align-self: end;
  display: flex; flex-direction: column; align-items: flex-start;
  margin-bottom: -8px; text-decoration: none; color: var(--ink);
}
.hl-rotd__tag {
  position: relative; z-index: 1;
  margin-left: -12px; padding: 6px 14px;
  background: var(--green); color: #fff; border-radius: 4px;
  font: 500 14px/1.2 var(--sans);
}
.hl-rotd__name {
  display: flex; align-items: center; gap: 22px;
  margin-top: -2px; padding: 16px 22px 16px 26px;
  background: var(--paper); border-radius: var(--radius);
  box-shadow: 0 14px 30px -14px rgba(43, 42, 31, .45);
  font: 600 clamp(22px, 2.2vw, 28px)/1.15 var(--serif);
}
.hl-rotd:hover .hl-rotd__name { color: var(--green-dark); }
.hl-rotd:hover .hl-ico { transform: translateX(3px); }
.hl-rotd .hl-ico { transition: transform .15s ease; }

.hl-ads { padding-top: 28px; display: grid; gap: 12px; justify-items: center; }
.hl-ad { max-width: 100%; overflow: hidden; }

/* Section heads ---------------------------------------------------------- */
.hl-section { padding: 48px 0 8px; }
.hl-section--tight { padding: 24px 0 8px; }
.hl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.hl-head h2, .hl-pagehead h1, .hl-empty h2 { margin: 0; font: 600 clamp(26px, 3vw, 34px)/1.15 var(--serif); letter-spacing: -0.01em; }
.hl-more { display: inline-flex; align-items: center; gap: 0; font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; }
.hl-more .hl-ico { margin-left: 6px; }
.hl-more__long { margin-left: .3em; }
.hl-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.hl-head--center { justify-content: center; align-items: center; gap: 28px; margin-bottom: 28px; }
.hl-head--center::before, .hl-head--center::after { content: ""; flex: 1 1 auto; max-width: 260px; height: 1px; background: #CFC6B4; }
.hl-head--center .hl-more { display: none; }

/* Category circles (desktop) / cards (phone) ----------------------------- */
.hl-cats {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 20px 12px;
  margin: 0; padding: 0; list-style: none;
}
.hl-cat { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; text-decoration: none; color: var(--ink); }
.hl-cat__img {
  display: block; width: min(124px, 100%); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 3px var(--paper), 0 8px 18px -8px rgba(43, 42, 31, .45);
}
.hl-cat__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.hl-cat:hover .hl-cat__img img { transform: scale(1.06); }
.hl-cat__name { display: block; font-size: 16px; font-weight: 500; line-height: 1.25; }
.hl-cat__count { display: none; }
.hl-cat > .hl-ico { display: none; }
.hl-cat:hover .hl-cat__name { color: var(--green); }
.hl-browse__all { margin: 22px 0 0; text-align: center; font-size: 15px; }

/* Recipe cards ----------------------------------------------------------- */
.hl-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hl-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.hl-card__link { display: flex; flex-direction: column; flex: 1 1 auto; color: var(--ink); text-decoration: none; }
.hl-card__media { display: block; aspect-ratio: 10 / 7; overflow: hidden; background: var(--band); }
.hl-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.hl-card:hover .hl-card__media img { transform: scale(1.04); }
.hl-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 58px 16px 14px; }
.hl-card__title { font: 600 19px/1.25 var(--serif); }
.hl-card:hover .hl-card__title { color: var(--green-dark); }
.hl-card__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; }
.hl-card__fact { display: inline-flex; align-items: center; gap: 6px; }
.hl-card__fav {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--band); color: var(--ink);
}
.hl-card__fav:hover { background: var(--green); color: #fff; }

/* Compact recipe rows (category pages) */
.hl-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.hl-card--row .hl-card__link { flex-direction: row; align-items: stretch; }
.hl-card--row .hl-card__media { flex: 0 0 112px; width: 112px; aspect-ratio: auto; min-height: 96px; }
.hl-card--row .hl-card__body { justify-content: center; padding: 12px 60px 12px 16px; }
.hl-card--row .hl-card__title { font-size: 18px; }
.hl-card--row .hl-card__fav { top: 50%; bottom: auto; transform: translateY(-50%); }
@media (max-width: 760px) {
  .hl-rows { grid-template-columns: minmax(0, 1fr); }
  .hl-card--row .hl-card__media { flex-basis: 92px; width: 92px; }
}

/* Category tiles (browse page) ------------------------------------------ */
.hl-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.hl-tile {
  position: relative; display: block; aspect-ratio: 5 / 4; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
}
.hl-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.hl-tile:hover img { transform: scale(1.05); }
.hl-tile__label {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 12px; border-radius: 5px;
  background: rgba(247, 237, 218, .94);
  font: 600 20px/1.2 var(--serif); text-align: center;
}
.hl-tile__label small { font: 400 13px/1.4 var(--sans); color: var(--muted); }

/* Browse page header, sort, pager --------------------------------------- */
.hl-page { padding-top: 24px; padding-bottom: 56px; min-height: 50vh; }
.hl-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.hl-crumbs a { color: var(--muted); }
.hl-crumbs a:hover { color: var(--green); }
.hl-pagehead { padding: 16px 0 8px; }
.hl-pagehead h1 { font-size: clamp(34px, 4.6vw, 52px); }
.hl-pagehead p { margin: 8px 0 0; max-width: 60ch; color: var(--muted); font-size: 17px; }
.hl-head--tools { flex-wrap: wrap; align-items: center; }
.hl-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.hl-sort select {
  min-height: 40px; padding: 0 32px 0 12px; border: 1px solid #D9D0BE; border-radius: var(--radius);
  background: #fff 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 1l5 5 5-5' fill='none' stroke='%232B2A1F' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none; appearance: none;
}
.hl-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 32px; }
.hl-pager a, .hl-pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--radius);
  text-decoration: none; font-weight: 500;
}
.hl-pager a { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.hl-pager a:hover { border-color: var(--green); color: var(--green); }
.hl-pager [aria-current="page"] { background: var(--green); color: #fff; }
.hl-pager__gap { color: var(--muted); }
.hl-empty { margin: 32px 0; padding: 40px 24px; text-align: center; background: var(--paper); border: 1px dashed #CFC6B4; border-radius: var(--radius); }
.hl-empty p { color: var(--muted); }

/* Share band ------------------------------------------------------------- */
.hl-share { margin-top: 56px; background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hl-share__inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 36px; padding-top: 24px; padding-bottom: 24px;
}
.hl-share__art { width: 220px; height: auto; display: block; }
.hl-share__text { padding-left: 36px; border-left: 1px solid #CFC6B4; }
.hl-share__text h2 { margin: 0 0 6px; font: 600 clamp(24px, 2.8vw, 32px)/1.15 var(--serif); }
.hl-share__text p { margin: 0; max-width: 46ch; color: var(--muted); }

/* Extra admin blocks ---------------------------------------------------- */
.hl-blocks { padding: 32px 0 8px; }
.hl-blocks__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.hl-block { min-width: 0; }
.hl-block__title { margin: 0 0 8px; font: 600 18px/1.3 var(--serif); }
.hl-block__body { font-size: 15px; color: var(--muted); overflow-x: auto; }
.hl-block__body table { width: auto !important; margin: 0 !important; }
.hl-block__body ul { margin: 0; padding-left: 18px; }

/* Footer ----------------------------------------------------------------- */
.hl-footer { padding: 22px 0 28px; }
.hl-footer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.hl-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 32px; padding-left: 40px; border-left: 1px solid #CFC6B4; }
.hl-footer__nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.hl-footer__nav a:hover { color: var(--green); }
/* Feed links: one compact row on the right of the footer bar */
.hl-feeds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hl-feeds__label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.hl-feeds__label .hl-ico { color: var(--gold); }
.hl-feeds__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hl-feeds__list a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none;
}
.hl-feeds__list a:hover { border-color: var(--green); color: var(--green); }
.hl-footer__note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 16px; padding-top: 14px; background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px; font-size: 13px; color: var(--muted); }
.hl-footer__note a { color: var(--muted); }

/* ==========================================================================
   Core pages (login, register, recipe view, profile...) render old table
   markup inside .hl-legacy. These rules modernise it without touching PHP.
   ========================================================================== */
.hl-legacy { font-size: 16px; line-height: 1.6; }
.hl-legacy table { max-width: 100%; border-collapse: separate; }
.hl-legacy td { vertical-align: top; }
.hl-legacy h1 { margin: 8px 0 12px; font: 600 clamp(32px, 4.4vw, 48px)/1.1 var(--serif); letter-spacing: -0.01em; }
.hl-legacy h2 { margin: 28px 0 8px; font: 600 24px/1.25 var(--serif); }
.hl-legacy h3 { font: 600 20px/1.3 var(--serif); }
.hl-legacy .text, .hl-legacy p { font-size: 16px; }
.hl-legacy .subheader { display: inline-block; margin-top: 12px; font: 600 22px/1.25 var(--serif); }
.hl-legacy .recipe_title, .hl-legacy .catname { font: 600 19px/1.3 var(--serif); }
.hl-legacy .imageborder { border-radius: var(--radius); margin: 0 18px 12px 0; box-shadow: var(--shadow); }
.hl-legacy img[align="left"] { float: left; }
.hl-legacy .message {
  display: inline-block; padding: 8px 14px; border-radius: var(--radius);
  background: var(--green-tint); color: var(--green-dark); font-weight: 600;
}
.hl-legacy .required { color: var(--alert); }
.hl-legacy .textbox,
.hl-legacy input[type="text"], .hl-legacy input[type="password"], .hl-legacy input[type="email"],
.hl-legacy input[type="file"], .hl-legacy select, .hl-legacy textarea {
  max-width: 100%; min-height: 44px; padding: 9px 12px;
  background: #fff; border: 1px solid #D9D0BE; border-radius: var(--radius);
  font-size: 16px;
}
.hl-legacy textarea { min-height: 120px; line-height: 1.5; }
.hl-legacy input[type="checkbox"], .hl-legacy input[type="radio"] {
  width: 22px !important; height: 22px; min-height: 0; padding: 0; margin: 8px 0;
  border: 0; box-shadow: none; accent-color: var(--green); vertical-align: middle;
}
/* Old inline black borders (e.g. profile menu box) */
.hl-legacy td[style*="border"] {
  border: 1px solid var(--line) !important; border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow); padding: 12px 16px;
}
.hl-legacy .textbox:focus, .hl-legacy input:focus, .hl-legacy select:focus, .hl-legacy textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(75, 94, 30, .18);
}
.hl-legacy .button, .hl-legacy input[type="submit"], .hl-legacy input[type="button"], .hl-legacy button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; margin: 4px 0;
  background: var(--green); color: #fff; border: 0; border-radius: var(--radius);
  font-weight: 600; cursor: pointer;
}
.hl-legacy .button:hover, .hl-legacy input[type="submit"]:hover, .hl-legacy button:hover { background: var(--green-dark); }
.hl-legacy hr { border: 0; border-top: 1px solid var(--line); }

/* Star rating (view_recipe.php markup) */
.star-rating { position: relative; width: 140px; height: 28px; margin: 4px 0; padding: 0; list-style: none; overflow: hidden;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z' fill='none' stroke='%23B8935A' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x 0 0 / 28px 28px; }
.star-rating li { display: inline; }
.star-rating a, .star-rating .current-rating {
  position: absolute; top: 0; left: 0; height: 28px; overflow: hidden; text-indent: -1000em; border: 0;
}
.star-rating .current-rating { z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z' fill='%23B8935A' stroke='%23B8935A' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x 0 0 / 28px 28px; }
.star-rating a:hover, .star-rating a:focus {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z' fill='%234B5E1E' stroke='%234B5E1E' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x 0 0 / 28px 28px; }
.star-rating a.one-star { width: 20%; z-index: 6; }
.star-rating a.two-stars { width: 40%; z-index: 5; }
.star-rating a.three-stars { width: 60%; z-index: 4; }
.star-rating a.four-stars { width: 80%; z-index: 3; }
.star-rating a.five-stars { width: 100%; z-index: 2; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hl-cats { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
  .hl-cards, .hl-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hl-tools__link { display: none; }
}

@media (max-width: 960px) {
  .hl-nav, .hl-tools__add { display: none; }
  .hl-burger { display: inline-flex; }
  .hl-header__bar { min-height: 60px; }
  .hl-cards, .hl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hl-share__inner { grid-template-columns: auto minmax(0, 1fr); }
  .hl-share__inner > .hl-btn { grid-column: 2; justify-self: start; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .hl-logo img { height: 32px; }

  /* Hero: photo on top, search below it */
  .hl-hero__media { bottom: 84px; }
  .hl-hero__media img { object-position: 62% 50%; }
  .hl-hero__media::after {
    background: linear-gradient(90deg, rgba(250, 246, 238, .96) 0%, rgba(250, 246, 238, .82) 42%, rgba(250, 246, 238, .1) 70%, rgba(250, 246, 238, 0) 100%);
  }
  .hl-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "rotd" "search";
    min-height: 0; padding-top: 36px; padding-bottom: 0;
  }
  .hl-hero__copy { max-width: 62%; }
  .hl-hero h1 { font-size: clamp(36px, 10vw, 46px); margin-bottom: 14px; }
  .hl-hero__copy p { font-size: 16px; margin-bottom: 20px; }
  .hl-hero__copy { padding-bottom: 28px; }
  .hl-rotd { justify-self: start; align-self: start; margin: 0 0 32px 12px; }
  .hl-rotd__name { padding: 12px 18px; gap: 16px; font-size: 22px; }
  .hl-hero__search { max-width: none; margin-top: 28px; }
  .hl-hero__search .hl-btn { display: none; }
  .hl-hero__search input { height: 54px; }

  /* Categories become two columns of horizontal cards */
  .hl-head--center { justify-content: space-between; margin-bottom: 18px; }
  .hl-head--center::before, .hl-head--center::after { display: none; }
  .hl-head--center .hl-more { display: inline-flex; }
  .hl-more__long { display: none; }
  .hl-browse__all { display: none; }
  .hl-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hl-cats > li:nth-child(n+7) { display: none; }
  .hl-cat {
    flex-direction: row; gap: 12px; text-align: left; padding-right: 10px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow);
  }
  .hl-cat__img { width: 74px; flex: 0 0 74px; align-self: stretch; border-radius: 0; box-shadow: none; aspect-ratio: auto; min-height: 74px; }
  .hl-cat__text { flex: 1 1 auto; min-width: 0; }
  .hl-cat__name { font: 600 17px/1.2 var(--serif); }
  .hl-cat__count { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
  .hl-cat > .hl-ico { display: block; color: var(--ink); }

  /* Recipe rails scroll sideways */
  .hl-cards--rail {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .hl-cards--rail::-webkit-scrollbar { display: none; }
  .hl-cards--rail .hl-card { flex: 0 0 80%; scroll-snap-align: start; }
  .hl-tiles { gap: 12px; }
  .hl-tile__label { left: 8px; right: 8px; bottom: 8px; font-size: 16px; padding: 6px 8px; }
  .hl-section { padding-top: 40px; }

  /* Share band */
  .hl-share { margin-top: 40px; }
  .hl-share__inner { gap: 18px; padding-top: 20px; padding-bottom: 20px; }
  .hl-share__art { width: 130px; }
  .hl-share__text { padding-left: 18px; }
  .hl-share__inner > .hl-btn { margin-left: 18px; }

  .hl-footer__bar { gap: 14px; }
  .hl-footer__nav { padding-left: 0; border-left: 0; gap: 8px 22px; }
  .hl-footer__note { flex-direction: column-reverse; align-items: flex-start; }
  .hl-feeds__list a { min-height: 40px; }

  /* Old two-column table layouts stack on phones */
  .hl-legacy table, .hl-legacy tbody, .hl-legacy tr, .hl-legacy td, .hl-legacy th { display: block; width: auto !important; }
  .hl-legacy tr, .hl-legacy td, .hl-legacy th { height: auto !important; }
  .hl-legacy td { padding: 2px 0; }
  .hl-legacy tr + tr { margin-top: 6px; }
  .hl-legacy td[align="right"] { text-align: left; }
  .hl-legacy table[align] { float: none !important; margin: 0 !important; }
  .hl-legacy .textbox:not([type="checkbox"]):not([type="radio"]), .hl-legacy input[type="text"], .hl-legacy input[type="password"], .hl-legacy select, .hl-legacy textarea { width: 100% !important; }
  .hl-legacy img[align="left"], .hl-legacy .imageborder { float: none; display: block; margin: 0 0 12px; }
}

@media (max-width: 420px) {
  .hl-hero__copy { max-width: 68%; }
  .hl-cats { gap: 10px; }
  .hl-cat { gap: 10px; padding-right: 8px; min-height: 64px; }
  .hl-cat__img { width: 58px; flex-basis: 58px; align-self: stretch; aspect-ratio: auto; }
  .hl-cat__name { font-size: 15px; line-height: 1.2; }
  .hl-cat__count { white-space: nowrap; }
  .hl-cat > .hl-ico { display: none; }
  .hl-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hl-share__inner { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .hl-share__art { width: 150px; }
  .hl-share__text { padding-left: 0; border-left: 0; }
  .hl-share__inner > .hl-btn { grid-column: 1; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .hl-header, .hl-share, .hl-blocks, .hl-footer, .hl-card__fav { display: none !important; }
  body { background: #fff; }
}

/* ==========================================================================
   Recipe page (recipe.php)
   ========================================================================== */
.hl-recipe-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; align-items: start; }
.hl-recipe { min-width: 0; }
.hl-crumbs--icon { align-items: center; gap: 6px; }
.hl-crumbs--icon .hl-ico { color: var(--muted); }
.hl-crumbs--icon a:last-child { color: var(--green); }

.hl-alert {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 14px 18px;
  border-radius: 8px; background: var(--green-tint); color: var(--ink); font-size: 16px;
}
.hl-alert .hl-ico { color: var(--green); }
.hl-alert--err { background: #F7E6E1; }
.hl-alert--err .hl-ico { color: var(--alert); }
.hl-alert--info { background: #EEF0E2; border: 1px solid #DCE2C8; }
.hl-alert a { font-weight: 600; }

.hl-recipe__head { padding: 18px 0 22px; }
.hl-recipe__head h1 { margin: 0 0 10px; font: 700 clamp(34px, 4.6vw, 54px)/1.08 var(--serif); letter-spacing: -0.015em; }
.hl-recipe__by { margin: 0 0 14px; color: var(--ink); font-size: 16px; }
.hl-recipe__by a { font-weight: 500; }
.hl-stats { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 0; padding: 0; list-style: none; color: var(--ink); font-size: 15px; }
.hl-stats li { display: inline-flex; align-items: center; gap: 8px; }
.hl-recipe__lead { margin: 18px 0 0; max-width: 62ch; font-size: 18px; color: var(--muted); }

.hl-recipe__photo { margin: 0 0 20px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: var(--band); }
.hl-recipe__photo a, .hl-recipe__photo img { display: block; }
.hl-recipe__photo img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.hl-recipe__photo--none { background: #FBF7F0; border: 1px solid var(--line); box-shadow: none; }
.hl-recipe__photo--none img { aspect-ratio: 16 / 6; object-fit: contain; }

.hl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hl-btn--outline { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px #A8B48A; }
.hl-btn--outline:hover { background: var(--green-tint); color: var(--green-dark); }
.hl-actions .hl-btn { min-height: 46px; }

.hl-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-bottom: 28px; }
.hl-rating h2 { margin: 0; font: 600 24px/1.2 var(--serif); }
.hl-rating__note { color: var(--muted); font-size: 14px; }
.hl-stars {
  position: relative; display: inline-flex; width: 160px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='30' viewBox='0 0 25.6 24'%3E%3Cpath d='M12.8 2.5l2.8 5.8 6.3.9-4.6 4.5 1.1 6.3-5.6-3-5.6 3 1.1-6.3-4.6-4.5 6.3-.9z' fill='none' stroke='%23B8935A' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x 0 0 / 32px 30px;
}
.hl-stars > span {
  position: absolute; inset: 0 auto 0 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='30' viewBox='0 0 25.6 24'%3E%3Cpath d='M12.8 2.5l2.8 5.8 6.3.9-4.6 4.5 1.1 6.3-5.6-3-5.6 3 1.1-6.3-4.6-4.5 6.3-.9z' fill='%23E0A93B' stroke='%23C8902A' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x 0 0 / 32px 30px;
}
.hl-stars--rate { flex-direction: row-reverse; }
.hl-stars--rate a { position: relative; z-index: 1; width: 32px; height: 30px; border-radius: 4px; }
.hl-stars--rate:hover > span, .hl-stars--rate:focus-within > span { opacity: 0; }
.hl-stars--rate a:hover, .hl-stars--rate a:hover ~ a,
.hl-stars--rate a:focus-visible, .hl-stars--rate a:focus-visible ~ a {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='30' viewBox='0 0 25.6 24'%3E%3Cpath d='M12.8 2.5l2.8 5.8 6.3.9-4.6 4.5 1.1 6.3-5.6-3-5.6 3 1.1-6.3-4.6-4.5 6.3-.9z' fill='%234B5E1E' stroke='%234B5E1E' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat 0 0 / 32px 30px;
}

.hl-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.hl-facts li { display: flex; flex-direction: column; padding: 10px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; min-width: 120px; }
.hl-facts span { font-size: 13px; color: var(--muted); }
.hl-facts strong { font-weight: 600; }

.hl-cook { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.hl-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 22px 24px 18px;
}
.hl-panel h2 {
  display: flex; align-items: center; gap: 12px; margin: 0 0 6px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line); font: 600 28px/1.15 var(--serif);
}
.hl-panel h2 .hl-ico { color: var(--green); }
.hl-panel h3 { margin: 18px 0 2px; font: 600 15px/1.3 var(--sans); color: var(--green); }
.hl-panel p { margin: 12px 0 0; }

.hl-checklist { margin: 0; padding: 0; list-style: none; }
.hl-checklist li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hl-checklist li:last-child { border-bottom: 0; }
.hl-checklist input {
  flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0;
  accent-color: var(--green); cursor: pointer;
}
.hl-checklist label { cursor: pointer; line-height: 1.45; }
.hl-checklist input:checked + label { text-decoration: line-through; color: #8C8775; }

.hl-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.hl-steps li {
  position: relative; padding: 16px 0 16px 46px; border-bottom: 1px solid var(--line);
  counter-increment: step; line-height: 1.6;
}
.hl-steps li:last-child { border-bottom: 0; }
.hl-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 15px;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #9DAE76; color: #fff; font: 600 15px/1 var(--sans);
}

.hl-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }
.hl-notes .hl-panel h2 { font-size: 22px; }

.hl-comments { margin-top: 48px; }
.hl-comments > h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font: 600 clamp(28px, 3vw, 36px)/1.15 var(--serif); }
.hl-comments > h2 .hl-ico { color: var(--green); }
.hl-comments > h2 small { font: 400 18px var(--sans); color: var(--muted); }
.hl-comment { padding: 16px 20px; margin-bottom: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.hl-comment p { margin: 6px 0 0; }
.hl-comment__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 0 !important; }
.hl-comment__meta span { font-size: 14px; color: var(--muted); }

.hl-form h3 { margin: 0 0 8px; font: 600 22px/1.2 var(--serif); color: var(--ink); }
.hl-form label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 15px; }
.hl-form input[type="text"], .hl-form input[type="email"], .hl-form textarea,
.hl-side__form input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: #fff; border: 1px solid #D9D0BE; border-radius: 8px; font-size: 16px;
}
.hl-form textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.hl-form input[readonly] { background: var(--band); color: var(--muted); }
.hl-form input:focus, .hl-form textarea:focus, .hl-side__form input:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(75, 94, 30, .18);
}
.hl-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hl-form__captcha > span { display: flex; align-items: center; gap: 12px; }
.hl-form__captcha img { border-radius: 4px; border: 1px solid var(--line); }
.hl-form__captcha input { max-width: 160px; }
.hl-form .hl-btn { margin-top: 18px; }
.hl-form .required { color: var(--alert); }

/* Sidebar */
.hl-sidebar { display: grid; gap: 22px; }
.hl-side { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 20px 20px 18px; }
.hl-side h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 600 24px/1.2 var(--serif); }
.hl-side h2 .hl-ico { color: var(--green); }
.hl-side__form { display: grid; gap: 12px; }
.hl-side__search { grid-template-columns: 1fr; }
.hl-side__search .hl-btn { justify-self: end; }
.hl-side__links { display: flex; justify-content: center; gap: 14px; margin: 14px 0 0; font-size: 14px; }
.hl-side__links span { color: var(--line); }
.hl-side__list { margin: 0; padding: 0; list-style: none; }
.hl-side__list li { border-bottom: 1px solid var(--line); }
.hl-side__list li:last-child { border-bottom: 0; }
.hl-side__list a { display: block; padding: 7px 4px; color: var(--green-dark); text-decoration: none; font-size: 16px; }
.hl-side__list a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.hl-side__list a[aria-current="page"] { font-weight: 600; color: var(--green); }

@media (max-width: 1080px) {
  .hl-recipe-layout { grid-template-columns: minmax(0, 1fr); }
  .hl-sidebar { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .hl-side--cats { grid-column: 1 / -1; }
  .hl-side--cats .hl-side__list { columns: 3; column-gap: 24px; }
  .hl-side--cats .hl-side__list li { break-inside: avoid; }
}
@media (max-width: 860px) {
  .hl-cook { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .hl-recipe__head { padding: 12px 0 16px; }
  .hl-stats { gap: 8px 20px; font-size: 14px; }
  .hl-recipe__photo img { aspect-ratio: 4 / 3; }
  .hl-recipe__photo--none img { aspect-ratio: 16 / 9; }
  .hl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hl-actions .hl-btn:first-child, .hl-actions .hl-btn:last-child:nth-child(even) { grid-column: 1 / -1; }
  .hl-actions .hl-btn { padding: 0 12px; font-size: 15px; }
  .hl-panel { padding: 18px 16px 12px; }
  .hl-panel h2 { font-size: 24px; }
  .hl-form__row { grid-template-columns: 1fr; }
  .hl-sidebar { grid-template-columns: 1fr; }
  .hl-side--cats .hl-side__list { columns: 2; column-gap: 16px; }
  .hl-side__list li { break-inside: avoid; }
}
@media print {
  .hl-sidebar, .hl-actions, .hl-rating, .hl-comments, .hl-crumbs, .hl-alert { display: none !important; }
  .hl-recipe-layout, .hl-cook { display: block; }
  .hl-panel { box-shadow: none; break-inside: avoid; margin-bottom: 16px; }
}

/* ==========================================================================
   Search results (search.php)
   ========================================================================== */
.hl-search-head .hl-search--page { max-width: 640px; margin-top: 20px; }
.hl-subhead { margin: 0; font: 600 26px/1.2 var(--serif); }
.hl-section--tight > .hl-subhead { margin-bottom: 14px; }
.hl-pagecount { margin: 0; color: var(--muted); font-size: 15px; }
mark { background: #F3E3B8; color: inherit; border-radius: 2px; padding: 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.hl-catchips { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hl-catchips a {
  display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
}
.hl-catchips a:hover { border-color: var(--green); }
.hl-catchips img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.hl-catchips span { display: flex; flex-direction: column; line-height: 1.25; }
.hl-catchips strong { font: 600 17px/1.25 var(--serif); }
.hl-catchips small { color: var(--muted); font-size: 13px; }

.hl-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.hl-result__link {
  display: flex; align-items: center; gap: 20px; padding: 10px 24px 10px 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
}
.hl-result__link:hover { border-color: #B9C39C; }
.hl-result__img { flex: 0 0 auto; width: 104px; height: 70px; border-radius: 6px; overflow: hidden; background: var(--band); }
.hl-result__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-result__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-left: 20px; border-left: 1px solid var(--line); }
.hl-result__title { font: 600 21px/1.25 var(--serif); }
.hl-result__link:hover .hl-result__title { color: var(--green-dark); }
.hl-result__stats { display: flex; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.hl-result__stats > span + span::before { content: "|"; margin: 0 14px; color: #B5AE9C; }
.hl-result__more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 500; }
.hl-result__link:hover .hl-result__more .hl-ico { transform: translateX(3px); }
.hl-result__more .hl-ico { transition: transform .15s ease; }

.hl-empty img { display: block; margin: 0 auto 8px; width: 200px; height: auto; border-radius: 8px; }
.hl-backlink { margin: 28px 0 0; text-align: right; }
.hl-backlink a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

@media (max-width: 700px) {
  .hl-result__link { gap: 14px; padding: 10px 12px 10px 10px; }
  .hl-result__img { width: 84px; height: 64px; }
  .hl-result__body { padding-left: 0; border-left: 0; }
  .hl-result__title { font-size: 18px; }
  .hl-result__stats { font-size: 13px; }
  .hl-result__stats { flex-wrap: nowrap; white-space: nowrap; }
  .hl-result__stats > span + span::before { margin: 0 6px; }
  .hl-result__long { display: none; }
  .hl-result__more { display: none; }
  .hl-catchips a { padding-right: 14px; }
  .hl-backlink { text-align: left; }
}
@media (max-width: 380px) {
  .hl-result__link { gap: 10px; }
  .hl-result__img { width: 72px; height: 56px; }
  .hl-result__stats { font-size: 12px; }
  .hl-result__stats > span + span::before { margin: 0 4px; }
}
@media (max-width: 360px) {
  .hl-header__bar { gap: 10px; }
  .hl-logo { flex: 0 1 auto; min-width: 0; }
  .hl-logo img { height: 28px; max-width: 100%; object-fit: contain; object-position: left center; }
  .hl-tools { gap: 0; }
}
@media (max-width: 340px) {
  .hl-result__stats { flex-wrap: wrap; white-space: normal; gap: 0 10px; }
  .hl-result__stats > span + span::before { content: none; }
}

/* ==========================================================================
   Member account (account.php)
   ========================================================================== */
.hl-account { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 8px; }
.hl-account__nav {
  position: sticky; top: 92px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 18px 12px 12px;
}
.hl-account__who { display: flex; align-items: center; gap: 12px; padding: 0 8px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.hl-account__who span { display: flex; flex-direction: column; min-width: 0; }
.hl-account__who strong { font: 600 18px/1.25 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-account__who small { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.hl-account__menu { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.hl-account__menu a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500;
}
.hl-account__menu a .hl-ico { color: var(--muted); }
.hl-account__menu a span { flex: 1 1 auto; }
.hl-account__menu a small {
  min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--band);
  color: var(--muted); font-size: 13px; text-align: center;
}
.hl-account__menu a:hover { background: var(--band); }
.hl-account__menu a[aria-current="page"] { background: var(--green-tint); color: var(--green-dark); font-weight: 600; }
.hl-account__menu a[aria-current="page"] .hl-ico { color: var(--green); }
.hl-account__out { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }

.hl-account__main { min-width: 0; }
.hl-account__main > h1 { margin: 0 0 18px; font: 600 clamp(30px, 3.6vw, 42px)/1.1 var(--serif); }
.hl-account__main > .hl-alert { margin: 0 0 18px; }

.hl-avatar { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.hl-avatar--lg { width: 96px; height: 96px; }
.hl-avatar--initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff; font: 600 20px/1 var(--serif);
}
.hl-avatar--lg.hl-avatar--initials { font-size: 34px; }

.hl-profilecard { display: flex; gap: 24px; align-items: flex-start; }
.hl-profilecard__info { flex: 1 1 auto; min-width: 0; }
.hl-profilecard__info h2 { margin: 4px 0 12px; font: 600 26px/1.2 var(--serif); }
.hl-deflist { display: grid; gap: 8px; margin: 0 0 18px; }
.hl-deflist div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.hl-deflist dt { color: var(--muted); }
.hl-deflist dd { margin: 0; overflow-wrap: anywhere; }

.hl-statcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.hl-statcard { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.hl-statcard .hl-ico { color: var(--green); margin-bottom: 6px; }
.hl-statcard strong { font: 600 30px/1.1 var(--serif); }
.hl-statcard span { color: var(--muted); font-size: 15px; }
.hl-statcard:hover { border-color: #B9C39C; }

.hl-form--narrow { max-width: 560px; }
.hl-form p { margin: 0 0 16px; }
.hl-form input[type="password"], .hl-form input[type="file"] {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: #fff; border: 1px solid #D9D0BE; border-radius: 8px; font-size: 16px;
}
.hl-form input[type="file"] { padding: 9px 10px; }
.hl-form input[type="password"]:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(75, 94, 30, .18); }
.hl-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.hl-check { display: flex; align-items: center; gap: 10px; }
.hl-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); }
.hl-check label { margin: 0 !important; font-weight: 400 !important; }
.hl-form__label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 15px; }
.hl-form__avatar { margin: 4px 0 20px; }
.hl-form__avatar > div { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hl-link-danger { color: var(--alert); }
.hl-form__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.hl-form__actions .hl-btn { margin-top: 12px; }

.hl-favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.hl-fav { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.hl-fav__link { display: block; color: var(--ink); text-decoration: none; }
.hl-fav__img { display: block; aspect-ratio: 3 / 2; background: var(--band); }
.hl-fav__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-fav__title { display: block; padding: 12px 14px 14px; font: 600 18px/1.25 var(--serif); }
.hl-fav__link:hover .hl-fav__title { color: var(--green-dark); }
.hl-fav__remove { position: absolute; top: 8px; right: 8px; margin: 0; }
.hl-fav__remove button {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 253, 249, .94); color: var(--ink); cursor: pointer;
  box-shadow: 0 2px 6px rgba(43, 42, 31, .2);
}
.hl-fav__remove button:hover { background: var(--alert); color: #fff; }

@media (max-width: 900px) {
  .hl-account { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hl-account__nav { position: static; padding: 12px; }
  .hl-account__who { padding: 0 4px 12px; }
  .hl-account__menu {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin: 0 -12px; padding: 2px 12px 2px;
  }
  .hl-account__menu::-webkit-scrollbar { display: none; }
  .hl-account__menu li { flex: 0 0 auto; }
  .hl-account__menu a { min-height: 42px; padding: 0 14px; background: var(--band); border-radius: 999px; white-space: nowrap; }
  .hl-account__out { margin: 0; padding: 0; border: 0; }
  .hl-statcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hl-profilecard { flex-direction: column; align-items: center; text-align: center; }
  .hl-deflist div { grid-template-columns: 1fr; gap: 0; text-align: left; }
  .hl-profilecard__info { width: 100%; }
  .hl-profilecard__info h2 { text-align: center; }
  .hl-statcards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hl-statcard { flex-direction: row; align-items: center; gap: 12px; }
  .hl-statcard .hl-ico { margin: 0; }
  .hl-statcard strong { font-size: 22px; }
  .hl-favs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hl-fav__title { font-size: 16px; padding: 10px 12px 12px; }
  .hl-form__actions .hl-btn { flex: 1 1 auto; }
}

/* Add a Recipe form */
.hl-lead { margin: -6px 0 20px; color: var(--muted); font-size: 17px; max-width: 62ch; }
.hl-recipeform { display: grid; gap: 18px; }
.hl-recipeform fieldset { margin: 0; min-width: 0; }
.hl-recipeform legend {
  display: flex; align-items: center; gap: 12px; float: left; width: 100%;
  margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font: 600 22px/1.2 var(--serif);
}
.hl-recipeform legend + * { clear: both; }
.hl-recipeform legend small { font: 400 14px var(--sans); color: var(--muted); }
.hl-step {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 50%; background: var(--green); color: #fff; font: 600 15px/1 var(--sans);
}
.hl-form select {
  width: 100%; min-height: 46px; padding: 0 40px 0 14px; border: 1px solid #D9D0BE; border-radius: 8px; font-size: 16px;
  background: #fff 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 1l5 5 5-5' fill='none' stroke='%232B2A1F' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none; appearance: none;
}
.hl-form select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(75, 94, 30, .18); }
.hl-form textarea::placeholder, .hl-form input::placeholder { color: #9A9482; }
.hl-form__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.hl-upload { display: flex; gap: 20px; align-items: center; }
.hl-upload__preview {
  width: 200px; height: 134px; flex: 0 0 auto; object-fit: contain; border-radius: 8px;
  background: #FBF7F0; border: 1px dashed #CFC6B4;
}
.hl-upload__preview.is-photo { object-fit: cover; border-style: solid; }
.hl-upload > div { flex: 1 1 auto; min-width: 0; }
.hl-submitbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.hl-submitbar .hl-form__captcha { margin: 0; }
.hl-submitbar .hl-form__actions { border: 0; padding: 0; }
.hl-submitbar .hl-form__actions .hl-btn { margin-top: 0; }
.hl-done { text-align: center; padding: 40px 24px; }
.hl-done__icon { display: inline-flex; color: var(--green); margin-bottom: 8px; }
.hl-done h2 { margin: 0 0 8px; font: 600 28px/1.2 var(--serif); }
.hl-done p { margin: 0 0 8px; color: var(--muted); }
.hl-form__actions--center { justify-content: center; border: 0; }

@media (max-width: 900px) {
  .hl-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hl-form__grid { grid-template-columns: minmax(0, 1fr); }
  .hl-upload { flex-direction: column; align-items: stretch; }
  .hl-upload__preview { width: 100%; height: 180px; }
  .hl-recipeform legend { font-size: 20px; }
  .hl-submitbar { flex-direction: column; align-items: stretch; }
  .hl-submitbar .hl-form__actions .hl-btn { flex: 1 1 auto; }
}

.hl-done h2 { display: block; border: 0; padding: 0; }

/* ---------- Sign-in, register and other member pages ---------- */
.hl-auth {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  max-width: 940px; margin: 24px auto 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.hl-auth--wide { max-width: 1080px; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: stretch; }
.hl-auth__main { padding: 44px 48px 40px; }
.hl-auth__main h1 { margin: 0; font: 600 clamp(32px, 3.6vw, 42px)/1.1 var(--serif); }
.hl-auth__lead { margin: 10px 0 0; max-width: 46ch; color: var(--muted); font-size: 17px; }
.hl-auth__main .hl-alert { margin-top: 20px; }
.hl-auth__main .hl-form { margin-top: 26px; }
.hl-auth__main .hl-form .hl-btn--block { margin-top: 6px; }
.hl-auth__switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.hl-auth__switch a { font-weight: 600; }
.hl-auth__main--status { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hl-auth__main--status .hl-done__icon {
  width: 64px; height: 64px; align-items: center; justify-content: center; margin-bottom: 18px;
  border-radius: 50%; background: var(--green-tint);
}
.hl-done__icon--warn { color: var(--gold) !important; background: #F6EEDF !important; }
.hl-auth__main--status .hl-hint { margin: 10px 0 24px; }
.hl-auth__main--status .hl-form__actions { margin-top: 24px; }

.hl-form__labelrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hl-form__labelrow a { font-size: 14px; }

.hl-auth__group { margin: 0 0 8px; padding: 0; border: 0; min-width: 0; }
.hl-auth__group + .hl-auth__group { margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.hl-auth__group legend { padding: 0; margin-bottom: 14px; font: 600 20px/1.2 var(--serif); color: var(--ink); }
.hl-auth .hl-form__captcha { margin: 12px 0 18px; padding-top: 20px; border-top: 1px solid var(--line); }

/* The ruled index card: faint recipe-card lines with one gold margin rule */
.hl-auth__card {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 36px 36px 52px;
  background-color: #F7F1E4;
  background-image:
    linear-gradient(90deg, transparent 31px, rgba(184, 147, 90, .55) 31px, rgba(184, 147, 90, .55) 32px, transparent 32px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(75, 94, 30, .09) 31px 32px);
  border-left: 1px solid var(--line);
}
.hl-auth__art { display: block; width: 200px; height: auto; margin: 0 0 18px -8px; }
.hl-auth__card h2 { margin: 0 0 14px; font: 600 24px/1.2 var(--serif); }
.hl-auth__perks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.hl-auth__perks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.hl-auth__perks .hl-ico { flex: 0 0 auto; margin-top: 2px; color: var(--green); }

/* Email a friend */
.hl-sendfriend { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; margin-top: 20px; }
.hl-sendfriend .hl-form { padding: 26px 28px 24px; }
.hl-sendfriend__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.hl-sendfriend__foot .hl-form__captcha { margin: 0; }
.hl-sendfriend__foot .hl-form__actions .hl-btn { margin-top: 0; }
.hl-sendfriend__preview { position: sticky; top: 96px; }
.hl-sendfriend__preview .hl-hint { margin: 0 0 8px; }
.hl-sendfriend__card {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none;
}
.hl-sendfriend__card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.hl-sendfriend__card strong { padding: 0 4px; font: 600 20px/1.25 var(--serif); }
.hl-sendfriend__card span { padding: 0 4px; color: var(--muted); font-size: 15px; }
.hl-sendfriend__card:hover strong { color: var(--green); }

/* Public member profile */
.hl-avatar--xl { width: 120px; height: 120px; }
.hl-avatar--xl.hl-avatar--initials { font-size: 42px; }
.hl-member { margin-top: 16px; }
.hl-member__card {
  display: flex; align-items: center; gap: 28px; padding: 28px 32px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.hl-member__info { min-width: 0; }
.hl-member__info h1 { margin: 0 0 12px; font: 600 clamp(30px, 3.6vw, 42px)/1.1 var(--serif); }
.hl-member__meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.hl-member__meta li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.hl-member__meta .hl-ico { flex: 0 0 auto; color: var(--green); }
.hl-member__none { margin: 0; padding: 24px; text-align: center; color: var(--muted); background: var(--paper); border: 1px dashed #CFC6B4; border-radius: 12px; }

/* Info pages written in the admin */
.hl-prose { max-width: 720px; margin: 16px auto 0; }
.hl-prose h1 { margin: 0 0 20px; font: 600 clamp(34px, 4.4vw, 48px)/1.1 var(--serif); }
.hl-prose__body { font: 400 19px/1.7 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.hl-prose__body img { max-width: 100%; height: auto; }
.hl-prose__body a { color: var(--green); }
.hl-prose__body table { max-width: 100%; }

@media (max-width: 960px) {
  .hl-auth, .hl-auth--wide { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .hl-auth__card { border-left: 0; border-top: 1px solid var(--line); padding: 28px 28px 28px 52px; }
  .hl-auth__art { width: 150px; }
  .hl-sendfriend { grid-template-columns: minmax(0, 1fr); }
  .hl-sendfriend__preview { position: static; order: -1; }
  .hl-sendfriend__card { flex-direction: row; align-items: center; gap: 14px; padding: 10px; }
  .hl-sendfriend__card img { width: 112px; flex: 0 0 auto; margin: 0; }
  .hl-sendfriend__card span { display: none; }
  .hl-sendfriend__card strong { font-size: 18px; }
}
@media (max-width: 600px) {
  .hl-auth { margin-top: 8px; border-radius: 12px; }
  .hl-auth__main { padding: 28px 20px 26px; }
  .hl-auth .hl-form__row { grid-template-columns: minmax(0, 1fr); }
  .hl-auth__card { padding: 24px 20px 24px 44px; background-image:
    linear-gradient(90deg, transparent 23px, rgba(184, 147, 90, .55) 23px, rgba(184, 147, 90, .55) 24px, transparent 24px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(75, 94, 30, .09) 31px 32px); }
  .hl-auth__main--status .hl-form__actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hl-sendfriend .hl-form { padding: 20px 18px; }
  .hl-sendfriend .hl-form__row { grid-template-columns: minmax(0, 1fr); }
  .hl-sendfriend__foot .hl-form__actions { width: 100%; }
  .hl-member__card { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 20px; }
  .hl-avatar--xl { width: 88px; height: 88px; }
  .hl-avatar--xl.hl-avatar--initials { font-size: 32px; }
  .hl-member__meta { flex-direction: column; }
  .hl-prose__body { font-size: 18px; }
}
.hl-sendfriend__foot .hl-form__actions, .hl-auth__main--status .hl-form__actions { border: 0; padding: 0; }
.hl-empty h1 { margin: 0 0 8px; font: 600 clamp(28px, 3.4vw, 36px)/1.15 var(--serif); }
.hl-panel .hl-steps-single { margin: 16px 0 4px; line-height: 1.7; max-width: 72ch; }
