:root{--forest:#102b22;--green:#24573e;--bright:#669c37;--gold:#dcb96a;--cream:#f7edcf;--paper:#fbfaf6;--ink:#182a20;--muted:#758178;--line:#e8e7dc;--shadow:0 10px 35px #122b2110}*{box-sizing:border-box}body{margin:0;background:#e9ece6;color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}.app-shell{background:var(--paper);max-width:500px;margin:auto;min-height:100dvh;padding-bottom:98px;box-shadow:0 0 65px #122b2115}.topbar{height:84px;background:var(--forest);padding:14px 20px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:5}.brand{display:flex;gap:11px;align-items:center;color:white}.brand-logo{width:54px;height:54px;object-fit:contain;border-radius:50%;background:white}.brand strong{font-family:Georgia,serif;display:block;font-size:21px;line-height:1.05;letter-spacing:-.4px}.brand small{display:block;letter-spacing:4px;font-size:9px;color:var(--gold);margin-top:5px;font-weight:700}.avatar{width:38px;height:38px;border:1px solid #597364;border-radius:50%;background:#305140;color:#fce4a7;font-size:12px;font-weight:700}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:500px;height:78px;display:flex;justify-content:space-around;background:#fff;border-top:1px solid var(--line);padding:8px 6px max(8px,env(safe-area-inset-bottom));z-index:6}.bottom-nav button{display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;background:none;border:0;color:#88938b;font-size:11px;font-weight:600;flex:1}.bottom-nav button.active{color:var(--green)}.nav-icon{font-size:27px;line-height:28px;font-weight:500}.content{padding:24px 20px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;color:var(--bright);text-transform:uppercase}.page-title{font:700 30px/1.12 Georgia,serif;margin:7px 0 8px}.subhead{color:var(--muted);font-size:14px;line-height:1.6;margin:0 0 21px}.hero{background:var(--forest);color:white;border-radius:22px;padding:24px;position:relative;overflow:hidden;margin-bottom:22px}.hero:after{content:'✳';position:absolute;font-size:190px;right:-32px;top:-56px;color:#ffffff0a}.hero .eyebrow{color:var(--gold)}.hero h1{font:700 32px/1.1 Georgia,serif;margin:13px 0 8px;max-width:270px;position:relative;z-index:1}.hero p{color:#cbd9cf;font-size:13px;line-height:1.6;position:relative;z-index:1;max-width:290px}.hero .primary{margin-top:10px;position:relative;z-index:1}.primary,.secondary,.subtle,.danger-btn{border:none;border-radius:12px;padding:13px 16px;font-weight:800;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}.primary{background:var(--gold);color:var(--forest)}.secondary{background:var(--green);color:#fff}.subtle{background:#eaf1e9;color:var(--green)}.danger-btn{background:#ffefed;color:#a83b34}.wide{width:100%}.stats{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-bottom:23px}.stat{background:white;border:1px solid var(--line);border-radius:17px;padding:18px 15px;box-shadow:var(--shadow)}.stat .number{font:700 31px/1.2 Georgia,serif;color:var(--forest)}.stat .label{font-size:12px;color:var(--muted);margin-top:7px}.section-head{display:flex;justify-content:space-between;align-items:center;margin:25px 0 13px;gap:12px}.section-head h2{font:700 21px Georgia,serif;margin:0}.text-button{background:none;border:0;color:var(--green);font-size:12px;font-weight:800;padding:6px}.item-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:15px;margin-bottom:10px;display:flex;align-items:center;gap:12px;box-shadow:0 4px 18px #102b2208}.initials{background:#e9f1e7;color:var(--green);border-radius:13px;width:49px;height:49px;flex:none;display:grid;place-items:center;font-weight:800}.item-copy{flex:1;min-width:0}.item-copy strong{display:block;font-size:14px;margin-bottom:4px}.item-copy small{display:block;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chevron{color:#8c9e90;font-size:22px}.chip{font-size:10px;font-weight:800;border-radius:20px;padding:5px 9px;background:#eef4eb;color:#477340;display:inline-block}.row-actions{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.search{display:block;background:white;border:1px solid #e0e5db;border-radius:13px;padding:12px 14px;width:100%;outline-color:var(--bright);margin:15px 0}.empty{background:#fff;border:1px dashed #cdd6ca;border-radius:17px;padding:30px 18px;text-align:center;color:var(--muted);line-height:1.7;font-size:14px}.empty strong{display:block;color:var(--ink);font:700 20px Georgia,serif;margin-bottom:5px}.filterbar{display:flex;gap:8px;margin:14px 0;overflow-x:auto}.filterbar button{border:1px solid var(--line);background:white;border-radius:50px;padding:9px 14px;white-space:nowrap;font-size:12px;color:var(--muted);font-weight:700}.filterbar button.selected{background:var(--forest);color:white;border-color:var(--forest)}.ref-card{border:1px solid var(--line);border-radius:15px;background:white;margin-bottom:11px;padding:16px}.ref-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px}.ref-route{font-weight:700;font-size:14px;line-height:1.7}.ref-route span{color:var(--bright)}.ref-meta{font-size:12px;color:var(--muted);line-height:1.8}.rank{font:700 22px Georgia,serif;color:var(--green);width:32px;text-align:center}.rank.first{color:#bc9334}.bar{height:5px;background:#edf1eb;border-radius:99px;overflow:hidden;margin-top:9px}.bar>div{height:100%;background:var(--bright);border-radius:99px}.pill{border-radius:99px;padding:5px 9px;font-size:11px;font-weight:700;background:#f1f3f0;color:#657769}.pill.closed{background:#e7f4e4;color:#3d7c3e}.pill.sent{background:#fff4d9;color:#95702b}.pill.contacted{background:#e6eff9;color:#3e6a9a}.modal-cover{position:fixed;inset:0;background:#07160eb3;display:flex;align-items:flex-end;justify-content:center;z-index:20}.modal{background:var(--paper);border-radius:24px 24px 0 0;width:100%;max-width:500px;max-height:92dvh;overflow:auto;padding:23px 22px calc(28px + env(safe-area-inset-bottom));box-shadow:0 -12px 45px #06150e33}.modal-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}.modal h2{font:700 26px Georgia,serif;margin:3px 0}.x{border:0;background:#ecf0ea;width:32px;height:32px;border-radius:50%;color:var(--forest);font-size:20px}.field{display:block;margin:12px 0}.field span{display:block;font-size:12px;font-weight:800;margin-bottom:7px;color:#45614e}.field input,.field select,.field textarea{display:block;width:100%;border:1px solid #dbe1d8;border-radius:11px;padding:13px;background:#fff;color:#233c2c;outline-color:var(--green)}.field textarea{min-height:80px;resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.modal-actions{display:flex;gap:10px;margin-top:18px}.modal-actions>*{flex:1}.detail-title{display:flex;gap:12px;align-items:center}.detail-list{margin:20px 0}.detail-line{padding:12px 0;border-bottom:1px solid var(--line);font-size:14px;overflow-wrap:anywhere}.detail-line label{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.detail-line a{color:var(--green)}.divider{height:1px;background:var(--line);margin:20px 0}.notice{padding:13px;border-radius:12px;background:#e9f1e8;color:#47634d;font-size:12px;line-height:1.6;margin:15px 0}.footnote{color:var(--muted);font-size:11px;line-height:1.6;margin:15px 0}.intro-card{background:var(--cream);border-radius:15px;padding:16px;margin:15px 0;color:#4b4e34;font-size:13px;line-height:1.7;white-space:pre-wrap}#toast{position:fixed;bottom:95px;left:50%;transform:translateX(-50%);background:var(--forest);color:white;padding:12px 17px;border-radius:12px;opacity:0;pointer-events:none;transition:opacity .15s;z-index:40;font-size:13px;max-width:90vw;text-align:center}#toast.show{opacity:1}@media(min-width:650px){.app-shell{margin:25px auto;min-height:calc(100dvh - 50px);border-radius:24px;overflow:hidden}.bottom-nav{bottom:0;border-radius:16px 16px 0 0}.modal-cover{align-items:center}.modal{border-radius:24px;max-height:88dvh}}@media(max-width:360px){.content{padding:18px 14px}.hero h1{font-size:27px}.primary,.secondary,.subtle{padding:11px 12px}}

/* Contact sharing is the main action of the app. */
.share-content{padding-top:17px}.share-hero{background:linear-gradient(135deg,#102b22 0%,#24573e 100%);border-radius:22px;padding:27px 23px 22px;color:#fff;box-shadow:0 9px 24px #102b2226}.share-hero .eyebrow{color:#dcb96a}.share-hero h1{font:700 32px/1.14 Georgia,serif;letter-spacing:-.6px;margin:15px 0 11px}.share-hero h1 em{color:#dcb96a;font-style:normal}.share-hero p{font-size:13px;line-height:1.7;color:#e0eade;margin:0 0 17px}.hero-tag{color:#f7edcf;font-size:11px;border:1px solid #ffffff42;border-radius:100px;padding:9px 11px;display:inline-block}.share-intro{margin:25px 1px 12px}.share-intro h2{font:700 23px/1.18 Georgia,serif;margin:7px 0}.share-intro p{font-size:13px;color:#758178;line-height:1.6;margin:7px 0 0}.search-wrap{position:relative}.search-wrap>span{position:absolute;top:21px;left:13px;transform:translateY(-50%);font-size:25px;color:#577b5e;pointer-events:none}.share-search{padding-left:43px;margin:14px 0 18px;background:#fff}.share-list-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.share-list-heading strong{font:700 19px Georgia,serif}.share-list-heading span{font-size:11px;color:#758178}.share-member{background:#fff;border:1px solid #e6e9de;border-radius:17px;padding:14px;margin-bottom:12px;box-shadow:0 5px 19px #102b2209}.share-member-info{width:100%;display:flex;align-items:center;gap:12px;text-align:left;border:0;background:none;padding:0 0 12px}.share-member-info .initials{width:52px;height:52px;border-radius:14px}.share-member-info .chip{margin-top:7px}.share-member-actions{display:grid;grid-template-columns:1.35fr 1fr;gap:9px}.share-member-actions button{border:0;border-radius:10px;padding:12px 5px;font-size:12px;font-weight:800}.share-direct{background:#24573e;color:#fff}.share-save{background:#f7edcf;color:#234831}.sharing-tip{font-size:12px;line-height:1.6;padding:15px;background:#f1f2e8;border-radius:14px;color:#4a624e;margin-top:19px}.bottom-nav button[data-page=share].active .nav-icon{background:#24573e;color:white;border-radius:12px;width:39px;padding:2px 0}.bottom-nav button[data-page=share].active{color:#24573e}

.identity-card{background:#f7edcf;border:1px solid #e6d9b7;border-radius:15px;padding:14px;margin:14px 0}.identity-card label{font-size:12px;font-weight:800;color:#24573e;display:block;margin-bottom:8px}.identity-card select{width:100%;background:#fff;border:1px solid #d6cfbb;padding:11px;border-radius:10px;color:#102b22}.identity-card p{font-size:11px;line-height:1.45;color:#66725b;margin:8px 0 0}.pill.shared{background:#f0e9ff;color:#5f488b}

/* v4: referral-first home screen and date ranges */
.referral-first{padding:12px 1px 4px}.referral-first .eyebrow{color:#24573e}.referral-first h1{font:700 34px/1.12 Georgia,serif;letter-spacing:-.8px;color:#102b22;margin:12px 0}.referral-first p{color:#607267;font-size:14px;line-height:1.65;margin:0 0 8px}.referral-first+.search-wrap .share-search{margin:14px 0 12px;box-shadow:0 3px 16px #102b2212}.period-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:5px;background:#e8ede5;border-radius:13px;margin:18px 0 16px}.period-tabs button{border:none;background:transparent;color:#546c57;font-size:12px;font-weight:800;border-radius:10px;padding:11px 3px;white-space:nowrap}.period-tabs button.selected{background:#24573e;color:#fff;box-shadow:0 3px 9px #102b2226}.share-content .identity-card{margin:2px 0 19px}
/* Cloud-ready application refinements */
#bottomNav[hidden]{display:none!important}.share-member-actions button:disabled{opacity:.4;cursor:not-allowed}.modal .subtle.wide{margin-top:9px}.modal input,.modal textarea,.modal select{font-size:16px}.share-member-info:focus-visible,button:focus-visible{outline:3px solid #dcb96a;outline-offset:2px}#main{min-height:65vh}
