// Word families with morphological structure
// Each family has a base morpheme carrying meaning, and a set of words
// built from it via prefixes/suffixes. This is the heart of SWI.

const WORD_FAMILIES = {
  sign: {
    base: "sign",
    meaning: "to mark",
    origin: "Latin signum — mark, token",
    tagline: "Every word in this family carries the idea of making a mark.",
    words: [
      { word: "sign",      parts: [{t:"sign",b:true}],                                         gloss: "a mark that conveys meaning" },
      { word: "signal",    parts: [{t:"sign",b:true},{t:"+"},{t:"al"}],                        gloss: "a thing that marks or communicates" },
      { word: "signify",   parts: [{t:"sign",b:true},{t:"+"},{t:"ify"}],                       gloss: "to make a mark of meaning" },
      { word: "signature", parts: [{t:"sign",b:true},{t:"+"},{t:"ate"},{t:"+"},{t:"ure"}],     gloss: "the mark that identifies a person" },
      { word: "design",    parts: [{t:"de"},{t:"+"},{t:"sign",b:true}],                        gloss: "to mark out; to plan" },
      { word: "resign",    parts: [{t:"re"},{t:"+"},{t:"sign",b:true}],                        gloss: "to mark again — to un-mark one's position" },
      { word: "assign",    parts: [{t:"as"},{t:"+"},{t:"sign",b:true}],                        gloss: "to mark toward; to appoint" },
      { word: "insignia",  parts: [{t:"in"},{t:"+"},{t:"sign",b:true},{t:"+"},{t:"ia"}],       gloss: "marks of rank or office" },
    ],
    phonicsBreaks: [
      { word: "sign",      issue: "silent g" },
      { word: "signal",    issue: "g pronounced" },
      { word: "signature", issue: "g pronounced, different vowel" },
      { word: "design",    issue: "silent g again" },
    ]
  },
  act: {
    base: "act",
    meaning: "to do, to drive",
    origin: "Latin agere — to drive, to do",
    tagline: "Every word in this family carries the idea of doing.",
    words: [
      { word: "act",         parts: [{t:"act",b:true}],                                                     gloss: "a thing done" },
      { word: "action",      parts: [{t:"act",b:true},{t:"+"},{t:"ion"}],                                   gloss: "the doing of a thing" },
      { word: "active",      parts: [{t:"act",b:true},{t:"+"},{t:"ive"}],                                   gloss: "tending to do" },
      { word: "actor",       parts: [{t:"act",b:true},{t:"+"},{t:"or"}],                                    gloss: "one who does" },
      { word: "react",       parts: [{t:"re"},{t:"+"},{t:"act",b:true}],                                    gloss: "to do in response" },
      { word: "interact",    parts: [{t:"inter"},{t:"+"},{t:"act",b:true}],                                 gloss: "to do between" },
      { word: "transaction", parts: [{t:"trans"},{t:"+"},{t:"act",b:true},{t:"+"},{t:"ion"}],               gloss: "a doing across" },
      { word: "enactment",   parts: [{t:"en"},{t:"+"},{t:"act",b:true},{t:"+"},{t:"ment"}],                 gloss: "the state of having made something done" },
    ],
    phonicsBreaks: []
  },
  two: {
    base: "two",
    meaning: "the number 2",
    origin: "Old English twa — a pair",
    tagline: "The 'w' you hear nowhere is the thread that holds this family together.",
    words: [
      { word: "two",       parts: [{t:"two",b:true}],                                     gloss: "the number 2" },
      { word: "twin",      parts: [{t:"twin",b:true}],                                    gloss: "one of a pair" },
      { word: "twice",     parts: [{t:"twi",b:true},{t:"+"},{t:"ce"}],                    gloss: "two times" },
      { word: "twelve",    parts: [{t:"twelve",b:true}],                                  gloss: "ten plus two" },
      { word: "twenty",    parts: [{t:"twent",b:true},{t:"+"},{t:"y"}],                   gloss: "two tens" },
      { word: "between",   parts: [{t:"be"},{t:"+"},{t:"tween",b:true}],                  gloss: "by two" },
      { word: "twilight",  parts: [{t:"twi",b:true},{t:"+"},{t:"light"}],                 gloss: "half-light — the light of two" },
      { word: "twist",     parts: [{t:"twist",b:true}],                                   gloss: "to turn two things around each other" },
    ],
    phonicsBreaks: [
      { word: "two",    issue: "silent w — why is it there?" },
      { word: "twice",  issue: "the w suddenly appears" },
    ]
  }
};

window.WORD_FAMILIES = WORD_FAMILIES;
