// Budget landing data
const BUDGET_LANES = [
  {
    id: "before-you-go",
    num: "I",
    chapter: "CHAPTER I",
    title: "Before You Go",
    titleEm: "The math you owe yourself.",
    coord: "USD · HOME RATE",
    desc: "Pre-trip budgeting, savings targets, currency. The work you do at the kitchen table buys you the freedom to stop checking your phone at the cafe.",
    img: "https://images.unsplash.com/photo-1554224155-6726b3ff858f?w=1800&q=85",
    bullets: [
      { l: "Savings target", v: "Trip cost ÷ months out · 1.15 buffer" },
      { l: "Currency rate", v: "Lock 60 days out · re-check at T-14" },
      { l: "Cards", v: "0% FX card + ATM card · no debit at register" },
    ],
  },
  {
    id: "getting-there",
    num: "II",
    chapter: "CHAPTER II",
    title: "Getting There",
    titleEm: "Flights, trains, the way in.",
    coord: "FARE · ECONOMY",
    desc: "Flights, transport cost breakdown. The line item people guess wrong on by 30%. Knowing the real number lets you fund the thing you actually flew across the world for.",
    img: "https://images.unsplash.com/photo-1542296332-2e4473faf563?w=1800&q=85",
    bullets: [
      { l: "International flight", v: "$650–$1,400 · Economy long-haul" },
      { l: "Domestic / regional", v: "$120–$320 · Book 6 weeks out" },
      { l: "Rail, multi-day", v: "$180–$420 · Eurail, JR Pass tier" },
    ],
  },
  {
    id: "on-the-ground",
    num: "III",
    chapter: "CHAPTER III",
    title: "On the Ground",
    titleEm: "What a day actually costs.",
    coord: "PER DIEM · LOCAL",
    desc: "Daily spend by destination tier. Budget, mid, high. Not aspirational numbers — the floors and ceilings reported by people who actually went and kept receipts.",
    img: "https://images.unsplash.com/photo-1528569937393-ee892b976859?w=1800&q=85",
    bullets: [
      { l: "Budget tier", v: "$45–$85 / day · SE Asia, Eastern Europe" },
      { l: "Mid tier", v: "$120–$220 / day · W. Europe, Japan, US" },
      { l: "High tier", v: "$280–$520 / day · Iceland, Switzerland" },
    ],
  },
  {
    id: "hidden-costs",
    num: "IV",
    chapter: "CHAPTER IV",
    title: "The Hidden Costs",
    titleEm: "The line items nobody warned you about.",
    coord: "MISC · UNBUDGETED",
    desc: "Visa fees, travel insurance, tipping culture, departure taxes, eSIMs, baggage. The 8% of the budget that wrecks the budget when you forget it's there.",
    img: "https://images.unsplash.com/photo-1580674684081-7617fbf3d745?w=1800&q=85",
    bullets: [
      { l: "Visa & entry fees", v: "$0–$185 · Check 90 days out" },
      { l: "Travel insurance", v: "5–10% of trip cost · always" },
      { l: "Tipping & service", v: "5–22% varies · know before you sit" },
    ],
  },
  {
    id: "bring-it-home",
    num: "V",
    chapter: "CHAPTER V",
    title: "Bring It Home",
    titleEm: "What you spent. What you learned.",
    coord: "RECONCILE · EOM",
    desc: "Tracking spend in the moment, post-trip reconciliation, the one spreadsheet that pays for itself by the next trip. The receipts you actually save.",
    img: "https://images.unsplash.com/photo-1554224154-26032cdc0f00?w=1800&q=85",
    bullets: [
      { l: "Daily log", v: "5 min/night · category + amount" },
      { l: "Post-trip", v: "Reconcile within 14 days · not 14 weeks" },
      { l: "Variance", v: "±15% on plan = solid · ±30% = revisit" },
    ],
  },
];

// Currency exchange board — the hero centerpiece
const BUDGET_RATES = [
  { from: "USD", to: "EUR", rate: "0.918", label: "EUROZONE", trend: "↑" },
  { from: "USD", to: "GBP", rate: "0.789", label: "UNITED KINGDOM", trend: "↓" },
  { from: "USD", to: "JPY", rate: "151.42", label: "JAPAN", trend: "↑" },
  { from: "USD", to: "THB", rate: "36.80", label: "THAILAND", trend: "→" },
  { from: "USD", to: "MXN", rate: "16.45", label: "MEXICO", trend: "↓" },
  { from: "USD", to: "CHF", rate: "0.876", label: "SWITZERLAND", trend: "↑" },
];

// Chapter I — savings ladder
const BUDGET_SAVINGS = [
  { months: "12 mo", trip3k: "$250", trip6k: "$500", trip12k: "$1,000" },
  { months: "9 mo", trip3k: "$334", trip6k: "$667", trip12k: "$1,334" },
  { months: "6 mo", trip3k: "$500", trip6k: "$1,000", trip12k: "$2,000" },
  { months: "3 mo", trip3k: "$1,000", trip6k: "$2,000", trip12k: "$4,000" },
  { months: "1 mo", trip3k: "$3,000", trip6k: "$6,000", trip12k: "$12,000" },
];

// Chapter II — fare cost breakdown
const BUDGET_FARES = [
  { cat: "INTL · LONG-HAUL", route: "NYC → Tokyo, economy", low: "$680", mid: "$1,150", high: "$1,820", note: "Book at T-90 days for the floor." },
  { cat: "INTL · MEDIUM", route: "NYC → London, economy", low: "$420", mid: "$680", high: "$1,100", note: "Mon/Tue departures cheaper than weekends." },
  { cat: "DOMESTIC", route: "Coast-to-coast US, economy", low: "$210", mid: "$340", high: "$520", note: "Tuesday is the cheapest day to depart." },
  { cat: "REGIONAL", route: "London → Rome, economy", low: "$48", mid: "$120", high: "$280", note: "Ryanair / EasyJet beat carriers by 60%." },
  { cat: "RAIL · EUROPE", route: "Eurail Global, 7-day", low: "$348", mid: "$418", high: "$498", note: "Cheaper than 4 individual high-speed legs." },
  { cat: "RAIL · JAPAN", route: "JR Pass, 7-day", low: "$345", mid: "$345", high: "$345", note: "Fixed price. Worth it if you do 2+ shinkansen." },
];

// Chapter III — daily per-diem by tier
const BUDGET_TIERS = [
  {
    tier: "BUDGET",
    range: "$45 – $85 / day",
    desc: "Hostels with a private room or guesthouses, two meals out, one street food, public transit, one paid attraction every other day.",
    cities: ["Hanoi", "Bangkok", "Kraków", "Mexico City", "Lima"],
    breakdown: [
      { l: "Bed", v: "$18–$32" },
      { l: "Food", v: "$15–$28" },
      { l: "Transit", v: "$3–$8" },
      { l: "Activities", v: "$9–$17" },
    ],
  },
  {
    tier: "MID",
    range: "$120 – $220 / day",
    desc: "3-star hotel or rental, three meals out (one good one), Uber when needed, a paid attraction or museum daily, two coffees.",
    cities: ["Lisbon", "Tokyo", "Berlin", "Buenos Aires", "Athens"],
    breakdown: [
      { l: "Bed", v: "$70–$120" },
      { l: "Food", v: "$35–$60" },
      { l: "Transit", v: "$8–$18" },
      { l: "Activities", v: "$10–$24" },
    ],
  },
  {
    tier: "HIGH",
    range: "$280 – $520 / day",
    desc: "4-star+ hotel or design rental, every meal out, taxis everywhere, museum-pass days, the wine pairing instead of the glass.",
    cities: ["Reykjavík", "Zürich", "Paris peak", "Sydney", "Singapore"],
    breakdown: [
      { l: "Bed", v: "$180–$340" },
      { l: "Food", v: "$70–$120" },
      { l: "Transit", v: "$15–$30" },
      { l: "Activities", v: "$20–$40" },
    ],
  },
];

// Chapter IV — hidden cost line items
const BUDGET_HIDDEN = [
  { glyph: "V", coord: "VISA · ENTRY", title: "Visa & Entry Fees", desc: "Some are free (most of Europe for US passports), some are $185 (Brazil eVisa, India eVisa). Always check 90 days out — visa rules change quietly and stranding stories are 80% visa stories.", spec: "$0 – $185 · CHECK T-90" },
  { glyph: "I", coord: "INSURANCE · MED", title: "Travel Insurance", desc: "Standard tier $30–$80 covers cancellation. Add medical & evacuation ($50–$120) for international. CFAR is $100–$200 and worth it for trips over $5k. Buy within 14 days of first booking.", spec: "5–10% OF TRIP COST" },
  { glyph: "T", coord: "TIP · SERVICE", title: "Tipping Culture", desc: "US: 18–22% restaurant. Europe: 5–10% if no service charge. Japan: do not tip. SE Asia: round up. Mexico: 10–15%. The cultural mistake costs $40 across a trip — knowing the rule costs nothing.", spec: "5–22% · KNOW BEFORE SITTING" },
  { glyph: "E", coord: "DATA · eSIM", title: "Connectivity", desc: "Airalo, Holafly, or local SIM at the airport. $8–$28 for a 7-day data plan beats $10/day roaming on your home carrier. Activate before takeoff so you land connected. Skip the airport kiosk markup.", spec: "$8 – $28 · 7-DAY DATA" },
  { glyph: "B", coord: "BAG · CHECKED", title: "Baggage Fees", desc: "Basic economy doesn't include checked bags. Round-trip checked bag is $60–$140. If you're flying low-cost European carriers, the $40 carry-on fee shows up at the gate — pre-pay online to halve it.", spec: "$60 – $140 RT CHECKED" },
  { glyph: "X", coord: "EXIT · DEPARTURE", title: "Departure Taxes", desc: "Most countries fold this into the ticket. A few don't — Belize ($40 cash), Costa Rica ($29), Indonesia (varies). Carry $50 USD cash for exits to be safe. Cards don't always work at counter terminals.", spec: "$0 – $50 · USD CASH READY" },
];

// Chapter V — reconciliation framework (ledger style)
const BUDGET_LEDGER = [
  { row: "01", cat: "Flights", planned: "$1,200", actual: "$1,180", variance: "−$20", note: "Booked at T-90 sweet spot." },
  { row: "02", cat: "Accommodation", planned: "$1,400", actual: "$1,520", variance: "+$120", note: "Two nights upgraded to balcony." },
  { row: "03", cat: "Food", planned: "$650", actual: "$840", variance: "+$190", note: "Three nicer dinners than planned." },
  { row: "04", cat: "Transport", planned: "$280", actual: "$235", variance: "−$45", note: "Walked more than expected." },
  { row: "05", cat: "Activities", planned: "$380", actual: "$420", variance: "+$40", note: "Added one day trip." },
  { row: "06", cat: "Hidden costs", planned: "$220", actual: "$295", variance: "+$75", note: "Forgot baggage, eSIM, tips." },
  { row: "07", cat: "TOTAL", planned: "$4,130", actual: "$4,490", variance: "+$360", note: "8.7% over plan. Within tolerance." },
];

const BUDGET_FAQS = [
  { q: "How much should I budget for a two-week international trip?", a: "Floor: ~$2,500 for SE Asia or Eastern Europe (excl. flight) at the budget tier. Mid: ~$4,500 for Western Europe, Japan, or Australia. High: ~$8,000+ for Iceland, Switzerland, or Scandinavia. Add $700–$1,400 for the international flight on top. The right total is the per-diem of your destination tier × 14 + flight + 10% buffer for hidden costs." },
  { q: "What's the cheapest way to handle currency abroad?", a: "Two-card stack: a 0%-FX credit card for everything you can pay by card (Capital One Venture, Chase Sapphire, Schwab Investor Checking has no ATM fees), and a debit card for ATM withdrawals on the local currency. Skip airport currency kiosks (8–12% spread) and your home bank's currency order desk (3–5% spread). Pull cash from a bank ATM on arrival for under 1%." },
  { q: "Should I use a debit card or credit card abroad?", a: "Credit card at the register, debit card at the ATM. Debit at the register is a fraud risk — if it's stolen, your bank account empties before you notice. Credit is also where the FX-fee waivers and travel insurance live. Use debit only at bank-branded ATMs (not standalone kiosks) for cash, and only as much cash as you'll spend in 4–5 days." },
  { q: "How much cash should I actually carry?", a: "Cash for 4–5 days of cash-only spending — markets, taxis, tips. For most destinations that's $80–$200 USD-equivalent. Carry the rest on cards. Refill at bank ATMs. Keep $50 USD in a separate pocket as emergency-exit cash. Don't carry the whole trip's cash — pickpocket math is brutal." },
  { q: "What's a realistic daily food budget?", a: "Budget tier: $15–$28/day means street food, market lunch, one cheap dinner. Mid tier: $35–$60/day is two sit-downs and a coffee. High tier: $70–$120/day is three sit-downs with one tasting-menu night per week. Western Europe and Japan run high on the food line because casual restaurants are still $20+ per entrée — adjust." },
  { q: "How do I avoid getting destroyed by hidden fees?", a: "Pre-trip: read the airline's baggage policy, buy your eSIM at home, check visa requirements at 90 days out. On arrival: get cash from a bank ATM (not airport kiosk), set up local transit cards (Suica, Octopus, Oyster — all rechargeable). Tipping: research the country's culture before you sit down at the first restaurant. The 8% hidden-cost line item is what makes budgets fail." },
  { q: "Is travel insurance actually worth it?", a: "For international trips: yes, always. Standard tier ($30–$80) covers trip cancellation. Add medical & evacuation ($50–$120) — evacuation alone runs $25k–$100k if something goes wrong. The premium is 5–10% of trip cost; the coverage is 100x that. CFAR is the upgrade that lets you cancel for any reason and recover ~75%, but it must be purchased within 14–21 days of first booking." },
  { q: "How do I track spending without making the trip about spending?", a: "5 minutes a night, before bed. Open a notes app or a spreadsheet, log the day's amount by category — bed, food, transit, activities, other. That's it. Don't reconcile mid-trip. Don't optimize while you're there. The point is one number per category at the end of the day, so when you reconcile within 14 days of getting home, you actually have the data." },
];

const BUDGET_READING = [
  { tag: "Budget", duration: "11 min", title: "How to Travel Japan on a Budget", em: "Japan.", slug: "japan-on-a-budget", img: "https://images.unsplash.com/photo-1545569341-9eb8b30979d9?w=1200&q=80" },
  { tag: "Currency", duration: "7 min", title: "How to Find Cheap Flights Without Tedious Tab-Hopping", em: "Without tab-hopping.", slug: "find-cheap-flights", img: "https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=1200&q=80" },
  { tag: "Itinerary", duration: "10 min", title: "How to Plan a Two Week Trip From Scratch", slug: "plan-two-week-trip", img: "https://images.unsplash.com/photo-1488646953014-85cb44e25828?w=1200&q=80" },
  { tag: "Accommodation", duration: "9 min", title: "How to Book a Hotel That Isn't a Tourist Trap", em: "Tourist trap.", slug: "book-accommodation-tourist-trap", img: "https://images.unsplash.com/photo-1582719508461-905c673771fd?w=1200&q=80" },
];

Object.assign(window, { BUDGET_LANES, BUDGET_RATES, BUDGET_SAVINGS, BUDGET_FARES, BUDGET_TIERS, BUDGET_HIDDEN, BUDGET_LEDGER, BUDGET_FAQS, BUDGET_READING });
