version: "2026-11-26.3"
position_weight:                  # how much each ingredient counts, from its place in the list
  offset: 1                       # top-level item at position p (first = 0) weighs 1 / (p + offset)
  minor_factor: 0.25              # items after "contains 2% or less of" are multiplied by this
  sub_list: position              # a sub-list shares its parent's weight by order, like the main list ("equal": evenly)
  sub_list_power: 2               # inside brackets the first item dominates ("enriched flour (wheat flour, niacin, ...)")
step_points: {1: 0, 2: 1, 3: 2, 4: 3, 5: 4}
role_multiplier: {functional: 1.0, cosmetic: 1.5}
single_ingredient_ignores_role: true
thresholds: [0.5, 1.5, 2.5]       # raw < 0.5 → 1, < 1.5 → 2, < 2.5 → 3, else 4
min_known_weight_share: 0.5
nutrient_caps:                    # the nutrition panel (per 100 g) limits how much of these there can be
  # nutrient -> {ingredient name: grams of that nutrient per gram of ingredient}. Values are on the
  # low side, so a cap only bites when the panel clearly rules the position-based share out.
  # Names match the canonical name, else the label's name. Owner request 2026-11-26.
  sodium:
    salt: 0.393
    sea salt: 0.393
    iodized salt: 0.393
    kosher salt: 0.393
    celtic sea salt: 0.38
    himalayan pink salt: 0.38
    sodium bicarbonate: 0.274
    baking soda: 0.274
  sugars:
    sugar: 1.0
    cane sugar: 1.0
    evaporated cane sugar: 1.0
    brown sugar: 0.95
    brown cane sugar: 0.95
    turbinado sugar: 0.98
    powdered sugar: 0.95
    "confectioners' sugar": 0.95
    dextrose: 0.9
    fructose: 1.0
    honey: 0.8
    high fructose corn syrup: 0.75
    invert sugar: 0.7
    maple syrup: 0.6
    molasses: 0.55
    agave syrup: 0.7
  fat:
    vegetable oil: 1.0
    canola oil: 1.0
    soybean oil: 1.0
    corn oil: 1.0
    sunflower oil: 1.0
    high oleic sunflower oil: 1.0
    high oleic canola oil: 1.0
    safflower oil: 1.0
    olive oil: 1.0
    palm oil: 1.0
    palm kernel oil: 1.0
    coconut oil: 1.0
    cottonseed oil: 1.0
    peanut oil: 1.0
    avocado oil: 1.0
    hydrogenated vegetable oil: 1.0
    vegetable shortening: 1.0
    lard: 1.0
    butter: 0.8                   # butter is about 80% fat
nutrient_label_floors:            # grams per serving below which a US label prints 0 (21 CFR 101.9(c))
  # A panel value under this floor (or 0) is a rounding artefact, not a limit, so it caps nothing.
  # Used only when the serving size is known; without it, only a value of exactly 0 is skipped.
  fat: 0.5
  sugars: 0.5
  sodium: 0.005                   # 5 mg (Open Food Facts stores sodium in grams)
role_overrides:                   # category_tag → {ingredient canonical name: role}
  "en:sodas": {"citric acid": cosmetic, "phosphoric acid": cosmetic}
role_by_function:                 # a researched ingredient's default role, from its primary_function
  # Owner rulings 2026-11-25 (benchmark/gold/README.md): base ingredients that make up the food are
  # functional (so are fresh vegetables used as seasoning, and hydrogenated fats and shortenings);
  # acids that preserve or control acidity for safety are functional and their salts follow them;
  # acids added mainly for sourness are flavor, so cosmetic.
  base_food: functional
  preservative: functional
  antioxidant: functional
  curing_agent: functional
  leavening: functional
  acidity_control: functional
  fortification: functional
  culture_or_enzyme: functional
  sweetener: cosmetic
  color: cosmetic
  flavor: cosmetic
  emulsifier: cosmetic
  thickener_stabilizer: cosmetic
  anticaking: cosmetic
  humectant: cosmetic
  firming_agent: cosmetic
  other_texture: cosmetic
  other: cosmetic                 # e.g. glazing agents, carriers: added for appearance or handling
