/* Simmerbee: the category navigation, category landing pages, Dietary notes, the submit form's categories and
   "Find it in" (task 823.29). Loaded on every page next to site.css (src/pages/layout.js), kept by the service worker. */
.cn-row { padding-bottom: 6px; }
.cn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.cn-list > li { position: relative; }
.cn-top { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; cursor: pointer; list-style: none; }
summary.cn-top::-webkit-details-marker { display: none; }
summary.cn-top::after { content: ""; width: 7px; height: 7px; margin-left: 5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .65; }
.cn-dd[open] > summary.cn-top::after { transform: translateY(2px) rotate(-135deg); }
.cn-top:hover, .cn-dd[open] > .cn-top { background: var(--surface-2); color: var(--ink); }
.cn-top.on, a.cn-top[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.cn-sep { margin-left: auto; }
.cn-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.cn-all { display: block; padding: 8px 10px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.cn-panel ul { list-style: none; margin: 4px 0 0; padding: 4px 0 0; border-top: 1px solid var(--line); }
.cn-panel li a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.cn-panel li a:hover, .cn-all:hover { background: var(--surface-2); }
.cn-panel li a[aria-current="page"], .cn-all[aria-current="page"] { background: var(--honey-soft); font-weight: 600; }
.cn-menu-link, .js .cn-menu-btn.js-only { display: none !important; }
.cn-menu-btn { gap: 6px; padding: 0 12px; font-size: 1rem; font-weight: 600; }
@media (max-width: 1000px) {
  .js .cn-menu-btn.js-only { display: inline-flex !important; }
  html:not(.js) .cn-menu-link { display: inline-block !important; }
  .cn-row { display: none; }
  .site-header.nav-open .cn-row { display: block; position: absolute; top: 100%; left: 0; right: 0; max-width: none; max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 6px 20px 22px; }
  .cn-list { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; }
  .cn-top { display: flex; justify-content: space-between; width: 100%; min-height: 50px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .cn-top.on, a.cn-top[aria-current="page"] { box-shadow: none; }
  .cn-sep { margin-left: 0; }
  .cn-panel { position: static; min-width: 0; border: 0; box-shadow: none; background: transparent; padding: 4px 0 12px 10px; }
  .cn-panel ul { columns: 2 200px; column-gap: 12px; border-top: 0; }
  .cn-panel li { break-inside: avoid; }
}
@media (max-width: 640px) {
  .header-actions .plan-link-sm { display: none; }
  .header-actions { gap: 6px; }
  .js .cn-menu-btn.js-only { padding: 0; }
  .cn-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Category landing pages, Dietary notes, the submit form's categories, "Find it in" (task 823.29) */
.sub-tiles { list-style: none; padding: 0; margin: 8px 0 24px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sub-tiles li { display: block; }
.sub-tiles .cat-name { right: 14px; font-size: 1.12rem; line-height: 1.2; }
.sub-tiles .art { align-items: flex-start; }
.sub-tiles .art-icon { width: 26%; margin: 9% 0 0; }
@media (max-width: 640px) {
  .sub-tiles { grid-template-columns: 1fr; gap: 12px; }
  .sub-tiles .cat-tile { aspect-ratio: 5 / 2; }
  .sub-tiles .art { width: 100%; aspect-ratio: auto; justify-content: flex-end; align-items: center; padding-right: 7%; }
  .sub-tiles .art-icon { width: 24%; margin: 0; }
  .sub-tiles .cat-name { right: 34%; }
}
.other-cats { align-items: center; margin-top: 4px; }
.diet-note { background: var(--herb-soft); border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; }
.diet-note p { margin: 0 0 .4em; }
.diet-note p:last-child { margin-bottom: 0; }
.diet-how summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.diet-how p { margin: 8px 0 0; max-width: 78ch; }
.cat-pick { margin-top: 14px; }
.cat-pick > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-pick-group { margin: 12px 0 0; min-width: 0; }
.cat-pick-group legend { font: 600 1rem var(--sans); }
.cat-pick-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.cat-pick-opts label.check { margin: 6px 0; font-weight: 400; }
.also-in { margin: 22px 0 0; }
.also-in .chips { margin: 6px 0 4px; }
.cn-panel li.cn-guide { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
