/* Donutshole visual refresh: forest editorial, compact navigation, soft 18px surfaces. */
:root {
  --bg-site: #f5f7f2;
  --bg-card: #ffffff;
  --bg-subtle: #edf2e9;
  --green-main: #587244;
  --green-hover: #405a30;
  --green-light: #e8f0e2;
  --green-tag: #eff5eb;
  --text-dark: #182218;
  --text-muted: #5e685d;
  --text-light: #7c877a;
  --border-color: #dce5d7;
  --shadow-sm: 0 10px 28px rgba(39, 64, 35, .055);
  --shadow-md: 0 18px 44px rgba(39, 64, 35, .12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --transition: .22s ease;
}

html { background: var(--bg-site); }
body { min-width: 320px; overflow-x: hidden; background: var(--bg-site); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(88, 114, 68, .38);
  outline-offset: 3px;
}

/* Compact desktop navigation with one unbroken reading line. */
.header {
  padding: 10px 0;
  background: rgba(245, 247, 242, .94);
  border-bottom-color: rgba(88, 114, 68, .14);
  box-shadow: 0 1px 0 rgba(255,255,255,.85);
}
.nav-wrapper { min-height: 58px; gap: 28px; }
.logo { gap: 11px; }
.logo-mark { width: 34px; height: 34px; }
.logo-title { font-size: 1.55rem; line-height: 1; letter-spacing: .035em; }
.logo-sub { margin-top: 4px; letter-spacing: .01em; }
.site-nav { gap: 24px; }
.nav-link { position: relative; font-size: .86rem; }
.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--green-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }
.header-search { width: 210px; }
.header-search input {
  min-height: 38px;
  padding: 8px 14px;
  background: rgba(255,255,255,.78);
  color: var(--text-dark);
}
.dle-login>a { min-height: 38px; padding: 9px 19px; box-shadow: 0 8px 18px rgba(64, 90, 48, .18); }
.dle-login>a:active, .hero-cta:active, .btn-green:active { transform: translateY(1px) scale(.99); }

/* Home: more asymmetric editorial composition and clearer section rhythm. */
#hero { position: relative; padding-top: 34px; }
.hero-grid { grid-template-columns: minmax(260px, .74fr) minmax(390px, 1.18fr) minmax(210px, .6fr); gap: 22px; padding: 24px 0 46px; }
.hero-left-box { align-self: center; padding: 8px 0 8px 18px; border-left: 2px solid var(--green-main); }
.hero-main-title { max-width: 9ch; font-size: clamp(2.5rem, 4vw, 4.35rem); letter-spacing: -.045em; line-height: 1.02; margin-bottom: 20px; }
.hero-main-title span { display: block; }
.hero-sub { max-width: 31ch; font-size: 1rem; line-height: 1.7; }
.hero-cta { margin-top: 25px; padding: 14px 22px; box-shadow: 0 10px 24px rgba(64, 90, 48, .15); }
.hero-social-proof { max-width: 29ch; font-size: .82rem; line-height: 1.55; color: var(--text-muted); }
.hero-center-card, .recipe-card-modern { border-color: var(--border-color); box-shadow: var(--shadow-sm); }
.hero-center-card { border-radius: var(--radius-lg); overflow: hidden; }
.hero-card-img-wrapper { height: 292px; }
.hero-card-img { transition: transform .45s ease; }
.hero-center-card:hover .hero-card-img { transform: scale(1.035); }
.hero-card-body { padding: 22px 22px 20px; }
.hero-card-kicker, .recipe-card-category {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--green-tag);
  color: var(--green-main);
  font: 800 .68rem/1 var(--font-body);
  letter-spacing: .055em;
  text-transform: uppercase;
}
.hero-card-title { font-size: clamp(1.5rem, 2vw, 1.9rem); letter-spacing: -.025em; }
.hero-card-meta { gap: 12px; color: var(--text-muted); }
.hero-right-stack { gap: 12px; }
.mini-recipe-card { border-radius: var(--radius-md); }
.mini-recipe-card::after { background: linear-gradient(90deg, rgba(21,33,20,.7), rgba(21,33,20,.12)); }
.mini-recipe-overlay { padding: 16px; }

.category-collection { padding: 42px 0; border-top-color: rgba(88,114,68,.18); }
.category-collections { padding-bottom: 56px; }
.section-heading { margin-bottom: 22px; }
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -.035em; }
.section-heading a { font-size: .88rem; }
.section-heading a:hover { color: var(--green-hover); text-decoration: underline; text-underline-offset: 4px; }
.recipes-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.recipe-card-modern { border-radius: var(--radius-md); cursor: default; }
.recipe-card-modern:hover { transform: translateY(-5px); }
.card-img-box { height: 205px; overflow: hidden; }
.card-img-box img { transition: transform .45s ease; }
.recipe-card-modern:hover .card-img-box img { transform: scale(1.04); }
.card-content-box { padding: 17px 18px 16px; }
.card-title-text { font-size: 1.25rem; line-height: 1.18; letter-spacing: -.02em; }
.card-content-box>p { line-height: 1.55; }
.card-meta-row { border-top: 1px solid var(--border-color); gap: 10px; padding-top: 12px; }
.card-meta-row b { color: var(--green-main); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.badge-day { display: none; }

/* Shared surfaces outside the home page. */
.page-shell { padding-top: 42px; }
.page-intro { text-align: left; margin-left: 0; }
.recipe-full, .search-panel, .related-recipes, .comments-form, .profile-card { box-shadow: var(--shadow-sm); }
.recipe-full { border-radius: var(--radius-lg); }
.ingredients-box, .search-panel { background: rgba(255,255,255,.74); }
.related-recipe-card { border-radius: var(--radius-sm); }
.category-catalog-card { border-radius: var(--radius-md); }
.category-catalog-card::before { background: linear-gradient(180deg, transparent 38%, rgba(18,31,17,.82) 100%); }

/* Comment form belongs to the recipe page, not to the default DLE admin UI. */
#dle-comments-form .comments-form {
  width: min(1126px, 100%);
  max-width: none;
  margin: 46px auto 0;
  padding: 30px;
  border-radius: var(--radius-md);
  border-color: var(--border-color);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 44px rgba(39, 64, 35, .075);
}
#dle-comments-form .comments-form h2 { margin-bottom: 20px; font-size: clamp(1.55rem, 3vw, 2rem); }
#dle-comments-form .comments-form__fields { gap: 14px; margin-bottom: 16px; }
#dle-comments-form .comments-form__field { display: grid; gap: 7px; color: var(--text-dark); font-size: .78rem; font-weight: 800; letter-spacing: .035em; }
#dle-comments-form .comments-form__field input,
#dle-comments-form .comments-form__question input {
  min-height: 46px;
  border-color: var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-dark);
}
#dle-comments-form .tox.tox-tinymce,
#dle-comments-form .comments-form .dleaddcomments-editor {
  overflow: hidden;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  background: #fff;
}
#dle-comments-form .tox .tox-editor-header { border-bottom: 1px solid var(--border-color); background: var(--bg-subtle); box-shadow: none; }
#dle-comments-form .tox .tox-toolbar-overlord,
#dle-comments-form .tox .tox-toolbar__primary { background: var(--bg-subtle); }
#dle-comments-form .tox .tox-tbtn:hover { background: var(--green-light); }
#dle-comments-form .tox .tox-edit-area::before { border-color: var(--green-main); }
#dle-comments-form .comments-form .bb-editor .bb-upload {
  min-height: 48px !important;
  max-height: 48px !important;
  border-top: 0 !important;
  background: var(--bg-subtle) !important;
}
#dle-comments-form .comments-form .bb-upload .bb-upload-drop { min-height: 48px !important; padding: 6px 10px !important; }
#dle-comments-form .comments-form__upload { margin: 12px 0 0; }
#dle-comments-form .comments-form__subscribe {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0;
  color: var(--text-dark);
  font-size: .88rem;
}
#dle-comments-form .comments-form__subscribe input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--green-main); }
#dle-comments-form .comments-form .btn-green { min-width: 230px; min-height: 46px; box-shadow: 0 9px 20px rgba(64,90,48,.16); }

@media (max-width: 1100px) {
  .nav-wrapper { gap: 18px; }
  .site-nav { gap: 16px; }
  .hero-grid { grid-template-columns: minmax(230px,.7fr) minmax(360px,1.15fr) minmax(180px,.55fr); }
  .recipes-grid-4 { gap: 16px; }
}

@media (max-width: 820px) {
  .header { padding: 12px 0 10px; }
  .nav-wrapper { display: grid; grid-template-columns: minmax(0,1fr) auto; min-height: 0; gap: 12px; }
  .logo { grid-column: 1; grid-row: 1; min-width: 0; }
  .nav-actions { grid-column: 2; grid-row: 1; margin-left: 0; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; order: initial; padding: 12px 0 0; }
  .hero-grid { grid-template-columns: 1fr; padding: 28px 0 36px; }
  .hero-left-box { padding: 4px 0 4px 16px; }
  .hero-main-title { max-width: 12ch; }
  .hero-feature-slot { max-width: 650px; width: 100%; }
  .hero-right-stack { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mini-recipe-card { height: 145px; }
}

@media (max-width: 560px) {
  .header { position: static; }
  .nav-wrapper { gap: 10px; }
  .logo-title { font-size: 1.35rem; }
  .logo-mark { width: 32px; height: 32px; }
  .dle-login>a { min-height: 36px; padding: 8px 15px; font-size: .84rem; }
  .site-nav { gap: 20px; padding-top: 10px; padding-bottom: 1px; }
  .nav-link { font-size: .82rem; }
  #hero { padding-top: 12px; }
  .hero-grid { gap: 22px; }
  .hero-main-title { font-size: clamp(2.35rem, 11vw, 3.25rem); max-width: 10ch; }
  .hero-sub { font-size: .96rem; }
  .hero-cta { width: fit-content; padding: 13px 19px; }
  .hero-social-proof { margin-top: 22px; }
  .hero-card-img-wrapper { height: 235px; }
  .hero-card-body { padding: 18px; }
  .hero-right-stack { grid-template-columns: 1fr; gap: 10px; }
  .mini-recipe-card { height: 128px; }
  .category-collection { padding: 32px 0; }
  .section-heading { align-items: baseline; }
  .section-heading h2 { font-size: 1.75rem; }
  .section-heading a { font-size: .78rem; }
  .recipes-grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .card-img-box { height: 220px; }
  #dle-comments-form .comments-form { width: 100%; margin-top: 34px; padding: 22px 18px; }
  #dle-comments-form .comments-form__fields { grid-template-columns: 1fr; }
  #dle-comments-form .comments-form .btn-green { width: 100%; min-width: 0; }
  .ingredients-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .servings-control { width: 100%; justify-content: space-between; }
  .servings-control select { width: min(100%, 230px) !important; min-width: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
