// Criminal Defense — content data, keyed by city where it varies

const CITIES = {
  abq: {
    key: "abq",
    name: "Albuquerque",
    county: "Bernalillo County",
    district: "Second Judicial District",
    population: "~560k",
    landscapeH: "The corridors where cases get made.",
    flowH: "From Metro Court (401 Lomas) to District Court (400 Lomas).",
    flowP: "Most Albuquerque felonies start at Metro Court with a first appearance. The DA then chooses between a preliminary hearing in Metro (standard since 2018, when District Court reduced grand-jury panels) or a grand jury indictment for the most serious cases. A bind-over order moves the case across Lomas to the 2nd JDC, where a track is assigned and the trial clock begins (210/300/455 days under LR2-308).",
    courtsIntro: "Within four blocks of 4th and Lomas, four institutions decide nearly every criminal case in Bernalillo County. We practice in all of them.",
    role: "Deputy District Attorney",
    roleYears: "2nd JDA",
    courts: [
      {
        name: "Second Judicial District Court",
        sub: "Bernalillo County Courthouse — felonies, expungement petitions",
        addr: "400 Lomas Blvd. NW",
        city: "Albuquerque, NM 87102",
        phone: "(505) 841-8400",
        web: "seconddistrict.nmcourts.gov",
        notes: "~30 district judges. Felony DWI, Mental Health, Veterans, Young Adult, and Pre-Prosecution Diversion courts."
      },
      {
        name: "Bernalillo County Metropolitan Court",
        sub: "Misdemeanors, DWI, first appearances, prelim hearings",
        addr: "401 Lomas Blvd. NW",
        city: "Albuquerque, NM 87102",
        phone: "(505) 841-8151",
        web: "metro.nmcourts.gov",
        notes: "Court-of-record across all dockets since Oct 2024. 10 specialty programs incl. DWI Recovery and Behavioral Health Court."
      },
      {
        name: "Bernalillo County DA's Office",
        sub: "Prosecutes every felony in Bernalillo County",
        addr: "520 Lomas Blvd. NW",
        city: "Albuquerque, NM 87102",
        phone: "(505) 222-1099",
        web: "da2nd.nm.gov",
        notes: "DA Sam Bregman. Must be served on every expungement petition filed in ABQ."
      },
      {
        name: "Metropolitan Detention Center (MDC)",
        sub: "If a family member was just booked, they're here",
        addr: "100 Deputy Dean Miera Dr. SW",
        city: "Albuquerque, NM 87151",
        phone: "(505) 839-8700",
        web: "gtlinterface.bernco.gov",
        notes: "24/7 booking. Bond window at MDC; off-hours window at Metro Court 401 Lomas."
      }
    ],
    hot: [
      { k: "Route 66 corridor", v: "Operation Route 66 — 1,000+ drug arrests since Feb 2025 along East Central." },
      { k: "The Big I", v: "Federal fentanyl & meth cases tied to I-25 / I-40 interchange trafficking." },
      { k: "APD · BCSO · NMSP · UNMPD", v: "Four agencies running overlapping DWI checkpoints and saturation patrols." },
      { k: "Brady-Giglio list", v: "16 APD officers on the do-not-call list after the 2024–25 federal probe." }
    ],
    neighborhoods: ["Northeast Heights", "Westside", "International District", "Nob Hill / UNM", "South Valley", "North Valley", "Downtown"]
  },
  lc: {
    key: "lc",
    name: "Las Cruces",
    county: "Doña Ana County",
    district: "Third Judicial District",
    population: "~110k",
    landscapeH: "The checkpoints where cases get made.",
    flowH: "From the Magistrate Court to the Third Judicial District Court.",
    flowP: "A felony typically starts with a complaint in magistrate court — the magistrate judge sets conditions of release and schedules a preliminary examination. If PC is found, or the DA secures a grand jury indictment, the case moves to the Third JDC at 201 W. Picacho for arraignment, motion practice, and trial. Misdemeanors generally stay in magistrate court through resolution.",
    courtsIntro: "Understanding which court has jurisdiction over your case is the first step to defending it. Las Cruces and the Third Judicial District, end to end.",
    role: "Chief Deputy District Attorney",
    roleYears: "1st JDA",
    courts: [
      {
        name: "Third Judicial District Court",
        sub: "Doña Ana County felonies, civil, family, expungement",
        addr: "201 West Picacho Avenue",
        city: "Las Cruces, NM 88005",
        phone: "(575) 523-8200",
        web: "thirddistrictcourt.nmcourts.gov",
        notes: "All expungement petitions for Doña Ana County cases file here, regardless of court of origin."
      },
      {
        name: "Las Cruces Magistrate Court",
        sub: "Most misdemeanors, DWI, first appearances, felony complaints",
        addr: "110 Calle De Alegra",
        city: "Las Cruces, NM 88005",
        phone: "(575) 524-2814",
        web: "lascrucesmag.nmcourts.gov",
        notes: "First court date for LCPD, DASO, and NMSP arrests."
      },
      {
        name: "Doña Ana County DA's Office",
        sub: "Prosecutes state crimes in the Third Judicial District",
        addr: "845 North Motel Boulevard",
        city: "Las Cruces, NM 88007",
        phone: "(575) 524-6370",
        web: "thirddistrictda.com",
        notes: "Must be served on every Doña Ana expungement petition."
      },
      {
        name: "Doña Ana County Detention Center",
        sub: "Pretrial and short-sentence custody",
        addr: "1850 Copper Loop",
        city: "Las Cruces, NM 88005",
        phone: "(575) 525-1911",
        web: "donaanacounty.org",
        notes: "DASO inmate lookup for custody status and bond. Move fast on bond review in the first 24h."
      }
    ],
    hot: [
      { k: "I-25 BP checkpoint", v: "Northbound Border Patrol checkpoint produces federal & parallel state drug cases." },
      { k: "US 70 corridor", v: "Toward Alamogordo — K9 alerts, cash seizures, cannabis stops." },
      { k: "Licensed cannabis carve-out", v: "Legal NM operators stopped while moving legal product — federal/state conflict." },
      { k: "Military overlay", v: "White Sands, Holloman, Fort Bliss — state charges layered with UCMJ & clearance risk." }
    ],
    neighborhoods: ["Mesilla Valley", "University District", "East Mesa", "Picacho Hills", "Telshor", "Downtown"]
  }
};

// Practice areas
const PRACTICE = [
  {
    key: "dwi",
    label: "DWI",
    h: "DWI & Aggravated DWI",
    statute: "NMSA § 66-8-102",
    blurb: "First conviction is a misdemeanor (90 days, $500). Penalties escalate fast — fourth offense is a fourth-degree felony with mandatory 6-month prison.",
    items: [
      "Stop · field sobriety · breath/blood challenges",
      "10-day MVD hearing request after arrest",
      "Aggravated DWI (BAC ≥ 0.16, refusal, injury)",
      "Felony fourth-offense DWI bound over to District Court",
      "Post-HB 8 (2025): expanded blood-draw authority + cannabis impairment in MVC",
      "Dismissed/deferred MVC DWI may now qualify for non-conviction expungement"
    ]
  },
  {
    key: "drugs",
    label: "Drugs",
    h: "Drug charges & cannabis",
    statute: "NMSA §§ 30-31-1 to 30-31-41",
    blurb: "Cannabis is legal for adults — controlled substances and trafficking remain aggressively prosecuted. Trafficking starts at a 2nd-degree felony (9 years).",
    items: [
      "Possession — petty misdemeanor through 4th-degree felony",
      "Distribution & trafficking — 2nd-degree first offense, 1st-degree on repeat",
      "Federal cases tied to fentanyl & meth (I-25 / I-40 / Border Patrol)",
      "Cannabis-and-gun federal/state conflict (Hemani pending)",
      "Licensed NM cannabis operators stopped at BP checkpoints",
      "Johnn served on the NM Cannabis Law Section board"
    ]
  },
  {
    key: "assault",
    label: "Assault",
    h: "Assault & battery",
    statute: "NMSA §§ 30-3-1 to 30-3-5",
    blurb: "Simple assault is a petty misdemeanor (6 months). Aggravated battery with great bodily harm or a deadly weapon is a third-degree felony (3 years).",
    items: [
      "Witness credibility · police-report inconsistencies",
      "Self-defense & lack-of-intent positioning",
      "Aggravated battery enhancements",
      "Restraining-order interplay",
      "Plea positioning to avoid felony record where facts allow"
    ]
  },
  {
    key: "dv",
    label: "DV",
    h: "Domestic violence",
    statute: "Crimes Against Household Members Act — NMSA §§ 30-3-10 to 30-3-18",
    blurb: "Convictions trigger the longest expungement waiting period in NM (10 years) and affect custody, licensing, gun rights, and immigration.",
    items: [
      "Battery on a household member — magistrate first, district on aggravation",
      "Aggravated battery against a household member — 3rd-degree felony",
      "No-contact orders and DVSTEP (ABQ Metro) referrals",
      "Firearm rights & immigration collateral consequences",
      "Resolve the first time — the 10-year clock matters"
    ]
  },
  {
    key: "felony",
    label: "Felony",
    h: "Felony defense",
    statute: "NMSA § 31-18-15",
    blurb: "Base sentences: 4th-degree 18 months · 3rd-degree 3 years · 2nd-degree 9 years · 1st-degree 18 years. Habitual & enhancement additions stack on top.",
    items: [
      "First appearance · prelim hearing · grand jury",
      "Motion practice & evidence suppression",
      "Plea negotiations before offers narrow",
      "2nd JDC three-track case management (LR2-308): 210 / 300 / 455 days",
      "Mitigation work at sentencing",
      "Habitual offender enhancement defense"
    ]
  },
  {
    key: "misd",
    label: "Misdemeanor",
    h: "Misdemeanor defense",
    statute: "NMSA § 31-19-1",
    blurb: "Up to 1 year jail and $1,000 fine. Shows on background checks for years — at minimum the 2-year expungement waiting period.",
    items: [
      "Shoplifting · trespass · disorderly conduct",
      "Traffic & ordinance violations",
      "Magistrate / metropolitan court practice",
      "Diversion eligibility where facts allow",
      "Expungement planning into the defense"
    ]
  },
  {
    key: "probation",
    label: "Probation",
    h: "Probation violations",
    statute: "NMSA § 31-21-15",
    blurb: "Violation can mean serving the full original sentence with no credit for probation time. Lower standard of proof; immediate consequences.",
    items: [
      "Missed check-ins · failed tests · new arrests",
      "Restitution shortfalls · technical violations",
      "Anticipate State's framing — Johnn built these cases before",
      "Time-served and conditions modification motions"
    ]
  }
];

// DWI escalator — sentencing curve
const DWI_TIERS = [
  { offense: "1st", level: "Misdemeanor", maxJail: 90, mandJail: 0, fine: 500, label: "1st offense", note: "Up to 90 days jail · $500 fine · mandatory community service · 90-day license revocation" },
  { offense: "2nd", level: "Misdemeanor", maxJail: 364, mandJail: 4, fine: 1000, label: "2nd offense", note: "Up to 364 days · mandatory jail · ignition interlock · DWI school" },
  { offense: "3rd", level: "Misdemeanor", maxJail: 364, mandJail: 30, fine: 1000, label: "3rd offense", note: "Up to 364 days · 30 days mandatory · ignition interlock" },
  { offense: "4th", level: "Felony (4th deg.)", maxJail: 540, mandJail: 180, fine: 5000, label: "4th offense — felony", note: "18 months prison · 6 months mandatory · bound over to District Court" },
  { offense: "5th", level: "Felony (4th deg.)", maxJail: 730, mandJail: 365, fine: 5000, label: "5th offense", note: "2 years prison · 1 year mandatory" },
  { offense: "6th", level: "Felony (3rd deg.)", maxJail: 1095, mandJail: 730, fine: 5000, label: "6th offense", note: "30 months prison · 2 years mandatory" },
  { offense: "7th", level: "Felony (3rd deg.)", maxJail: 1095, mandJail: 1095, fine: 5000, label: "7th offense", note: "3 years prison · 3 years mandatory" },
  { offense: "8th+", level: "Felony (2nd deg.)", maxJail: 4380, mandJail: 3650, fine: 5000, label: "8th+ offense", note: "12 years prison · 10 years mandatory" }
];

// Felony grid
const FELONY_GRID = [
  { deg: "4th degree", years: 1.5, fine: 5000, ex: "DWI 4th, low-level possession, breaking & entering", waitYears: 4 },
  { deg: "3rd degree", years: 3, fine: 5000, ex: "Aggravated battery w/ great bodily harm, DV aggravated", waitYears: 6 },
  { deg: "2nd degree", years: 9, fine: 12500, ex: "Drug trafficking (1st), armed robbery", waitYears: 8 },
  { deg: "1st degree", years: 18, fine: 17500, ex: "Trafficking (repeat), most serious violent felonies", waitYears: 10 }
];

// What to do if arrested
const ARREST_STEPS = [
  { n: "01", h: "Stop talking.", b: "The right to remain silent exists for a reason. Anything you say to officers, jailers, or other detainees can be used against you. Do not explain. Do not argue. Do not try to talk your way out." },
  { n: "02", h: "Ask for a lawyer.", b: "Once you clearly request an attorney, questioning must stop. Make the request unambiguous: \"I want a lawyer. I am not answering questions without one.\"" },
  { n: "03", h: "Do not consent to searches.", b: "If officers ask to search your car, your home, or your phone, you can decline. They may search anyway with a warrant or probable cause — but consenting waives challenges later." },
  { n: "04", h: "Document what you remember.", b: "Once you are released, write down everything. Times, names, what officers said, what you said, who was present. Memory fades fast and police reports become the only record otherwise." },
  { n: "05", h: "Call a defense attorney before your first court date.", b: "Arraignment is not the place to start your defense. The earlier an attorney is involved, the more options you have — bond conditions, charging decisions, and detention motions all happen in the first 24 hours." }
];

// Process timeline
const PROCESS = [
  { n: "01", h: "Arrest & booking", b: "Custody, processing, conditions of release or first appearance.", city: "MDC (ABQ) · DACDC (LC)" },
  { n: "02", h: "First appearance", b: "Judge sets bond; State decides on pretrial detention motion. PC must be established within 10 days in custody, 60 days out.", city: "Metro Court · Magistrate Court" },
  { n: "03", h: "Prelim or grand jury", b: "State must show probable cause. The first real chance to challenge the case. ABQ uses preliminary hearings by default since 2018.", city: "Metro / Magistrate" },
  { n: "04", h: "Bind-over to District", b: "Felony case crosses Lomas (ABQ) or moves to 3rd JDC (LC). Track is assigned, trial clock begins.", city: "2nd JDC · 3rd JDC" },
  { n: "05", h: "Discovery & motions", b: "Police reports, witness statements, lab results, video. Suppression motions and motions to dismiss live here.", city: "District Court" },
  { n: "06", h: "Plea or trial", b: "Most cases resolve at this stage. The right defense knows what offers are realistic and when to push for diversion.", city: "District Court" },
  { n: "07", h: "Sentencing", b: "If convicted, mitigation still matters. Mandatory minimums, habitual additions, and program eligibility all play here.", city: "District Court" },
  { n: "08", h: "Expungement", b: "Step two of a complete defense. Dismissals and acquittals after 1 year. Convictions after 2–10 years.", city: "Same district where the case originated" }
];

// FAQ
const CD_FAQS = [
  { q: "How fast do I need to call after an arrest?", a: "Bond conditions, charging decisions, and detention motions all happen in the first 24 hours. If a family member was just booked at MDC in Albuquerque or DACDC in Las Cruces, call 505.585.1235 — Johnn answers the phone himself, runs intake, and stays on the case from first contact through final disposition." },
  { q: "Is the consultation really free?", a: "Yes. Initial consultations are free for criminal defense and expungement matters across Albuquerque, Las Cruces, Santa Fe, and the rest of the state. We'll tell you where you stand before you commit to anything." },
  { q: "What does it cost?", a: "Most matters run on flat-fee arrangements — first-offense DWI, simple misdemeanors, many felonies that resolve before trial. Hourly billing applies where scope cannot be predicted. Hybrid arrangements (flat through a stage, hourly past it) are common. Affordable monthly payment plans are available. The free consultation includes a clear picture of cost before you commit." },
  { q: "Can a DWI be expunged in New Mexico?", a: "A DWI conviction cannot be expunged — § 29-3A-5(G) excludes alcohol- and drug-related DWI convictions permanently. But a dismissed-and-deferred DWI under the Motor Vehicle Code may qualify under the non-conviction track after a 2024–2025 amendment. The interpretation is unsettled across districts and currently before the NM Court of Appeals." },
  { q: "What does a former prosecutor actually do differently?", a: "Three concrete things. First: he spots weak charges that prosecutors throw in to inflate plea leverage and moves to dismiss them early. Second: he knows what evidence the State actually needs to prove a case and where the gaps usually are. Third: he understands which prosecutors will negotiate, which will not, and what motivates each one — because he sat in those rooms for over a decade." },
  { q: "Do you handle federal cases?", a: "We handle state cases and state-federal overlap (Border Patrol checkpoint cases, parallel cannabis cases, drug trafficking with federal components). Pure federal indictments — full federal court representation — are by separate engagement; we'll tell you up front whether your matter is in our wheelhouse." },
  { q: "What's the difference between Metro Court and District Court in Albuquerque?", a: "Metro Court (401 Lomas) handles all Albuquerque misdemeanors, every DWI, traffic, ordinance violations, civil up to $10,000, plus felony first appearances and prelim hearings. District Court (400 Lomas, directly across the street) handles every Bernalillo County felony, civil over $10,000, domestic relations, and every expungement petition. A felony case starts at Metro and binds over to District after PC is established." },
  { q: "I was arrested at the I-25 Border Patrol checkpoint near Las Cruces. Is that federal or state?", a: "Often both. Border Patrol stops produce federal cases, parallel state prosecutions, and sometimes neither. Licensed New Mexico cannabis operators moving legal product within the state raise distinct preemption questions. The right answer depends on what was seized, who filed, and where the stop happened. Call us." },
  { q: "Can I expunge a felony?", a: "Some — under § 29-3A-5. Waiting periods: 4 years for 4th degree, 6 for 3rd, 8 for 2nd, 10 for 1st. Five categories are permanently excluded: offenses against a child, offenses causing great bodily harm or death, SORNA sex offenses, embezzlement, and DWI alcohol/drug offenses. Conviction expungement is discretionary — the court has to find that justice will be served, weighing five factors. A hearing is mandatory and a strong written narrative is what carries petitions." },
  { q: "How long do expungement waiting periods run from?", a: "From the date you completed your last sentence in any jurisdiction — not just the case you want expunged. If you finished probation on one case three years ago but parole on another six months ago, the clock runs from six months ago." }
];

CITIES.sf = {
  key: "sf",
  name: "Santa Fe",
  county: "Santa Fe County",
  district: "First Judicial District",
  population: "~89k",
  landscapeH: "The dockets where cases get made.",
  flowH: "From the Magistrate Court to the First Judicial District Court.",
  flowP: "A felony typically starts with a complaint in magistrate court — the magistrate judge sets conditions of release and schedules a preliminary examination. If PC is found, or the DA secures a grand jury indictment, the case moves to the First JDC at 225 Montezuma for arraignment, motion practice, and trial. Misdemeanors generally stay in magistrate court through resolution.",
  courtsIntro: "Santa Fe, Rio Arriba, and Los Alamos counties all run through the First Judicial District. Knowing which court holds your case — and how that office charges it — is the first step to defending it.",
  role: "Chief Deputy District Attorney",
  roleYears: "1st JDA",
  courts: [
    {
      name: "First Judicial District Court",
      sub: "Santa Fe, Rio Arriba, and Los Alamos felonies, civil, family, expungement",
      addr: "225 Montezuma Avenue",
      city: "Santa Fe, NM 87501",
      phone: "(505) 455-8146",
      web: "firstdistrictcourt.nmcourts.gov",
      notes: "Adult Drug Treatment Court and other 1st JDC specialty programs run here."
    },
    {
      name: "Santa Fe County Magistrate Court",
      sub: "Misdemeanors, traffic, ordinance, felony first appearances",
      addr: "2056 Galisteo Street",
      city: "Santa Fe, NM 87505",
      phone: "(505) 984-9914",
      web: "nmmagistratecourts.nmcourts.gov",
      notes: "First court date for SFPD, SFSO, and NMSP arrests in Santa Fe County."
    },
    {
      name: "1st Judicial District Attorney's Office",
      sub: "Prosecutes state crimes in the 1st JDC",
      addr: "P.O. Box 2041",
      city: "Santa Fe, NM 87504",
      phone: "(505) 827-5000",
      web: "nmdas.com",
      notes: "Johnn served as Chief Deputy DA of this office — he knows how it screens, charges, and tries cases."
    },
    {
      name: "Santa Fe County Adult Detention Facility",
      sub: "Pretrial and short-sentence custody",
      addr: "28 Camino Justicia",
      city: "Santa Fe, NM 87508",
      phone: "(505) 428-3231",
      web: "santafecountynm.gov/corrections",
      notes: "Santa Fe County inmate lookup for custody status. Move fast on bond review in the first 24h."
    }
  ],
  hot: [
    { k: "1st JDC reach", v: "Covers Santa Fe, Rio Arriba, and Los Alamos counties — three different prosecutorial cultures in one judicial district." },
    { k: "Capitol traffic", v: "Heightened scrutiny on cases involving state employees, lobbying, and public-corruption adjacent fact patterns." },
    { k: "Rio Arriba & Los Alamos", v: "Rural docket dynamics and federal-lab overlay differ from the Santa Fe city core." },
    { k: "Drug Court & diversion", v: "Active Adult Drug Treatment Court — Johnn knows when those programs are the right ask." }
  ],
  neighborhoods: ["Downtown", "Eastside / Canyon Road", "Southside", "Tierra Contenta", "Eldorado", "Rio Arriba (1st JDC)", "Los Alamos (1st JDC)"]
};

Object.assign(window, { CITIES, PRACTICE, DWI_TIERS, FELONY_GRID, ARREST_STEPS, PROCESS, CD_FAQS });
