/* Simple Text (mm-agent 10-15): phone first, big targets, nothing extra */
body.simple { margin: 0; background: var(--bg, #f6f5fb); color: var(--ink, #14123a); font-family: var(--sans, -apple-system, Segoe UI, Roboto, Arial, sans-serif); }
.sx { max-width: 560px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; min-height: 100vh; box-sizing: border-box; }
.sx-h { font-size: 1.4rem; margin: 4px 0 0; }
.sx-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sx-person { display: flex; align-items: stretch; border: 2px solid var(--line, #dcdbe8); border-radius: 20px; background: var(--card, #fff); overflow: hidden; }
.sx-person.on { border-color: var(--navy, #4b47d6); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy, #4b47d6) 25%, transparent); }
.sx-pick { flex: 1; min-width: 0; min-height: 72px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 12px 18px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-touch-callout: none; user-select: none; }
.sx-name { font-size: 1.2rem; font-weight: 700; overflow-wrap: anywhere; }
.sx-num { font-size: 1rem; color: var(--mut, #5e5c7a); }
.sx-pen { flex: none; width: 60px; border: 0; border-left: 1px solid var(--line, #dcdbe8); background: none; color: var(--mut, #5e5c7a); font-size: 1.35rem; cursor: pointer; }
.sx-person.add { border-style: dashed; }
.sx-addbtn .sx-name { color: var(--navy, #4b47d6); }
.sx-person.editing, .sx-person.add:has(form) { padding: 14px; }
.sx-edit { display: grid; gap: 10px; width: 100%; }
.sx-edit label { display: grid; gap: 4px; font-weight: 600; }
.sx-edit input { font-size: 1.1rem; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line, #dcdbe8); box-sizing: border-box; width: 100%; }
.sx-err { color: #b3261e; font-size: .95rem; min-height: 1px; }
.sx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-btn { min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line, #dcdbe8); background: var(--card, #fff); color: inherit; font-weight: 600; font-size: 1rem; font-family: inherit; cursor: pointer; }
.sx-btn.primary { background: var(--navy, #4b47d6); color: #fff; border-color: transparent; }
.sx-btn.danger { color: #b3261e; margin-left: auto; }
.sx-form { display: grid; gap: 10px; margin-top: auto; }
.sx-lbl { font-size: 1.05rem; }
.sx-form textarea { font-size: 1.15rem; line-height: 1.4; min-height: 120px; padding: 14px; border-radius: 18px; border: 2px solid var(--line, #dcdbe8); resize: vertical; box-sizing: border-box; width: 100%; background: var(--card, #fff); color: inherit; }
.sx-send { min-height: 68px; border: 0; border-radius: 22px; background: var(--navy, #4b47d6); color: #fff; font-weight: 800; font-size: 1.35rem; font-family: inherit; cursor: pointer; }
.sx-send.confirm { background: #1f7a4d; }
.sx-send:disabled { opacity: .7; }
.sx-send:focus-visible, .sx-pick:focus-visible, .sx-pen:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }
.sx-msg { border-radius: 16px; padding: 12px 14px; background: var(--card, #fff); border: 1px solid var(--line, #dcdbe8); font-size: 1.05rem; }
.sx-msg.warn { border-color: #f5b400; } .sx-msg.bad { border-color: #b3261e; } .sx-msg.ok { border-color: #1f7a4d; }
.sx-prev-h { font-size: .9rem; color: var(--mut, #5e5c7a); display: flex; gap: 8px; align-items: center; }
.sx-topic { font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--line, #dcdbe8); color: var(--mut, #5e5c7a); }
.sx-prev { font-size: 1.15rem; margin: 6px 0; overflow-wrap: anywhere; }
.sx-link { border: 0; background: none; color: var(--navy, #4b47d6); font-weight: 600; font-size: 1rem; font-family: inherit; padding: 8px 0; min-height: 44px; cursor: pointer; text-decoration: underline; }
.sx-note { color: var(--mut, #5e5c7a); font-size: .95rem; margin: 0; }
.sx-foot { text-align: center; margin: 4px 0 0; font-size: .9rem; }
.sx-foot a { color: var(--mut, #5e5c7a); }
@media (min-width: 900px) { .sx { padding-top: 40px; } .sx-people { max-height: 50vh; } }
.sx-queue { display: grid; gap: 10px; }
.sx-qi { border: 2px solid var(--line, #dcdbe8); border-radius: 18px; padding: 12px 14px; background: var(--card, #fff); }
.sx-qi.scheduled { border-color: #f5b400; } .sx-qi.ready { border-color: var(--navy, #4b47d6); } .sx-qi.sent, .sx-qi.opened { border-color: #1f7a4d; opacity: .85; } .sx-qi.failed { border-color: #b3261e; }
.sx-qi.hl { box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy, #4b47d6) 30%, transparent); }
.sx-qh { font-size: 1rem; } .sx-cd { font-variant-numeric: tabular-nums; }
.sx-qt { margin: 6px 0; overflow-wrap: anywhere; color: var(--mut, #5e5c7a); }
.sx-open { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 56px; font-size: 1.15rem; flex: 1; }
.sx-imp { list-style: none; text-align: center; }
.sx-choose { max-height: 40vh; overflow-y: auto; display: grid; gap: 4px; margin: 8px 0; }
.sx-ch { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 4px 6px; border-radius: 10px; }
.sx-ch input { width: 22px; height: 22px; }
.sx-ch span { color: var(--mut, #5e5c7a); margin-left: auto; }
/* Simple Text v3 (10-16): reword buttons above Send; × delete top-right and seconds countdown bottom-left on each pending message */
.sx-goals { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 8px; }
.sx-goals-l { width: 100%; font-size: .9rem; opacity: .8; }
.sx-goal { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.sx-goal[aria-pressed="true"] { background: #1b2a55; border-color: #1b2a55; color: #fff; }
.sx-goal[aria-pressed="true"]::before { content: "\2713  "; }
.sx-qi { position: relative; }
.sx-qi.scheduled { padding-right: 48px; }
.sx-qx { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; touch-action: manipulation; z-index: 2; }
.sx-qx:hover, .sx-qx:focus-visible { background: rgba(0,0,0,.08); }
.sx-qi.scheduled .sx-row { justify-content: space-between; align-items: center; }
.sx-qi .sx-cd { order: -1; margin-right: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .95rem; }
/* hotfix-j: back bar on the Simple Text page */
.sx-topnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.sx-topnav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; font-weight: 600; text-decoration: none; color: inherit; }
.sx-back { font-size: 1.05rem; }
.sx-homel { opacity: .75; font-size: .9rem; }

/* STOPGAP 10-18: always-on crisis help line + support card */
.mm-helpline { margin: 18px 0 6px; font-size: 13px; line-height: 1.5; color: #5a6678; text-align: center; }   /* MM-H3: 5.2:1 (was #6b7280, 4.48:1) */
.mm-helpline a { color: inherit; text-decoration: underline; }
.askmm-panel .mm-helpline { margin: 0; padding: 0 14px 10px; text-align: left; }
.sx-crisis { border: 2px solid #b4235a; background: #fff4f7; color: #3a0a1c; margin: 10px 0; line-height: 1.5; }
.sx-crisis-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sx-crisis-a .sx-btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mm-helpline { color: #9ca3af; } :root:not([data-theme="light"]) .sx-crisis { background: #2a0f19; color: #fde7ee; border-color: #e0507f; } }

/* MM-HERO1r3: the crisis card keeps its red styling whatever loads after it (v2.css flattened .sx-msg) */
#sx-crisis.sx-msg.sx-crisis, .sx-msg.sx-crisis { border: 2px solid #b4235a !important; background: #fff4f7 !important; color: #3a0a1c !important; margin: 10px 0; line-height: 1.5; }
#sx-crisis.sx-msg.sx-crisis b { color: #8f1240 !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #sx-crisis.sx-msg.sx-crisis, :root:not([data-theme="light"]) .sx-msg.sx-crisis { background: #2a0f19 !important; color: #fde7ee !important; border-color: #e0507f !important; } :root:not([data-theme="light"]) #sx-crisis.sx-msg.sx-crisis b { color: #ffb3cb !important; } }
:root[data-theme="dark"] #sx-crisis.sx-msg.sx-crisis, :root[data-theme="dark"] .sx-msg.sx-crisis { background: #2a0f19 !important; color: #fde7ee !important; border-color: #e0507f !important; }
