// Family support guide pages, Newly Diagnosed (deep rewrite), Seizure Types,
// Developmental Considerations, NDIS Navigation, Carer Support.

// -------- Newly Diagnosed (replaces the lighter version in pages-3) -------

// Auto-height, same-origin iframe hosting the standalone SCN2A Navigator tool.
// Loaded in embed mode (?embed) so it drops its own page header but keeps its
// non-dismissible safety disclaimer. Self-contained; runs offline.
function NavigatorToolEmbed() {
  const ref = React.useRef(null);
  React.useEffect(() => {
    const iframe = ref.current;
    if (!iframe) return;
    let ro;
    const setH = () => {
      try {
        const doc = iframe.contentDocument;
        if (!doc || !doc.body) return;
        const h = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight);
        if (h) iframe.style.height = h + 'px';
      } catch (e) { /* cross-origin guard */ }
    };
    const onLoad = () => {
      setH();
      try {
        const doc = iframe.contentDocument;
        ro = new ResizeObserver(setH);
        ro.observe(doc.documentElement);
        doc.addEventListener('click', () => setTimeout(setH, 380), true);
        if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(setH);
      } catch (e) { /* ignore */ }
      [400, 900, 1600, 2600].forEach(ms => setTimeout(setH, ms));
    };
    iframe.addEventListener('load', onLoad);
    if (iframe.contentDocument && iframe.contentDocument.readyState === 'complete') onLoad();
    return () => { iframe.removeEventListener('load', onLoad); if (ro) ro.disconnect(); };
  }, []);
  return (
    <section style={{ background: '#fff', borderTop: '1px solid #D5CFBF', padding: '48px 0 0' }}>
      <div className="container" style={{ marginBottom: 8 }}>
        <div className="eyebrow" style={{ color: '#0D1B2A' }}>Interactive tool</div>
      </div>
      <iframe
        ref={ref}
        src="scn2a-navigator/index.html?embed"
        title="SCN2A Navigator, an evidence-grounded guide for families"
        loading="lazy"
        scrolling="no"
        style={{ width: '100%', border: 0, display: 'block', height: 1400 }}>
      </iframe>
    </section>
  );
}

function NewlyDiagnosedPage({ navigate }) {
  return (
    <div data-screen-label="Newly Diagnosed">
      <PageHero
        eyebrow="Newly diagnosed"
        title="You've just received a diagnosis. Here's where to start."
        body="A diagnosis, whether it arrives after years of searching or in the early days of your child's life, changes everything. The words may be unfamiliar. The path ahead may feel uncertain. And the feelings are probably coming in waves."
        kicker="We have been here since the beginning, built by families, for families, and we know what this moment is like. This guide is not about rushing you toward the next thing. It's about helping you take one step at a time."
        navigate={navigate} />
      
      <Breadcrumbs items={[{ label: 'Support', to: 'support' }, { label: 'Newly diagnosed' }]} navigate={navigate} />

      <ProseSection eyebrow="First" title="Give yourself permission to feel this.">
        <p>There is no correct way to respond to a diagnosis like this. Some families feel relief at finally having a name for what they have been observing. Others feel grief, shock, fear, or a mix of all of these at once.</p>
        <p>Whatever you are feeling right now is valid. This is hard. And it is also navigable with the right support around you. When you are ready, this guide will help you understand the practical steps ahead. <strong>There is no rush to get through all of it today.</strong></p>
      </ProseSection>

      <ProseSection eyebrow="Understanding the diagnosis" title="What has my child been diagnosed with?" background="#F7F4F0">
        <p>If your child has been identified as having an SCN2A variant, they have a change in a gene called SCN2A that affects how their brain develops and functions. SCN2A variants can cause a range of conditions from early infantile epilepsy to autism spectrum disorder with minimal seizure activity depending on the specific nature of the variant.</p>
        <p>If your child has a broader diagnosis of DEE (Developmental and Epileptic Encephalopathy) with a specific genetic cause, the underlying gene matters for understanding what to expect and which treatments are likely to help.</p>
        <div style={{ display: 'flex', gap: 12, flexWrap: 'wrap', marginTop: 18 }}>
          <Button variant="outline" onClick={() => navigate('scn2a-disorders')}>What is SCN2A? </Button>
          <Button variant="outline" onClick={() => navigate('what-is-dee')}>What is DEE? </Button>
        </div>
        <h4>One of the most important things to ask your doctor</h4>
        <p>Ask your neurologist or geneticist whether your child's variant is a <strong>gain of function</strong> or <strong>loss of function</strong> variant. This matters significantly for treatment decisions, some anti-seizure medications that help one group may worsen outcomes in the other.</p>
        <SafetyCallout label="A patient-safety point">
          If you are unsure of the answer, or if no one has explained this to you yet, <strong>write it down and bring it to your next appointment.</strong> We can also help you connect with a clinician experienced in SCN2A if needed.
        </SafetyCallout>
        <h4>Genetic results can be complex</h4>
        <p>Genetic reports often include language like "pathogenic," "likely pathogenic," "variant of uncertain significance (VUS)," or "de novo." If you have received a genetic report that you don't fully understand, a genetic counsellor can walk you through what it means for your child and your family.</p>
        <p>SCN2A Australia can link you with genetic counsellors and families who have navigated similar results <a href="#genetics" onClick={(e) => {e.preventDefault();navigate('genetics');}}>you do not need to interpret this alone</a>.</p>
      </ProseSection>

      <ProseSection eyebrow="Care team" title="Building your care team.">
        <p>Managing an SCN2A-related condition or DEE typically involves a team of specialists working alongside your child and family. In the early stages, your team is likely to grow and that can feel overwhelming.</p>
        <p>A typical care team for a child with SCN2A or DEE may include:</p>
        <ul>
          <li><strong>Paediatric neurologist</strong> specialist in epilepsy and brain development; often the primary specialist for seizure management</li>
          <li><strong>Developmental paediatrician</strong> supports overall developmental monitoring and coordinates care</li>
          <li><strong>Geneticist or genetic counsellor</strong> helps interpret the diagnosis, understand inheritance, and discuss implications for the family</li>
          <li><strong>Occupational therapist (OT)</strong> supports daily living skills, sensory processing, and fine motor development</li>
          <li><strong>Speech pathologist</strong> supports communication, feeding, and swallowing</li>
          <li><strong>Physiotherapist</strong> supports motor development, movement, and gross motor skills</li>
          <li><strong>Psychologist</strong> supports mental health and wellbeing for your child and for carers</li>
        </ul>
        <p>You do not need all of these from day one. Your medical team will guide referrals based on your child's specific presentation. The key is to start building relationships with the right specialists early wait times for paediatric specialists in Australia can be long.</p>
        <h4>Early intervention matters</h4>
        <p>If your child is young, early intervention services, including OT, speech, and physiotherapy,  are consistently shown to support better developmental outcomes. In Australia, access to early intervention services can be funded through the NDIS, depending on eligibility.</p>
        <div style={{ marginTop: 16 }}>
          <Button variant="outline" onClick={() => navigate('ndis')}>NDIS navigation guide</Button>
        </div>
      </ProseSection>

      <ProseSection eyebrow="Seizure safety" title="Managing seizures safely." background="#F7F4F0">
        <p>If your child has seizures, seizure safety is one of the most immediate priorities. Your neurologist will guide you on medication, seizure first aid, and when to call for emergency help. Some key starting points:</p>
        <h4>Seizure first aid basics</h4>
        <p>Stay calm. Time the seizure. Keep your child safe from injury. Do not put anything in their mouth. Most seizures stop on their own within a few minutes.</p>
        <h4>Know your emergency threshold</h4>
        <p>Your neurologist will tell you when to call an ambulance. This varies depending on your child's condition and seizure type make sure this advice is clear and written down.</p>
        <h4>Anti-seizure medications and SCN2A</h4>
        <p>Medication selection for SCN2A requires careful consideration of whether your child has a gain or loss of function variant. <strong>Some medications are contraindicated for certain variant types.</strong> Always make sure any treating clinician, including in an emergency setting knows your child's SCN2A variant type and any medications that should be avoided.</p>
        <div style={{ marginTop: 18, display: 'flex', gap: 12, flexWrap: 'wrap' }}>
          <Button variant="outline" onClick={() => navigate('resources')}>Download the SCN2A emergency info card</Button>
          <Button variant="ghost" onClick={() => navigate('seizures')}>Detailed seizure types & management</Button>
        </div>
      </ProseSection>

      <ProseSection eyebrow="Community" title="Connecting with other families.">
        <p>One of the most valuable things you can do in the early weeks after diagnosis is connect with another family who has been where you are.</p>
        <p>SCN2A Australia facilitates peer connections linking families with others who have children with similar presentations, similar ages, or similar challenges. There is nothing quite like speaking with someone who genuinely understands.</p>
        <p>We also host regular virtual meetups and an annual family event where families can connect in person.</p>
        <div style={{ marginTop: 18 }}>
          <Button onClick={() => navigate('involved')}>Request a peer connection</Button>
        </div>
      </ProseSection>

      <ProseSection eyebrow="Research" title="Joining the SCN2A Insights Registry." background="#F7F4F0">
        <p>The <strong>SCN2A Insights Registry</strong> is one of the most meaningful things your family can do to help advance understanding and treatment of SCN2A-related conditions.</p>
        <p>The registry collects information from families with SCN2A variants to build a picture of the condition how it presents, how it progresses, and what helps. This data directly informs research directions and clinical trial design.</p>
        <p>Participating in the registry does not commit you to anything else. Your information is de-identified and used for research purposes only. And by joining, you become part of a global community of families contributing to a future where better treatments are possible.</p>
        <div style={{ marginTop: 18 }}>
          <Button as="a" href="https://scn2aaustralia.org/join/" target="_blank">Join the registry <i data-lucide="arrow-right" style={{ width: 14, height: 14, marginLeft: 4, verticalAlign: '-2px' }} /></Button>
        </div>
      </ProseSection>

      <ProseSection eyebrow="Practical & financial" title="Practical and financial support.">
        <p>Caring for a child with a complex medical condition has significant practical and financial implications. In Australia, the main avenues for support include:</p>
        <h4>NDIS</h4>
        <p>Children with SCN2A-related conditions or DEE may be eligible for NDIS funding, which can cover therapies, equipment, support workers, and other needs. Navigating the NDIS can be complex SCN2A Australia links you to families who have been through it and resources that make the process clearer.</p>
        <h4>Carer payments and allowances</h4>
        <p>Centrelink offers a range of payments for carers, including Carer Payment and Carer Allowance. These are income-tested and based on the level of care required.</p>
        <h4>Workplace and employment support</h4>
        <p>If the diagnosis affects your ability to work, your employer may offer flexible arrangements, and there are government supports available for carers.</p>
      </ProseSection>

      <ProseSection eyebrow="Looking after yourself" title="You cannot pour from an empty cup." background="#F7F4F0">
        <p>This bears saying clearly: <strong>caring for a child with a complex condition is one of the hardest things a person can do, and your wellbeing matters, not as an afterthought, but as a genuine priority.</strong></p>
        <p>Many families find that the initial period after diagnosis is intense absorbed by appointments, decisions, and adjusting to a new reality. In time, many also find a rhythm, a community, and a resilience they did not know they had.</p>
        <p>Give yourself permission to ask for help. Accept support when it is offered. And when you are ready, SCN2A Australia can connect you with carer support resources, peer connections, and a community who understands.</p>
        <div style={{ marginTop: 18 }}>
          <Button onClick={() => navigate('carers')}>Carer support and wellbeing </Button>
        </div>
      </ProseSection>

      {/* Quick reference checklist */}
      <section style={{ background: '#fff', padding: '88px 0' }}>
        <div className="container">
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1.8fr', gap: 48 }} className="stack-mobile">
            <div>
              <div className="eyebrow">Quick reference</div>
              <h2 className="h2-mobile" style={{ fontSize: 'clamp(28px, 3.4vw, 40px)', fontWeight: 700, color: '#0D1B2A', margin: '14px 0 16px', lineHeight: 1.15, letterSpacing: '-0.01em' }}>Your first steps.</h2>
              <p style={{ fontSize: 15, color: '#6B6659', lineHeight: 1.65, margin: 0 }}>Print this. Stick it on the fridge. Tick things off as you go. Don't try to do them all at once.</p>
            </div>
            <ol style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 12 }}>
              {[
              ['Understand the diagnosis', 'Gain or loss of function? Ask your neurologist. Read our SCN2A explainer.', 'scn2a-disorders'],
              ['Seizure safety', "Get clear emergency guidance from your neurologist. Download the emergency info card.", 'seizures'],
              ['Start building your care team', 'Neurologist, developmental paediatrician, early-intervention therapists.', 'support'],
              ['Apply for NDIS', 'Early access to therapy funding is important. We can help you navigate.', 'ndis'],
              ['Connect with another family', 'Request a peer connection through SCN2A Australia.', 'involved'],
              ['Join the registry', 'Your family\'s data helps every family who comes after you.', 'https://scn2aaustralia.org/join/'],
              ['Reach out to us', 'We are here. Response within two business days.', 'contact']].
              map(([t, b, to], i) =>
              <li key={i}>
                  <a href={to.startsWith('http') ? to : '#'} target={to.startsWith('http') ? '_blank' : undefined} rel={to.startsWith('http') ? 'noopener' : undefined} onClick={(e) => { if (!to.startsWith('http')) { e.preventDefault(); navigate(to); } }}
                className="card-hover"
                style={{ display: 'grid', gridTemplateColumns: '50px 1fr 30px', alignItems: 'center', gap: 18, padding: '18px 22px', border: '1px solid #D5CFBF', background: '#fff', textDecoration: 'none', color: '#0D1B2A' }}>
                    <span className="ledger-mono" style={{ fontSize: 16, fontWeight: 800, color: '#0D1B2A' }}>{String(i + 1).padStart(2, '0')}</span>
                    <span>
                      <div style={{ fontWeight: 700, fontSize: 16 }}>{t}</div>
                      <div style={{ fontSize: 14, color: '#6B6659', marginTop: 2 }}>{b}</div>
                    </span>
                    <span style={{ color: '#0D1B2A' }}></span>
                  </a>
                </li>
              )}
            </ol>
          </div>
        </div>
      </section>

      <CTABlock
        eyebrow="When you're ready"
        title="Contact us. We respond within two business days."
        body="No question is too small. No timeline is too soon. We are here, because we have been where you are."
        ctaLabel="Contact SCN2A Australia"
        onCta={() => navigate('contact')}
        secondaryLabel="Connect with families"
        onSecondary={() => navigate('involved')} />
      

      <RelatedPages
        items={[
        { label: 'What families need to know', to: 'families' },
        { label: 'SCN2A-related disorders', to: 'scn2a-disorders' },
        { label: 'What is DEE?', to: 'what-is-dee' },
        { label: 'NDIS navigation guide', to: 'ndis' },
        { label: 'Seizure types & management', to: 'seizures' },
        { label: 'Genetics & diagnosis', to: 'genetics' },
        { label: 'Carer support & wellbeing', to: 'carers' }]
        }
        navigate={navigate} />
      
    </div>);

}

// -------- Seizure Types & Management --------------------------------------

function SeizuresPage({ navigate }) {
  return (
    <div data-screen-label="Seizure types & management">
      <PageHero
        eyebrow="Knowledge base"
        title="Seizure types and management."
        body="Seizures are one of the most significant features of many SCN2A-related conditions and other forms of DEE. This guide explains the main types of seizures, how they are managed, and what every SCN2A family needs to know about medication safety."
        navigate={navigate} />
      
      <Breadcrumbs items={[{ label: 'Understand', to: 'understand' }, { label: 'Seizure types & management' }]} navigate={navigate} />

      <ProseSection eyebrow="What is a seizure?" title="Understanding seizures.">
        <p>A seizure is caused by a sudden surge of abnormal electrical activity in the brain. In SCN2A-related conditions and other DEEs, this abnormal activity arises because the underlying gene change affects how brain cells communicate and regulate their electrical signals.</p>
        <p>Seizures can look very different depending on which part of the brain is affected, what is happening in that region, and the age and development of the child. A single child may experience more than one type of seizure, and the pattern may change over time.</p>
      </ProseSection>

      <section style={{ background: '#F7F4F0', padding: '64px 0' }}>
        <div className="container">
          <div style={{ marginBottom: 24, maxWidth: 760 }}>
            <div className="eyebrow">Common seizure types</div>
            <h2 className="h2-mobile" style={{ fontSize: 'clamp(28px, 3.4vw, 40px)', fontWeight: 700, color: '#0D1B2A', margin: '14px 0 0', lineHeight: 1.15 }}>What you may see, what they're called.</h2>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 16 }} className="stack-mobile">
            {[
            ['Focal seizures', 'Start in one area of the brain. May include rhythmic movements in one limb, staring episodes, unusual sensations, or brief altered awareness. Can spread to become generalised.'],
            ['Tonic seizures', 'Sudden stiffening of the muscles, body, arms, or legs become rigid. Can cause falls if standing. Usually last only a few seconds; may happen in clusters.'],
            ['Clonic seizures', 'Rhythmic, jerking movements, typically of the arms, legs, or face. May occur alone or as part of a tonic-clonic seizure.'],
            ['Tonic-clonic (previously "grand mal")', 'Both stiffening (tonic) and rhythmic jerking (clonic) phases. Typically last one to three minutes, followed by tiredness, confusion, or sleep (the postictal phase).'],
            ['Myoclonic seizures', 'Brief, sudden muscle jerks, often in the arms or upper body. Can be subtle and easily missed, particularly in young children.'],
            ['Absence seizures', 'Brief episodes of staring or "switching off", the child appears unresponsive for a few seconds before resuming normal activity. No physical movements.'],
            ['Epileptic spasms', 'Short, sudden flexing or extending of the body or limbs (formerly called infantile spasms when in infancy). Often in clusters, typically on waking. Require prompt treatment.'],
            ['Febrile seizures', 'Some children with SCN2A-related conditions have increased sensitivity to fever, with seizures triggered or worsened by elevated body temperature.']].
            map(([t, b]) =>
            <article key={t} style={{ background: '#fff', border: '1px solid #D5CFBF', padding: '22px 24px' }}>
                <div style={{ fontWeight: 700, fontSize: 17, color: '#0D1B2A', marginBottom: 8 }}>{t}</div>
                <div style={{ fontSize: 14.5, color: '#6B6659', lineHeight: 1.6 }}>{b}</div>
              </article>
            )}
          </div>
          <p style={{ marginTop: 24, fontSize: 15, color: '#6B6659', maxWidth: 760, lineHeight: 1.65 }}>
            Not every child with an SCN2A variant will have all, or any, of these seizure types. Your child's specific presentation will depend on their variant, their age, and many other factors. Your neurologist is the best source of guidance.
          </p>
        </div>
      </section>

      {/* First aid panel, printable card layout */}
      <section style={{ background: '#fff', padding: '72px 0' }}>
        <div className="container">
          <div style={{ marginBottom: 24, maxWidth: 760 }}>
            <div className="eyebrow" style={{ color: '#8E3B5E' }}>Seizure first aid</div>
            <h2 className="h2-mobile" style={{ fontSize: 'clamp(28px, 3.4vw, 40px)', fontWeight: 700, color: '#0D1B2A', margin: '14px 0 0', lineHeight: 1.15 }}>What to do, and what not to do.</h2>
            <p style={{ fontSize: 15, color: '#6B6659', margin: '14px 0 0', maxWidth: 620, lineHeight: 1.65 }}>General guidance. Your neurologist will provide specific instructions tailored to your child's condition and seizure type.</p>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 18 }} className="stack-mobile">
            <article style={{ border: '1px solid #D5CFBF', background: '#fff', padding: '24px 26px', borderLeft: '4px solid #0D1B2A' }}>
              <div className="eyebrow">During</div>
              <ul style={{ margin: '10px 0 0', paddingLeft: 18, fontSize: 14.5, lineHeight: 1.7, color: '#0D1B2A' }}>
                <li>Stay calm, stay with your child</li>
                <li>Note the time, how long the seizure lasts matters</li>
                <li>Move them away from anything hard or sharp</li>
                <li>Place them on their side if unconscious</li>
                <li><strong>Do not</strong> put anything in their mouth</li>
                <li><strong>Do not</strong> restrain them</li>
                <li>Speak calmly if they're conscious</li>
              </ul>
            </article>
            <article style={{ border: '1px solid #D5CFBF', background: '#fff', padding: '24px 26px', borderLeft: '4px solid #0D1B2A' }}>
              <div className="eyebrow">After</div>
              <ul style={{ margin: '10px 0 0', paddingLeft: 18, fontSize: 14.5, lineHeight: 1.7, color: '#0D1B2A' }}>
                <li>Stay with your child as they recover</li>
                <li>Postictal tiredness, confusion or sleep is normal</li>
                <li>Note: type of movements, duration, which side</li>
                <li>Follow rescue-medication instructions if prescribed</li>
              </ul>
            </article>
            <article style={{ border: '1px solid #D5CFBF', background: '#E8E3DA', padding: '24px 26px', borderLeft: '4px solid #8E3B5E' }}>
              <div className="eyebrow" style={{ color: '#8E3B5E' }}>Call an ambulance if</div>
              <ul style={{ margin: '10px 0 0', paddingLeft: 18, fontSize: 14.5, lineHeight: 1.7, color: '#0D1B2A' }}>
                <li>Seizure lasts &gt; 5 minutes (or your neurologist's threshold)</li>
                <li>A second seizure occurs before full recovery</li>
                <li>Difficulty breathing during or after</li>
                <li>Seizure in water</li>
                <li>Injury during the seizure</li>
                <li>You are unsure, or this is the first observed seizure</li>
              </ul>
            </article>
          </div>
          <div style={{ marginTop: 22 }}>
            <Button variant="coral" onClick={() => navigate('resources')}>Download the SCN2A emergency info card</Button>
          </div>
        </div>
      </section>

      <ProseSection eyebrow="Medication safety" title="Anti-seizure medications and SCN2A, what you need to know." background="#F7F4F0">
        <p>Anti-seizure medications (ASMs) are the primary treatment for seizures in SCN2A and DEE. Choosing the right medication, and avoiding the wrong one, requires knowing your child's specific SCN2A variant type.</p>
        <h4>Why variant type matters</h4>
        <p>SCN2A variants can be broadly classified as <strong>gain of function (GoF)</strong> or <strong>loss of function (LoF)</strong>:</p>
        <ul>
          <li><strong>GoF variants</strong> cause the sodium channel to be overactive. Sodium channel blockers, phenytoin, carbamazepine, oxcarbazepine, lamotrigine, are often effective.</li>
          <li><strong>LoF variants</strong> cause the sodium channel to be underactive. Sodium channel-blocking medications <em>may worsen</em> the condition and should generally be avoided or used with significant caution.</li>
        </ul>
        <p>This is not a theoretical distinction. There are documented cases of children with LoF variants whose seizures worsened after being prescribed sodium channel-blocking medications that are standard treatment for other epilepsy types.</p>
        <SafetyCallout label="Make this part of every clinical handover">
          Make sure every clinician who treats your child, including emergency-department staff, locums, and any specialist who is new to your child, knows your child's SCN2A variant type and the medications that should be used carefully or avoided. The SCN2A Emergency Information Card is designed to communicate this clearly in time-sensitive situations.
        </SafetyCallout>
        <h4>What if medication is not working?</h4>
        <p>It is not uncommon for seizures in SCN2A and DEE to be difficult to control with a single medication, or to require adjustment over time. If your child's seizures are not responding, discuss with your treating team:</p>
        <ul>
          <li>Review of the variant type and whether current medications align with it</li>
          <li>Second opinion from a neurologist experienced in SCN2A or genetic epilepsy</li>
          <li>Referral to a specialist epilepsy centre</li>
          <li>Consideration of participation in a clinical trial</li>
          <li>Assessment of factors (sleep, stress, illness, medication interactions) that may be affecting seizure frequency</li>
        </ul>
        <div style={{ marginTop: 16, display: 'flex', gap: 12, flexWrap: 'wrap' }}>
          <Button variant="outline" onClick={() => navigate('trials')}>Current clinical trials</Button>
        </div>
      </ProseSection>

      <ProseSection eyebrow="Rescue medications" title="Rescue medications.">
        <p>Some children with SCN2A or DEE have rescue medications, medications given during or after a prolonged seizure to stop it before it becomes a medical emergency. These are typically fast-acting medications administered by carers (not only by medical staff), given at home or in the community.</p>
        <p>Common rescue medications include <strong>midazolam</strong> (given into the cheek or nose) and <strong>diazepam</strong> (rectal). Your neurologist will prescribe a rescue medication if it is appropriate, and provide training in when and how to administer it.</p>
        <p>If your child has a rescue medication, make sure everyone responsible for their care, school staff, extended family, regular carers, knows what it is, where it is kept, and when and how to use it.</p>
      </ProseSection>

      <ProseSection eyebrow="Records" title="Seizure monitoring and record-keeping." background="#F7F4F0">
        <p>Keeping a clear record of your child's seizures is one of the most practical things you can do to support their care. A seizure diary helps your treating team identify patterns, assess medication effectiveness, and make informed adjustments.</p>
        <p>A seizure record should note:</p>
        <ul>
          <li>Date and time</li>
          <li>Type of seizure (or your best description of what you observed)</li>
          <li>Duration</li>
          <li>Possible triggers (illness, fever, missed medication, disrupted sleep)</li>
          <li>Recovery time and any postictal features</li>
          <li>Any rescue medication used</li>
        </ul>
        <p>Many families use smartphone apps designed for seizure tracking. Your neurologist or epilepsy nurse may recommend one, or SCN2A Australia can suggest options used by our community.</p>
      </ProseSection>

      <ProseSection eyebrow="The bigger picture" title="Seizures and quality of life.">
        <p>Managing seizures is important, but so is maintaining quality of life. <strong>The goal of treatment is not zero seizures at any cost</strong>; it is to find the best balance between seizure control and the side effects of medication, and to support your child's development and wellbeing.</p>
        <p>Families often find that it takes time and adjustment to reach a medication regimen that works. That process can be exhausting and sometimes disheartening. Connecting with other families who have navigated similar challenges, and who know what this feels like, is one of the most valuable things SCN2A Australia can offer.</p>
        <div style={{ marginTop: 16, display: 'flex', gap: 12, flexWrap: 'wrap' }}>
          <Button onClick={() => navigate('involved')}>Connect with other families</Button>
          <Button variant="outline" onClick={() => navigate('carers')}>Carer support and wellbeing</Button>
        </div>
      </ProseSection>

      <RelatedPages
        items={[
        { label: 'SCN2A-related disorders', to: 'scn2a-disorders' },
        { label: 'Genetics & diagnosis', to: 'genetics' },
        { label: 'Developmental considerations', to: 'development' },
        { label: 'Current clinical trials', to: 'trials' }]
        }
        navigate={navigate} />
      
    </div>);

}

// -------- Developmental Considerations ------------------------------------

function DevelopmentPage({ navigate }) {
  const areas = [
  { t: 'Communication and language', b: 'Many children with SCN2A and DEE experience delays in language development. Speech pathology is one of the most important early interventions, access to an experienced paediatric speech pathologist should be pursued as early as possible. Some children, particularly those with loss-of-function variants, benefit from AAC (alternative and augmentative communication) supports.' },
  { t: 'Motor development', b: 'Common: hypotonia (low muscle tone), delays in gross motor milestones (sitting, crawling, walking), fine motor difficulties (handwriting, cutlery), and ataxia. Physiotherapy supports gross motor; occupational therapy supports fine motor and daily living skills.' },
  { t: 'Cognitive development and learning', b: 'Many children experience some degree of intellectual disability or learning difficulty, though the degree varies considerably. Challenges may include attention, processing speed, memory, abstract reasoning, and transitions.' },
  { t: 'Autism spectrum features', b: 'ASD features are particularly common in children with SCN2A loss-of-function variants. Some have a dual SCN2A + ASD diagnosis. It is important to understand autism in the context of a genetic condition as part of a complex neurodevelopmental picture, not a separate, unrelated diagnosis.' },
  { t: 'Behaviour', b: 'Behavioural challenges are common and often connected to underlying communication difficulties, sensory sensitivities, pain, sleep disturbance, or seizure activity. Understanding what the child is communicating or responding to is more useful than trying to eliminate the behaviour.' },
  { t: 'Sleep', b: 'Sleep disturbance is reported by the majority of SCN2A families. It is not simply a parenting challenge, it often has neurological and physiological causes. Raise sleep concerns with your child\'s neurologist or developmental paediatrician.' },
  { t: 'Feeding and gastrointestinal', b: 'Feeding difficulties (sucking and swallowing in infancy, texture aversions, reflux) and constipation are reported by many families. A paediatric speech pathologist can assess feeding and swallowing; a dietitian may also help.' }];

  return (
    <div data-screen-label="Developmental considerations">
      <PageHero
        eyebrow="Knowledge base"
        title="Developmental considerations in SCN2A-related disorders and the broader DEE community."
        body="Children with SCN2A-related conditions and other forms of DEE may experience a broad range of developmental differences, in how they communicate, move, learn, behave, and experience the world. The nature and degree vary significantly, even among children with the same genetic condition."
        navigate={navigate} />
      
      <Breadcrumbs items={[{ label: 'Understand', to: 'understand' }, { label: 'Developmental considerations' }]} navigate={navigate} />

      <ProseSection eyebrow="The big picture" title="Why developmental support matters, even when seizures are controlled.">
        <p>In developmental and epileptic encephalopathies, the underlying gene change affects how the brain develops, not just how it generates seizure activity. <strong>Developmental differences in children with DEE are not simply a secondary effect of seizures; they are part of the condition itself.</strong></p>
        <p>This distinction matters because it means that even when seizures are well controlled, developmental support remains important. Conversely, accessing developmental therapies early, before or alongside seizure treatment, is genuinely valuable and not something to be deferred.</p>
        <p>The range across the SCN2A community is wide. Some children have significant intellectual disability and complex communication needs; others have mild developmental differences alongside good language and social development. Where your child sits depends on their specific variant, the timing and nature of any seizure activity, and many individual factors.</p>
      </ProseSection>

      <section style={{ background: '#F7F4F0', padding: '72px 0' }}>
        <div className="container">
          <div style={{ marginBottom: 24, maxWidth: 760 }}>
            <div className="eyebrow">Areas of development</div>
            <h2 className="h2-mobile" style={{ fontSize: 'clamp(28px, 3.4vw, 40px)', fontWeight: 700, color: '#0D1B2A', margin: '14px 0 0', lineHeight: 1.15 }}>What may be affected.</h2>
          </div>
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 16 }} className="stack-mobile">
            {areas.map((a) =>
            <article key={a.t} style={{ background: '#fff', border: '1px solid #D5CFBF', padding: '22px 24px' }}>
                <div style={{ fontWeight: 700, fontSize: 17, color: '#0D1B2A', marginBottom: 8 }}>{a.t}</div>
                <div style={{ fontSize: 14.5, color: '#6B6659', lineHeight: 1.6 }}>{a.b}</div>
              </article>
            )}
          </div>
        </div>
      </section>

      <ProseSection eyebrow="Early intervention" title="The earlier, the better, but never too late.">
        <p>Research consistently shows that early intervention, accessing therapies and developmental support as early as possible, leads to better outcomes for children with neurodevelopmental conditions.</p>
        <p>For children under 9, the NDIS Early Childhood Approach provides a pathway to early funded supports without requiring a formal NDIS plan. For older children, NDIS funding through a standard plan can cover therapy costs.</p>
        <p>Early intervention typically involves some or all of the following, depending on the child's needs:</p>
        <ul>
          <li><strong>Occupational therapy</strong>, daily living, fine motor, sensory processing, school readiness</li>
          <li><strong>Speech pathology</strong>, communication (including AAC), language, feeding and swallowing</li>
          <li><strong>Physiotherapy</strong>, gross motor, mobility, posture, movement</li>
          <li><strong>Psychology</strong>, cognitive assessment, learning strategies, emotional and behavioural support for child and family</li>
          <li><strong>Early childhood intervention programmes</strong>, multidisciplinary teams, often in home or community settings</li>
        </ul>
        <p>The earlier these supports begin, the more the developing brain can benefit. This does not mean that intervention after early childhood is not valuable, it is, but early access tends to have the greatest developmental impact.</p>
        <div style={{ marginTop: 18, display: 'flex', gap: 12, flexWrap: 'wrap' }}>
          <Button onClick={() => navigate('ndis')}>NDIS navigation guide</Button>
          <Button variant="outline" onClick={() => navigate('support')}>Find allied health providers</Button>
        </div>
      </ProseSection>

      <ProseSection eyebrow="School" title="Education and school." background="#F7F4F0">
        <p>Supporting a child with SCN2A or DEE through school requires collaboration between the family, the school, and the child's therapeutic team. Most states and territories have provisions for additional educational support, including:</p>
        <ul>
          <li>Adjusted learning goals and curriculum modifications</li>
          <li>Teacher aides or integration aides (funded through state education departments or NDIS)</li>
          <li>Access to assistive technology (communication devices, computer-based learning tools)</li>
          <li>Specialist school settings for children with higher support needs</li>
        </ul>
        <p>Many families find that advocating effectively requires persistence and clear documentation from the child's treating team. OTs, speech pathologists, and psychologists can provide written reports that support access to school-based funding and adjustments.</p>
        <p>SCN2A Australia can help you navigate the school support landscape and connect you with families who have experience advocating in your state or territory.</p>
      </ProseSection>

      <ProseSection eyebrow="Looking ahead" title="Planning for adulthood.">
        <p>For families with older children and young people with SCN2A or DEE, thinking ahead to adulthood is an important and often daunting process. Questions about post-school options, supported living, employment, and adult health care are ones that many families begin confronting in the teenage years.</p>
        <p>SCN2A Australia is developing resources for this stage. In the meantime, we encourage families to:</p>
        <ul>
          <li>Begin discussions with your child's NDIS support coordinator about transition planning well before school leaving age</li>
          <li>Ask your medical team about transition to adult services</li>
          <li>Connect with other families navigating this stage through our peer network</li>
        </ul>
      </ProseSection>

      <PullQuote attribution="A reminder we hold onto.">
        Children with SCN2A and DEE surprise their families, their therapists, and their doctors. <em>The right support, the right team, and the right community around your family makes a genuine difference.</em>
      </PullQuote>

      <RelatedPages
        items={[
        { label: 'Seizure types & management', to: 'seizures' },
        { label: 'SCN2A-related disorders', to: 'scn2a-disorders' },
        { label: 'NDIS navigation guide', to: 'ndis' },
        { label: 'Carer support & wellbeing', to: 'carers' }]
        }
        navigate={navigate} />
      
    </div>);

}

// -------- Navigator (interactive pathways) --------------------------------

function NavigatorPage({ navigate }) {
  return (
    <div data-screen-label="Navigation tool">
      <PageHero
        eyebrow="New here?"
        title="Use our navigation tool."
        body="A plain-English guide to SCN2A, organised into sections you can open at your own pace. Start wherever your questions are: understanding the science, symptoms and co-occurring conditions, preparing for an appointment, research and trials, or finding support in Australia. Every clinical claim shows its peer-reviewed source so you can check it or share it with your clinician."
        image="assets/photography/family-zoo-portrait.jpeg"
        ledger={["PLAIN ENGLISH · EVIDENCE-GROUNDED", "6 SECTIONS · OPEN AT YOUR OWN PACE", "INFORMATION ONLY · NOT MEDICAL ADVICE"]}
        navigate={navigate} />
      <Breadcrumbs items={[{ label: 'Newly diagnosed', to: 'newly-diagnosed' }, { label: 'Navigation tool' }]} navigate={navigate} />
      <NavigatorToolEmbed />
      <CTABlock
        eyebrow="Still have questions?"
        title="We're here. Reach out whenever you're ready."
        body="No question is too small. A family navigator will respond within two business days."
        ctaLabel="Contact SCN2A Australia"
        onCta={() => navigate('contact')}
        secondaryLabel="Newly diagnosed? Start here"
        onSecondary={() => navigate('newly-diagnosed')} />
    </div>);
}

Object.assign(window, { NewlyDiagnosedPage, SeizuresPage, DevelopmentPage, NavigatorPage });