.header {position:relative;z-index:5}
.header .nav {overflow:visible}
.header .recipes-menu {position:relative;margin:0}
.header .recipes-menu summary {display:flex;align-items:center;gap:4px;list-style:none;color:white;font:700 14px/1.4 'DM Sans','Noto Sans Thai',sans-serif;cursor:pointer}
.header .recipes-menu summary::-webkit-details-marker {display:none}
.header .recipes-menu summary::after {content:"";border:solid currentColor;border-width:0 1.5px 1.5px 0;display:block;padding:2px;transform:translateY(-1px) rotate(45deg)}
.header .recipes-menu[open] summary::after {transform:translateY(1px) rotate(225deg)}
.header .recipes-menu.current summary {text-decoration:underline;text-underline-offset:4px}
.header .recipes-menu summary:focus-visible {outline:2px solid currentColor;outline-offset:3px}
.header .recipes-menu .recipe-options {display:grid;position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);width:240px;max-width:calc(100vw - 32px);padding:5px 12px;background:#fffdf7;border:1px solid #d9d8c7;border-radius:9px;box-shadow:0 6px 20px #19352828;z-index:12;white-space:normal}
.header .nav .recipe-options a {display:flex;align-items:center;min-height:42px;padding:6px 3px;color:#193f31;text-shadow:none;text-decoration:none;font:600 14px/1.35 'DM Sans','Noto Sans Thai',sans-serif}
.header .recipe-options a+a {border-top:1px solid #e7e5d7}
.header .nav .recipe-options a:is(:hover,:focus-visible,[aria-current=page]) {color:#7b3c24;text-decoration:underline;text-underline-offset:3px}
.header .recipes-menu .recipe-options {max-height:65vh;overflow-y:auto;overscroll-behavior:contain}

/* The lower white flag stripe grows with the navigation, including at larger text sizes. */
@media (max-width: 950px) {
  .header, .home .header {
    background: linear-gradient(to bottom, #a51931 0 16px, #fff 16px 38px, #2d2a4a 38px);
    border-bottom: 16px solid #a51931;
  }
  .header .header-inner, .home .header .header-inner {
    display: grid;
    grid-template-columns: min(18px, 4vw) minmax(0, 1fr) auto min(18px, 4vw);
    grid-template-rows: 38px minmax(50px, auto) auto;
    align-items: center;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    gap: 0;
  }
  .header .header-inner::before {
    content: "";
    grid-area: 3 / 1 / 4 / -1;
    align-self: stretch;
    background: white;
  }
  .header .brand {
    position: static;
    grid-area: 2 / 2;
    min-width: 0;
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .header .brand small {
    position: static;
    color: white;
    white-space: normal;
  }
  .header .language, .home .header .language {
    position: static;
    grid-area: 2 / 3;
    margin: 0 0 0 6px;
  }
  .header .nav, .home .header .nav {
    position: relative;
    inset: auto;
    grid-area: 3 / 2 / 4 / 4;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0 var(--recipes-pan-right, 0px) 0 var(--recipes-pan-left, 0px);
    transform: none;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0 0.4rem;
    overflow: visible;
    color: #172741;
    background: white;
  }
  .header .nav > a, .header .recipes-menu summary {
    display: flex;
    align-items: center;
    min-height: 28px;
    max-width: 100%;
    color: #172741;
    text-shadow: none;
    white-space: normal;
  }
  .header .recipes-menu { position: static; }
  .header .recipes-menu summary { font-size: 0.875rem; }
  .header .recipes-menu .recipe-options {
    top: 100%;
    left: var(--recipes-pan-left, 0px);
    right: var(--recipes-pan-right, 0px);
    width: min(16.5rem, calc(100% - var(--recipes-pan-left, 0px) - var(--recipes-pan-right, 0px)));
    max-width: none;
    margin-inline: auto;
    transform: none;
    max-height: var(--recipes-popup-height, 60vh);
    overflow: auto;
    overscroll-behavior: contain;
  }
  .header .nav .recipe-options a {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
