:root {
  --am-ink: #2f2f2f;
  --am-ink-soft: #6b6b6b;
  --am-olive: #a9a868;             /* the site's link colour, decorative */
  --am-olive-deep: #66652c;        /* olive that reads as text on white */
  --am-line: #e6e5dc;
  --am-tint: #f6f6ef;
  --am-white: #ffffff;
}


/* ==========================================================================
   1. Desktop menu (#navigation)
   ========================================================================== */

#navigation {
  position: relative;
  z-index: 100;
  clear: both;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--am-white);
  border-top: 1px solid var(--am-line);
  border-bottom: 1px solid var(--am-line);
}

#navigation .menu-header {
  margin: 0;
  padding: 0;
}

#navigation ul.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#navigation ul.menu > li {
  position: relative;
  float: none;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  list-style: none;
}

#navigation ul.menu > li > a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: none;
  color: var(--am-ink);
  background: none;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

/* small olive line under the item being pointed at or opened */
#navigation ul.menu > li > a::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 0.55rem;
  height: 2px;
  background: var(--am-olive);
  transform: scaleX(0);
  transition: transform 0.15s ease;
}

#navigation ul.menu > li:hover > a,
#navigation ul.menu > li:focus-within > a,
#navigation ul.menu > li.current-menu-item > a,
#navigation ul.menu > li.current-menu-ancestor > a {
  color: var(--am-olive-deep);
}

#navigation ul.menu > li:hover > a::after,
#navigation ul.menu > li:focus-within > a::after,
#navigation ul.menu > li.current-menu-item > a::after,
#navigation ul.menu > li.current-menu-ancestor > a::after {
  transform: scaleX(1);
}

/* down arrow on items with a dropdown */
#navigation ul.menu > li.menu-item-has-children > a::before {
  content: "";
  order: 2;
  width: 0.4rem;
  height: 0.4rem;
  margin-top: -0.2rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* Superfish's own arrows, if its script adds them */
#navigation .sf-sub-indicator {
  display: none;
}

/* Dropdowns: open on hover and on keyboard focus */
#navigation ul.sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 110;
  display: block;
  min-width: 13rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--am-white);
  border: 1px solid var(--am-line);
  border-top: 2px solid var(--am-olive);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 18px 32px -18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#navigation ul.menu > li:hover > ul.sub-menu,
#navigation ul.menu > li:focus-within > ul.sub-menu,
#navigation ul.menu > li.sfHover > ul.sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

#navigation ul.sub-menu li {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  list-style: none;
}

#navigation ul.sub-menu a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  color: var(--am-ink);
  background: none;
  border: 0;
}

#navigation ul.sub-menu a:hover,
#navigation ul.sub-menu a:focus-visible,
#navigation ul.sub-menu li.current-menu-item > a {
  color: var(--am-olive-deep);
  background: var(--am-tint);
}

#navigation a:focus-visible {
  outline: 2px solid var(--am-olive-deep);
  outline-offset: -2px;
}


/* ==========================================================================
   2. Phone menu bar (#sdrn_bar). The page itself shows it below 768px
      and hides #navigation there.
   ========================================================================== */

#sdrn_bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10000;
  display: none;
  height: 42px;
  padding: 0 0.9rem;
  background: var(--am-white);
  border-bottom: 1px solid var(--am-line);
  box-shadow: 0 4px 14px -10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

#sdrn_bar .menu_title {
  display: flex;
  align-items: center;
  height: 42px;
}

#sdrn_bar .bar_logo {
  display: block;
  width: auto;
  height: 26px;
  padding: 0;
}

/* hamburger: three bars, turning into a cross when the plugin opens the menu */
#sdrn_bar .sdrn_ic {
  position: relative;
  width: 24px;
  height: 42px;
}

#sdrn_bar .sdrn_ic span {
  position: absolute;
  left: 0;
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--am-ink) !important;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#sdrn_bar .sdrn_ic .sdrn_ic_1 { top: 13px; }
#sdrn_bar .sdrn_ic .sdrn_ic_2 { top: 20px; }
#sdrn_bar .sdrn_ic .sdrn_ic_3 { top: 27px; }

#sdrn_bar.menu_is_opened .sdrn_ic_1,
#sdrn_bar.sdrn_opened .sdrn_ic_1 { transform: translateY(7px) rotate(45deg); }
#sdrn_bar.menu_is_opened .sdrn_ic_2,
#sdrn_bar.sdrn_opened .sdrn_ic_2 { opacity: 0; }
#sdrn_bar.menu_is_opened .sdrn_ic_3,
#sdrn_bar.sdrn_opened .sdrn_ic_3 { transform: translateY(-7px) rotate(-45deg); }


/* ==========================================================================
   3. Phone slide-out menu (#sdrn_menu / #sdrn_menu_ul).
      The plugin's script slides it in; its width and starting position
      come from the page's own settings.
   ========================================================================== */

#sdrn_menu.sdrn_levels {
  box-sizing: border-box;        /* keeps the border inside, so nothing peeks in while closed */
  position: fixed;
  top: 42px;
  bottom: 0;
  z-index: 9999;
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 22rem;
  background: var(--am-white) !important;
  border-right: 1px solid var(--am-line);
  box-shadow: none;              /* a shadow would show at the screen edge while closed */
  -webkit-overflow-scrolling: touch;
}

@media only screen and (min-width: 768px) {
  #sdrn_menu.sdrn_levels {
    display: none !important;
  }
}

#sdrn_menu #sdrn_menu_ul {
  margin: 0;
  padding: 0 0 2rem;
  list-style: none;
}

#sdrn_menu #sdrn_menu_ul li {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 0;
  border-bottom: 1px solid var(--am-line);
}

#sdrn_menu #sdrn_menu_ul li a {
  display: block;
  padding: 0.95rem 1.25rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  color: var(--am-ink);
  border-left: 0;
}

/* the plugin puts an empty <div> inside every link */
#sdrn_menu #sdrn_menu_ul li a > div:empty {
  display: none;
}

#sdrn_menu #sdrn_menu_ul li a:hover,
#sdrn_menu #sdrn_menu_ul li a:focus-visible {
  color: var(--am-olive-deep);
  background: var(--am-tint);
}

#sdrn_menu #sdrn_menu_ul li.current-menu-item > a {
  color: var(--am-olive-deep);
  box-shadow: inset 4px 0 0 var(--am-olive);
}

/* Sub-menus are shown open, as indented lists, so every page can be
   reached with one tap even if the plugin's toggles don't run */
#sdrn_menu #sdrn_menu_ul ul.sub-menu {
  display: block;
  margin: 0;
  padding: 0 0 0.5rem;
  list-style: none;
  background: var(--am-tint);
  border-top: 0;
}

#sdrn_menu #sdrn_menu_ul ul.sub-menu li {
  border-bottom: 0;
}

#sdrn_menu #sdrn_menu_ul ul.sub-menu a {
  padding: 0.55rem 1.25rem 0.55rem 2.25rem;
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--am-ink-soft);
}

#sdrn_menu #sdrn_menu_ul ul.sub-menu a:hover {
  color: var(--am-olive-deep);
  background: transparent;
}

/* the plugin's expand/collapse arrows are not needed with open lists */
#sdrn_menu .sdrn_icon_par {
  display: none !important;
}

/* Search at the top of the panel */
#sdrn_menu #sdrn_menu_ul li.menu-item-searchbar {
  padding: 1rem 1.25rem;
  background: var(--am-tint);
}

#sdrn_menu #sdrn_searchform {
  position: relative;
  margin: 0;
}

#sdrn_menu #sdrn_s {
  box-sizing: border-box;
  width: 100%;
  height: 2.6rem;
  padding: 0 2.75rem 0 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--am-ink);
  background: var(--am-white);
  border: 1px solid var(--am-line);
  border-radius: 999px;
}

#sdrn_menu #sdrn_s:focus {
  outline: none;
  border-color: var(--am-olive);
  box-shadow: 0 0 0 3px rgba(169, 168, 104, 0.25);
}

#sdrn_menu #sdrn_searchsubmit {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* magnifier drawn in CSS (the plugin's icon font may be missing) */
#sdrn_menu .sdrn_searchsubmit_ic {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  width: 1.1rem;
  height: 1.1rem;
  pointer-events: none;
  background: var(--am-ink-soft);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}

#sdrn_menu .sdrn_searchsubmit_ic::before {
  content: none !important;
}


@media (prefers-reduced-motion: reduce) {
  #navigation ul.sub-menu,
  #navigation ul.menu > li > a::after,
  #sdrn_bar .sdrn_ic span {
    transition: none;
  }
}