/* ANCHOR brand layer — matches theanchorcenter.org (deep green, gold, cream, Fraunces + Plus Jakarta Sans) */
:root {
  --navy: #0B2716; --navy2: #15442A; --gold: #D9A441; --gold-ink: #8A5A12;
  --bg: #F6F3EE; --card: #FFFFFF; --ink: #0B2716; --muted: #4E5A54; --line: #E4DED4;
  --ok: #1F6B3A; --ok-bg: #E5F2E8; --bad: #A33A2E; --bad-bg: #FBECE9; --soft: #EFE9DD;
  --r: 24px; --shadow: 0 1px 2px rgba(11,39,22,.05), 0 12px 32px rgba(11,39,22,.07);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: Fraunces, Georgia, serif;
}
[data-theme="dark"] { --bg: #061A0E; --card: #0F2E1C; --ink: #F1EDE4; --muted: #B5C4BA; --line: #1F4A30; --soft: #15382A; --ok-bg: #173A27; --bad-bg: #3A1A16; --gold-ink: #E7B95A; }
@media (min-width: 620px) { body { background: #E9E2D4; } [data-theme="dark"] body { background: #030D07; } .app { box-shadow: 0 0 70px rgba(11,39,22,.18); } }

h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.06; }
h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h3, .tile b, .stat b, .big, .big-num, .kv dd, .remember, .verse { font-family: var(--serif); }
.big { font-weight: 600; letter-spacing: -.02em; }
.stat b, .big-num, .kv dd { font-weight: 600; }
.remember { font-weight: 500; font-style: italic; color: var(--gold-ink); }
.verse { font-weight: 500 !important; font-style: italic; }
.eyebrow { letter-spacing: .18em; font-weight: 700; font-size: .78rem; }
.eyebrow.light, .hero .eyebrow, .top + main .hero .eyebrow { color: var(--gold); }

/* header */
.top { background: var(--navy); border-radius: 0 0 30px 30px; position: relative; overflow: hidden; border-bottom: 1px solid #1D4A2C; }
.top::after { content: ""; position: absolute; right: -40px; top: -30px; width: 190px; height: 190px; background: url(https://www.theanchorcenter.org/logo.webp) center/contain no-repeat; opacity: .08; pointer-events: none; }
.brand img { background: transparent; border-radius: 0; padding: 0; width: 50px; height: 50px; filter: drop-shadow(0 2px 6px #00000066); }
.brand b { font-family: var(--font); font-weight: 800; letter-spacing: .2em; font-size: 1.45rem; }
.brand small { color: #C3D6CA; opacity: 1; font-size: .78rem; letter-spacing: .04em; }
.avatar { background: var(--gold); color: var(--navy); font-weight: 800; }

/* dark green feature cards with the logo as a soft shadow */
.hero, .paycard, .fundcard { background: radial-gradient(520px 380px at 85% 20%, #24642F 0%, #15442A 50%, #0B2716 100%); border-radius: 28px; box-shadow: 0 18px 40px rgba(11,39,22,.28); border: 1px solid #FFFFFF14; }
.hero::after, .paycard::after, .fundcard::after { content: ""; position: absolute; right: -50px; bottom: -60px; width: 230px; height: 230px; background: url(https://www.theanchorcenter.org/logo.webp) center/contain no-repeat; opacity: .09; filter: drop-shadow(0 20px 40px #00000080); font-size: 0; pointer-events: none; }
.hero h1 { color: #fff; }
.hero p { color: #D3E2D9; opacity: 1; font-weight: 500; }
.sub, .label { color: #D3E2D9; opacity: 1; }
.link-light { color: var(--gold); }

/* buttons */
.btn { border-radius: 999px; font-weight: 700; letter-spacing: .01em; min-height: 48px; transition: transform .15s, background .2s; }
.btn:active { transform: scale(.98); }
.btn.gold { background: var(--gold); color: var(--navy); box-shadow: 0 8px 20px rgba(217,164,65,.28); }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.sm { border-radius: 999px; min-height: 44px; }

/* cards & tiles */
.card { border-radius: var(--r); border: 1px solid var(--line); }
.card.accent { border-left: 5px solid var(--gold); }
.stat { border: 1px solid var(--line); }
.stat b { color: var(--navy); }
[data-theme="dark"] .stat b { color: var(--gold); }
.tile { border: 1px solid var(--line); transition: transform .15s, box-shadow .2s; }
.tile:active { transform: scale(.98); }
.tile .emo { width: 48px; height: 48px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 10px; color: var(--navy); }
.tile .emo svg { width: 24px; height: 24px; }
[data-theme="dark"] .tile .emo { color: var(--gold); }
.tile b { font-weight: 600; font-size: 1.08rem; }
.tag.gold { background: var(--gold); color: var(--navy); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.meter i { background: linear-gradient(90deg, #D9A441, #E7B95A); }
.list li { border-top-color: var(--line); }
.list .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; flex: none; font-size: 1.15rem; }
input, select, textarea { font-family: var(--font); }
input[type="range"], input[type="checkbox"] { accent-color: #1F6B3A; }

/* tab bar */
.tabbar { background: var(--navy) !important; border-top: 1px solid #1D4A2C !important; }
.tabbar a { color: #C3D6CA !important; font-family: var(--font); font-weight: 600; }
.tabbar a[aria-current] { color: var(--gold) !important; }
.tabbar a span { font-size: 1.25rem; }

/* ----- new: SOS button & sheet ----- */
.sos-fab { position: fixed; right: max(16px, calc(50% - 280px + 16px)); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 40; width: 60px; height: 60px; border-radius: 50%; border: 3px solid #fff; background: #B3261E; color: #fff; font: 800 .95rem var(--font); letter-spacing: .04em; box-shadow: 0 10px 28px rgba(179,38,30,.45); cursor: pointer; }
.sos-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(6,26,14,.72); display: flex; align-items: flex-end; justify-content: center; }
.sos-panel { width: 100%; max-width: 560px; background: var(--card); color: var(--ink); border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; max-height: 88vh; overflow: auto; }
.sos-panel h2 { margin: 0 0 4px; }
.sos-line { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 18px; background: var(--soft); text-decoration: none; color: var(--ink); }
.sos-line b { font-size: 1.1rem; } .sos-line small { color: var(--muted); }
.sos-line.urgent { background: #B3261E; color: #fff; } .sos-line.urgent small { color: #FBE3E0; }

/* ----- new: toolkit ----- */
.tool-hero { display: flex; flex-direction: column; gap: 6px; }
.breath { width: 180px; height: 180px; margin: 10px auto; border-radius: 50%; background: radial-gradient(circle, #E7B95A 0%, #D9A441 45%, #15442A 100%); display: grid; place-items: center; color: #0B2716; font: 700 1.05rem var(--font); transform: scale(.7); transition: transform 4s ease-in-out; box-shadow: 0 0 0 10px rgba(217,164,65,.15); }
.breath.in { transform: scale(1); }
.timer-big { font-family: var(--serif); font-size: 3rem; font-weight: 600; text-align: center; margin: 0; color: var(--navy); }
[data-theme="dark"] .timer-big { color: var(--gold); }
.halt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.halt label { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 16px; padding: 12px 14px; font-weight: 600; cursor: pointer; }
.halt small { display: block; font-weight: 500; color: var(--muted); }
.money-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-weight: 600; }
.money-row b { font-family: var(--serif); font-size: 1.15rem; }
.money-row.total b { color: var(--ok); font-size: 1.4rem; }
.money-row.neg b { color: var(--bad); }
.docs li label, .chores li label { display: flex; gap: 12px; align-items: center; width: 100%; cursor: pointer; }
.docs li input, .chores li input { width: 22px; height: 22px; flex: none; }
.done-line { text-decoration: line-through; color: var(--muted); }
.pts { display: flex; align-items: center; gap: 14px; }
.pts .ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font: 700 1.3rem var(--serif); color: var(--navy); background: conic-gradient(var(--gold) var(--p, 0%), var(--line) 0); position: relative; flex: none; }
.pts .ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.pts .ring span { position: relative; }
[data-theme="dark"] .pts .ring { color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row input, .form-row select { width: 100%; }