Files
neuron-web/src/safety.el
T
will.anderson 2553a6b7ac
Dev — Build & local smoke test / build-smoke (pull_request) Failing after 4m48s
feat(native-el-ui): convert all component files to el-html vessel API
Replaced raw HTML heredoc returns with native el_ function calls across
all 21 component files. styles.el intentionally excluded.
2026-05-08 22:35:41 -05:00

151 lines
11 KiB
EmacsLisp

// components/safety.el - Safety architecture section.
//
// Describes the Hard Bell architecture and genuine protective design.
// The Hard Bell is for everyone - not just children. Any user can
// designate a trusted contact that bypasses the default notification
// path when a signal warrants it.
extern fn el_section(attrs: String, children: String) -> String
extern fn el_div(attrs: String, children: String) -> String
extern fn el_span(attrs: String, children: String) -> String
extern fn el_h2(attrs: String, text: String) -> String
extern fn el_p(attrs: String, children: String) -> String
extern fn el_a(href: String, attrs: String, children: String) -> String
extern fn el_em(children: String) -> String
extern fn el_br() -> String
fn safety_intro() -> String {
let label_row: String = el_div(
"style=\"display:flex;align-items:center;gap:1.5rem;margin-bottom:2rem\"",
el_div("class=\"navy-line-left\" style=\"width:3rem;flex-shrink:0\"", "") +
el_span("class=\"label reveal\" style=\"color:var(--navy-85)\"", "Safety")
)
el_div(
"style=\"max-width:44rem;margin-bottom:3.5rem\"",
label_row +
el_h2(
"class=\"display-lg reveal\" style=\"transition-delay:80ms;margin-bottom:1.5rem\"",
"Safety built in." + el_br() + "Not bolted on."
) +
el_p("class=\"reveal\" style=\"transition-delay:160ms;font-family:var(--body);font-weight:300;font-size:1rem;color:var(--t2);line-height:1.8;margin-bottom:1.25rem\"",
"Most AI products treat safety as a content filter. Block a list of topics, add a disclaimer, call it done. That's not safety. That's liability management."
) +
el_p("class=\"reveal\" style=\"transition-delay:220ms;font-family:var(--body);font-weight:300;font-size:1rem;color:var(--t2);line-height:1.8;margin-bottom:1.25rem\"",
"Real safety means thinking about who might need help and what help actually looks like in a crisis. The person closest to you is sometimes the source of the problem. A system that routes every distress signal to your primary contact can alert the very person you need protection from."
) +
el_p("class=\"reveal\" style=\"transition-delay:280ms;font-family:var(--body);font-weight:300;font-size:1rem;color:var(--t2);line-height:1.8\"",
"I built something different. I called it the Hard Bell."
)
)
}
fn safety_cards() -> String {
let card_style: String = "padding:1.75rem 2rem;border-left:3px solid rgba(0,82,160,.40)"
let card1: String = el_div(
"class=\"reveal card-dark\" style=\"transition-delay:100ms;" + card_style + "\"",
el_p("style=\"font-family:var(--body);font-size:0.75rem;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--navy);margin-bottom:0.75rem\"", "Hard Bell") +
el_p("style=\"font-family:var(--body);font-weight:400;font-size:0.9375rem;color:var(--t1);margin-bottom:0.5rem\"", "A trusted contact the threat can't intercept") +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.875rem;color:var(--t2);line-height:1.7\"",
"Any user can designate a Hard Bell contact - a friend, a relative, a colleague - set up in a calm moment, independent of any shared account. When a signal warrants it, that contact is reached directly. It works the same way for everyone: adult, teen, or child."
)
)
let card2: String = el_div(
"class=\"reveal card-dark\" style=\"transition-delay:150ms;" + card_style + "\"",
el_p("style=\"font-family:var(--body);font-size:0.75rem;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--navy);margin-bottom:0.75rem\"", "Emergency routing") +
el_p("style=\"font-family:var(--body);font-weight:400;font-size:0.9375rem;color:var(--t1);margin-bottom:0.5rem\"", "Emergency services first - not notification") +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.875rem;color:var(--t2);line-height:1.7\"",
"Physical danger and crisis signals route to emergency services and crisis lines. Neuron evaluates the content of the signal, not the account type. No one in your contact list can disable or redirect this path."
)
)
let card3: String = el_div(
"class=\"reveal card-dark\" style=\"transition-delay:200ms;" + card_style + "\"",
el_p("style=\"font-family:var(--body);font-size:0.75rem;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--navy);margin-bottom:0.75rem\"", "Family accounts") +
el_p("style=\"font-family:var(--body);font-weight:400;font-size:0.9375rem;color:var(--t1);margin-bottom:0.5rem\"", "Oversight without surveillance") +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.875rem;color:var(--t2);line-height:1.7\"",
"For family accounts, parents see what they need to see. A child's conversations remain private unless a wellbeing signal triggers notification - and even then, the routing logic accounts for the possibility that the parent could be the source of harm."
) +
el_p("style=\"font-family:var(--body);font-weight:500;font-size:0.875rem;color:var(--t1);line-height:1.7;margin-top:0.75rem\"",
"We protect the kids. They come first."
)
)
let card4: String = el_div(
"class=\"reveal card-dark\" style=\"transition-delay:250ms;" + card_style + "\"",
el_p("style=\"font-family:var(--body);font-size:0.75rem;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--navy);margin-bottom:0.75rem\"", "Mandatory reporting") +
el_p("style=\"font-family:var(--body);font-weight:400;font-size:0.9375rem;color:var(--t1);margin-bottom:0.5rem\"", "If real harm is intended, authorities may be contacted") +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.875rem;color:var(--t2);line-height:1.7\"",
"If Neuron detects credible, specific indicators of intended harm - to the user or to someone else - emergency services or relevant authorities may be contacted. Every user agrees to this at account creation. You cannot opt out."
)
)
el_div("style=\"display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin-bottom:1.5rem\"",
card1 + card2 + card3 + card4
)
}
fn safety_statements() -> String {
let people_first: String = el_div(
"class=\"reveal card-dark\" style=\"padding:2rem 2.5rem;border-left:3px solid var(--navy);margin-bottom:1.5rem\"",
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1.25rem\"",
"This applies to anyone planning mass harm, a shooting, or serious self-harm. Not just child protection - anyone. The same logic holds: a misunderstanding can be resolved. A person's life can't be given back to them."
) +
el_p("style=\"font-family:var(--body);font-weight:700;font-size:1.125rem;color:var(--navy);line-height:1.4\"",
"People first, always."
)
)
let stat_card1: String = el_div(
"class=\"reveal card-dark\" style=\"padding:2rem 2.5rem;border-left:3px solid rgba(0,82,160,.30)\"",
el_p("style=\"font-family:var(--body);font-size:0.75rem;font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--navy);margin-bottom:0.75rem\"", "Why the routing works this way") +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:0.75rem\"",
"According to federal child maltreatment data (HHS, Child Maltreatment 2023), approximately 89% of child abuse victims are maltreated by a parent or caregiver. The emergency contact on file is not always a safe contact."
) +
el_p("style=\"font-family:var(--body);font-size:0.75rem;color:var(--t3)\"",
"Source: U.S. Department of Health & Human Services, Administration for Children and Families, " +
el_em("Child Maltreatment 2023") +
". " +
el_a("https://www.acf.hhs.gov/cb/data-research/child-maltreatment", "target=\"_blank\" rel=\"noopener\" style=\"color:var(--navy)\"", "acf.hhs.gov/cb/data-research/child-maltreatment")
)
)
let stat_card2: String = el_div(
"class=\"reveal card-dark\" style=\"padding:2rem 2.5rem;border-left:3px solid var(--navy)\"",
el_p("style=\"font-family:var(--body);font-weight:400;font-size:0.9375rem;color:var(--t1);line-height:1.8;margin-bottom:0.75rem\"",
"I recognize I will lose business over this. That doesn't matter to me."
) +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\"",
"This is still local. Neuron, LLC does not see your conversations. When a safety signal fires, the contact is made by your local instance - not by our servers. We are not in the loop. We cannot be. That's the architecture."
)
)
let statements: String = el_div(
"style=\"display:flex;flex-direction:column;gap:1.5rem;margin-bottom:2rem\"",
stat_card1 + stat_card2
)
let required: String = el_div(
"class=\"reveal\" style=\"padding:2rem 2.5rem;border:1px solid rgba(0,82,160,.15);background:rgba(0,82,160,.03)\"",
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\"",
"<strong style=\"color:var(--t1);font-weight:500\">Required before you can use Neuron.</strong> You must designate a Hard Bell contact during setup - before anything else. This is not a settings page you visit later. It happens first."
) +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8;margin-bottom:1rem\"",
"If you don&#39;t have someone to designate, you can use 988 - the Suicide &amp; Crisis Lifeline - as your Hard Bell contact. The system will accept it. The point is that no one goes in without a line out."
) +
el_p("style=\"font-family:var(--body);font-weight:300;font-size:0.9375rem;color:var(--t2);line-height:1.8\"",
"I&#39;m also establishing a Neuron crisis line - free, 24/7, staffed. Because I recognize that some people don&#39;t have anyone. The technology shouldn&#39;t make that worse. It should be the thing that catches you when nothing else does."
)
)
people_first + statements + required
}
fn safety() -> String {
el_section(
"id=\"safety\" aria-label=\"Safety\" style=\"padding:8rem 2.5rem;background:var(--bg2)\"",
el_div("class=\"container-lg\"", safety_intro() + safety_cards() + safety_statements())
)
}