// Static policy / about pages — window.POLICY selects which entry to render.
// Shares the art-body typography system from styles-article.css so these
// read like any other editorial page on Finance Edition.

const POLICY_META = {
  disclaimer: {
    title: "Disclaimer",
    kicker: "LEGAL · FINANCE EDITION",
    updated: "April 23, 2026",
    intro:
      "HowTo: Finance Edition (\"the Site\") is published by Legacy Bridge Holdings Atlanta, LLC (\"we,\" \"us,\" or \"our\"). The material on this Site is for general informational and educational purposes only. Read this page carefully before acting on anything you find here.",
    sections: [
      {
        h: "Not professional advice",
        p: [
          "Nothing on this Site constitutes financial, investment, legal, tax, insurance, accounting, or other professional advice. The content is editorial and general in nature — it does not take into account your personal circumstances, goals, risk tolerance, or obligations.",
          "Before making any decision that has financial or legal consequences — including but not limited to investing, borrowing, restructuring a business, filing taxes, hiring employees, or purchasing insurance — you should consult a licensed professional who can review your specific situation.",
          "Reading this Site does not create a fiduciary, advisory, attorney-client, accountant-client, or any other professional relationship between you and Legacy Bridge Holdings Atlanta, LLC, the Site's contributors (including Johnnie, Isabella, or Iris), or any of our affiliates.",
        ],
      },
      {
        h: "AI-generated and AI-assisted content",
        p: [
          "Much of the content on this Site is generated or assisted by Iris, an AI content engine operated by Legacy Bridge Holdings Atlanta, LLC. While we make reasonable efforts to produce accurate and useful information, AI-generated content may contain errors, omissions, outdated figures, or statements that do not reflect current law or current market conditions.",
          "We do not warrant that any AI-generated page is complete, current, or free of error. You are responsible for independently verifying any fact, figure, rule, or recommendation before relying on it.",
        ],
      },
      {
        h: "No guarantees of results",
        p: [
          "Any financial figures, rates of return, savings estimates, cost projections, benchmarks, or outcome examples shown on this Site are illustrative only. Past performance is not indicative of future results. We make no representation or warranty that following any guidance, checklist, or framework on this Site will produce the same result for you, or any particular result at all.",
          "Markets fluctuate. Tax law changes. Regulations change. Your results will depend on variables we cannot see and cannot control.",
        ],
      },
      {
        h: "Affiliate and sponsor relationships",
        p: [
          "Some articles on this Site include links to products, tools, or services offered by third parties — including but not limited to DoorBase, ReadyDocs, Origen, and other Legacy Bridge Holdings Atlanta, LLC properties, as well as unrelated commercial partners.",
          "Where a link is affiliate-tagged, sponsor-tagged, or a partner integration, we disclose the relationship inline (typically as \"PARTNER · [brand]\" or \"SPONSOR · [brand]\") and apply the standard rel=\"sponsored\" attribute. We may receive a commission, referral fee, or other consideration if you click through and engage with a partner.",
          "An affiliate or sponsor relationship does not change our editorial review. We do not publish recommendations we do not stand behind, but you should still do your own diligence before purchasing or signing up for anything.",
        ],
      },
      {
        h: "Third-party information and external links",
        p: [
          "This Site references external websites, regulatory bodies (including the IRS, SEC, CFPB, state agencies, and similar), and third-party sources. External links are provided for convenience. We do not control, endorse, or guarantee the content on any external site, and we are not responsible for changes to external resources after the date of publication.",
        ],
      },
      {
        h: "Jurisdiction and scope",
        p: [
          "The Site is operated from the United States and is primarily written for a United States audience. References to tax rules, regulatory bodies, corporate structures, and legal frameworks are United States-specific unless explicitly stated otherwise. If you are outside the United States, local rules may differ and you should consult a local professional.",
        ],
      },
      {
        h: "Changes to this Disclaimer",
        p: [
          "We may revise this Disclaimer from time to time. The \"Last updated\" date at the top of the page reflects the most recent revision. Continued use of the Site after a revision constitutes acceptance of the updated Disclaimer.",
        ],
      },
      {
        h: "Contact",
        p: [
          "Questions about this Disclaimer can be sent to hello@thehowtonetwork.com.",
          "Legacy Bridge Holdings Atlanta, LLC — Atlanta, Georgia.",
        ],
      },
    ],
  },

  privacy: {
    title: "Privacy Policy",
    kicker: "LEGAL · FINANCE EDITION",
    updated: "April 23, 2026",
    intro:
      "This Privacy Policy explains how Legacy Bridge Holdings Atlanta, LLC (\"we,\" \"us,\" or \"our\") collects, uses, and protects information when you visit HowTo: Finance Edition (\"the Site\"). By using the Site, you agree to the practices described here.",
    sections: [
      {
        h: "What we collect",
        p: [
          "**Information you provide directly.** When you create an account on the HowTo Network, we collect the email address, name, and authentication identifier (such as a Google or Apple account ID) you use to sign in. If you save a guide, follow a contributor, or submit feedback, we store that activity against your account.",
          "**Information collected automatically.** When you visit the Site, our servers and third-party services automatically log your IP address, browser type and version, device type, operating system, referring URL, pages viewed, and approximate geographic location derived from IP. We use cookies and similar technologies (such as local storage) for session management, preferences, and aggregate analytics.",
          "**Search queries.** When you use the search bar, we log the query text so Iris can build the page you asked for and so we can understand what readers are looking for. Search queries are not associated with your account unless you are signed in.",
        ],
      },
      {
        h: "How we use information",
        p: [
          "We use the information we collect to operate the Site, authenticate users across the HowTo Network, generate and improve content, respond to inquiries, detect and prevent abuse, and comply with legal obligations. We do not sell personal information to third parties.",
        ],
      },
      {
        h: "Sharing and disclosure",
        p: [
          "We share limited information with service providers who operate the Site on our behalf — including Supabase (database, authentication), Cloudflare (content delivery, bot protection), Anthropic (AI content generation), and Pexels (image hosting). These providers process information only under our instructions and are contractually required to protect it.",
          "We may disclose information when required by law, court order, or valid legal process, or to protect our rights, property, or safety, or the rights, property, or safety of our users or the public.",
          "If Legacy Bridge Holdings Atlanta, LLC is involved in a merger, acquisition, or asset sale, user information may be transferred as part of that transaction. We will notify affected users and post a notice on the Site before any such transfer.",
        ],
      },
      {
        h: "Cookies and tracking",
        p: [
          "We use cookies for authentication, to remember your lane preference (Personal or Business), and for aggregate analytics. You can disable cookies in your browser — the Site will still work, but some features (such as staying signed in) may not.",
          "We do not currently use cross-site advertising trackers.",
        ],
      },
      {
        h: "Retention",
        p: [
          "We retain account information for as long as the account is active. Server logs are retained for up to 90 days. Search query logs are retained as needed to operate Iris, typically up to 12 months in identifiable form and indefinitely in aggregated form.",
          "You can delete your HowTo Network account at any time by signing in and selecting \"Delete account\" from your profile, or by emailing hello@thehowtonetwork.com.",
        ],
      },
      {
        h: "Your rights",
        p: [
          "Depending on where you live, you may have the right to access, correct, delete, port, or restrict the processing of your personal information, and to object to processing or withdraw consent.",
          "To exercise these rights, email hello@thehowtonetwork.com. We will respond within the timeframe required by applicable law.",
          "If you are a California resident, you have additional rights under the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA). If you are in the European Economic Area or United Kingdom, you have rights under the GDPR and UK GDPR respectively. We comply with these frameworks where they apply.",
        ],
      },
      {
        h: "Children's privacy",
        p: [
          "The Site is not directed to children under 13. We do not knowingly collect personal information from children under 13. If you believe a child has provided us information, contact hello@thehowtonetwork.com and we will delete it.",
        ],
      },
      {
        h: "Security",
        p: [
          "We take reasonable technical and organizational measures to protect information. No method of transmission or storage is perfectly secure, however, and we cannot guarantee absolute security.",
        ],
      },
      {
        h: "Changes to this Privacy Policy",
        p: [
          "We may update this Privacy Policy from time to time. The \"Last updated\" date at the top reflects the latest revision. Continued use of the Site after a revision constitutes acceptance of the updated Policy.",
        ],
      },
      {
        h: "Contact",
        p: [
          "Privacy questions and rights requests: hello@thehowtonetwork.com.",
          "Legacy Bridge Holdings Atlanta, LLC — Atlanta, Georgia.",
        ],
      },
    ],
  },

  terms: {
    title: "Terms of Use",
    kicker: "LEGAL · FINANCE EDITION",
    updated: "April 23, 2026",
    intro:
      "These Terms of Use (\"Terms\") govern your access to and use of HowTo: Finance Edition (\"the Site\"), operated by Legacy Bridge Holdings Atlanta, LLC (\"we,\" \"us,\" or \"our\"). By accessing or using the Site, you agree to these Terms. If you do not agree, do not use the Site.",
    sections: [
      {
        h: "Eligibility",
        p: [
          "You must be at least 18 years old and capable of entering into a binding contract to use the Site or create an account. If you use the Site on behalf of an organization, you represent that you have authority to bind that organization to these Terms.",
        ],
      },
      {
        h: "License to use the Site",
        p: [
          "Subject to these Terms, we grant you a limited, revocable, non-exclusive, non-transferable license to access the Site for personal or internal business purposes. You may not reproduce, republish, resell, scrape, datamine, train machine-learning models on, or otherwise exploit the content of the Site beyond normal browser-based reading without our prior written permission.",
          "All content on the Site — including text, graphics, logos, images, audio, video, and software — is owned by Legacy Bridge Holdings Atlanta, LLC or its licensors and is protected by United States and international copyright, trademark, and other laws.",
        ],
      },
      {
        h: "Acceptable use",
        p: [
          "You agree not to use the Site in any way that: (a) violates any applicable law or regulation; (b) infringes the intellectual property or other rights of any third party; (c) transmits any virus, malware, or harmful code; (d) attempts to gain unauthorized access to any portion of the Site, any related systems, or the accounts of other users; (e) interferes with or disrupts the Site, the servers, or the networks connected to the Site; or (f) collects or harvests any information about other users.",
        ],
      },
      {
        h: "Informational only — not advice",
        p: [
          "The content on the Site is for general informational and educational purposes only. It is not financial, investment, legal, tax, insurance, accounting, or other professional advice, and no fiduciary, advisory, or professional relationship is created by your use of the Site. See our full Disclaimer at /disclaimer/.",
          "You are solely responsible for any decision you make based on content from the Site. Consult a licensed professional before acting on material that has financial or legal consequences.",
        ],
      },
      {
        h: "AI-generated content",
        p: [
          "A substantial portion of Site content is generated or assisted by Iris, an AI content engine. AI-generated content may contain errors, omissions, or statements that do not reflect current law, regulation, or market conditions. You are responsible for verifying accuracy before relying on any AI-generated content.",
        ],
      },
      {
        h: "Third-party links, affiliate relationships, and sponsorships",
        p: [
          "The Site may contain links to third-party websites, tools, and services — some of which are affiliate or sponsor relationships as described in the Disclaimer. We are not responsible for the content, practices, products, or services of any third party. Your interactions with any third party are governed by that party's terms and privacy policy, not ours.",
        ],
      },
      {
        h: "User accounts",
        p: [
          "If you create an account on the HowTo Network, you are responsible for maintaining the confidentiality of your credentials and for all activity that occurs under your account. Notify us immediately of any unauthorized use. We may suspend or terminate accounts that violate these Terms or applicable law.",
        ],
      },
      {
        h: "User submissions and feedback",
        p: [
          "If you submit feedback, suggestions, questions, or any other material to us, you grant us a non-exclusive, royalty-free, worldwide, perpetual license to use, reproduce, modify, and incorporate that material into the Site or related products without compensation to you.",
        ],
      },
      {
        h: "Disclaimers and no warranty",
        p: [
          "The Site and all content are provided \"AS IS\" and \"AS AVAILABLE\" without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, non-infringement, accuracy, completeness, or availability. We do not warrant that the Site will be uninterrupted, error-free, secure, or free of viruses or other harmful components.",
        ],
      },
      {
        h: "Limitation of liability",
        p: [
          "To the maximum extent permitted by law, Legacy Bridge Holdings Atlanta, LLC and its officers, directors, employees, agents, affiliates, licensors, and contributors shall not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages, or for any loss of profits, revenues, data, use, goodwill, or other intangible losses, arising out of or related to your use of or inability to use the Site, regardless of the legal theory and whether or not we have been advised of the possibility of such damages.",
          "Our total aggregate liability for all claims arising out of or related to your use of the Site shall not exceed one hundred U.S. dollars ($100).",
        ],
      },
      {
        h: "Indemnification",
        p: [
          "You agree to defend, indemnify, and hold harmless Legacy Bridge Holdings Atlanta, LLC and its officers, directors, employees, agents, affiliates, licensors, and contributors from and against any claims, damages, liabilities, costs, and expenses (including reasonable attorneys' fees) arising out of or related to: (a) your use of the Site; (b) your violation of these Terms; or (c) your violation of any rights of a third party.",
        ],
      },
      {
        h: "Termination",
        p: [
          "We may suspend or terminate your access to the Site at any time, with or without cause and with or without notice. All provisions of these Terms that by their nature should survive termination (including intellectual-property provisions, disclaimers, limitations of liability, and indemnification) shall survive.",
        ],
      },
      {
        h: "Governing law and venue",
        p: [
          "These Terms are governed by the laws of the State of Georgia, United States, without regard to conflict-of-laws principles. Any dispute arising out of or related to these Terms or the Site shall be brought exclusively in the state or federal courts located in Fulton County, Georgia, and you consent to the personal jurisdiction of those courts.",
        ],
      },
      {
        h: "Changes to these Terms",
        p: [
          "We may update these Terms from time to time. The \"Last updated\" date at the top reflects the latest revision. Continued use of the Site after a revision constitutes acceptance of the updated Terms.",
        ],
      },
      {
        h: "Contact",
        p: [
          "Questions about these Terms can be sent to hello@thehowtonetwork.com.",
          "Legacy Bridge Holdings Atlanta, LLC — Atlanta, Georgia.",
        ],
      },
    ],
  },

  about: {
    title: "About HowTo: Finance Edition",
    kicker: "THE JOURNAL · ABOUT",
    updated: "April 23, 2026",
    intro:
      "HowTo: Finance Edition is a plain-language reference for people who want straight answers about their money and their businesses — without the jargon, without the sales pitch, and without the condescension.",
    sections: [
      {
        h: "Two lanes. One terminal.",
        p: [
          "The Site runs on a simple split. **Personal** is for individuals and households — the quiet work of budgeting, saving, investing, borrowing, planning, and not getting taken advantage of. **Business** is for operators and founders — the real numbers behind running a company, from entity choice and payroll to margins, compliance, and exits.",
          "Most finance sites try to be either one or the other. We do both, on purpose. The person running a contracting business and the person trying to build a 3-month emergency fund are often the same person — they should not need two different sites to get answers.",
        ],
      },
      {
        h: "How the content is made",
        p: [
          "Content on Finance Edition is produced in three ways.",
          "**Iris.** Most of the reference pages on the Site are built by Iris, an AI content engine operated by Legacy Bridge Holdings Atlanta, LLC. Iris writes in plain English, cites regulatory bodies by name (IRS, SEC, CFPB), and flags the places where you should talk to a licensed professional. Iris is not infallible — see our Disclaimer for the limitations of AI-generated content.",
          "**Contributors.** Johnnie writes the Personal lane. Isabella writes the Business lane. Their bylines appear on editorial features — the longer, point-of-view pieces that sit alongside the reference content. When a contributor's name is on an article, a human wrote it or reviewed it end to end.",
          "**Partners.** Some articles include clearly-labeled partner integrations with tools we think are worth your time — DoorBase for rental investors, ReadyDocs for compliance tracking, and others. Those relationships are disclosed inline as PARTNER or SPONSOR blocks, and the standard rel=\"sponsored\" attribute is applied to every partner link.",
        ],
      },
      {
        h: "What you will not find here",
        p: [
          "You will not find specific stock picks, specific investment recommendations, specific tax advice, or specific legal guidance. That is not our role — it is the role of the licensed professional you hire after reading this Site.",
          "You will not find content that pretends to guarantee outcomes. Markets move. Tax law changes. Your situation is different from the person next to you. We can tell you how things generally work. We cannot tell you what will happen in your specific case.",
        ],
      },
      {
        h: "The HowTo Network",
        p: [
          "Finance Edition is one of several editions in The HowTo Network — a collection of plain-language reference sites covering different areas of modern life. The sister editions cover Home, Food, Beauty, Travel, Tech, and Family, with more on the way. One account works across every edition in the network.",
          "The network is operated by Legacy Bridge Holdings Atlanta, LLC, based in Atlanta, Georgia.",
        ],
      },
      {
        h: "Contact",
        p: [
          "For editorial tips, corrections, partnership inquiries, or anything else: hello@thehowtonetwork.com.",
          "Legacy Bridge Holdings Atlanta, LLC — Atlanta, Georgia.",
        ],
      },
    ],
  },
};

function renderInline(text) {
  if (typeof text !== "string") return text;
  const re = /(\*\*[^*]+\*\*|\*[^*]+\*)/g;
  const out = [];
  let last = 0;
  let m;
  let key = 0;
  while ((m = re.exec(text)) !== null) {
    if (m.index > last) out.push(text.slice(last, m.index));
    if (m[0].startsWith("**")) out.push(<strong key={key++}>{m[0].slice(2, -2)}</strong>);
    else out.push(<em key={key++}>{m[0].slice(1, -1)}</em>);
    last = re.lastIndex;
  }
  if (last < text.length) out.push(text.slice(last));
  return out;
}

function PolicyApp() {
  const slug = window.POLICY;
  const p = POLICY_META[slug];

  React.useEffect(() => {
    document.body.dataset.lane = "personal";
  }, []);

  if (!p) {
    return (
      <div style={{ padding: "80px 40px", textAlign: "center" }}>
        <h1>Page not found</h1>
        <p>No entry in POLICY_META for: <code>{String(slug)}</code></p>
      </div>
    );
  }

  return (
    <div className="art site" data-lane="personal">
      <Ticker />
      <Nav lane="personal" setLane={() => {}} />

      <header className="art-hero">
        <div className="art-kicker">{p.kicker}</div>
        <h1 className="art-title">{p.title}</h1>
        <p className="art-sub">{p.intro}</p>
        <div className="art-by">
          <div className="art-by__who">
            <span className="art-by__meta">
              <span>LAST UPDATED · {p.updated.toUpperCase()}</span>
            </span>
          </div>
        </div>
      </header>

      <article className="art-body">
        {p.sections.map((s, i) => (
          <section key={i}>
            <h2 className="art-h2">{s.h}</h2>
            {s.p.map((para, j) => (
              <p key={j} className="art-p">{renderInline(para)}</p>
            ))}
          </section>
        ))}
      </article>

      <NetworkBand />
      <Footer />
    </div>
  );
}

Object.assign(window, { POLICY_META, PolicyApp });
ReactDOM.createRoot(document.getElementById("root")).render(<PolicyApp />);
