/* Mapping Children’s Health: shared identity, directory, map and network. */
:root {
  --font-heading:'Outfit',system-ui,sans-serif;
  --font-body:'DM Sans',system-ui,sans-serif;
  --tcl-navy:#153b40; --tcl-teal:#006d70; --tcl-teal-dark:#005457;
  --tcl-teal-light:#e7f3f0; --tcl-sand:#f3f1eb;
  --text-primary:#203a3d; --text-secondary:#526567; --text-muted:#627274;
  --border-subtle:#d9e2df; --border-card:#d9e2df;
  --bg-page:#f8f8f3; --bg-card:#fff; --accent:var(--tcl-teal);
  --pin-hospital:#24496b; --pin-startup:#007074; --pin-investor:#987119;
  --pin-hub:#765e94; --pin-default:#627274;
  color-scheme:light;
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;min-height:100%;font-family:var(--font-body);font-size:15px;line-height:1.55;color:var(--text-primary);background:var(--bg-page);-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
button,a,input,select,summary{-webkit-tap-highlight-color:transparent}
button,summary{cursor:pointer}
button:disabled{opacity:.5;cursor:default}
a{color:var(--accent);text-underline-offset:4px}
a:hover{text-decoration:underline}
:focus-visible{outline:3px solid #b77f23;outline-offset:3px}
h1,h2,h3,h4{font-family:var(--font-heading);font-weight:600;line-height:1.2;letter-spacing:-.025em}
p{color:var(--text-secondary)}
.skip-link{position:absolute;top:-100px;left:16px;z-index:1000;background:white;padding:12px 18px;border-radius:8px}
.skip-link:focus{top:12px}
/* The project links home; the initiative credit is a separate external link. */
body>header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 32px;background:#fff;border-bottom:1px solid var(--border-subtle);flex:none;position:relative;z-index:30}
.brand{display:flex;align-items:center;gap:12px;color:var(--tcl-navy);text-decoration:none;flex-shrink:0}
.brand:hover{text-decoration:none}
.brand-name{font-family:var(--font-heading);font-size:17px;line-height:1.15;letter-spacing:-.02em}
.brand-name strong{font-weight:600}
.brand-mark{position:relative;width:36px;height:38px;display:block;flex:none}
.brand-mark i{position:absolute;width:15px;height:15px;border-radius:50%;background:var(--accent);left:0;top:2px}
.brand-mark i:nth-child(2){left:20px;top:9px;background:#b27e32}
.brand-mark i:nth-child(3){left:8px;top:23px;background:#789b8e}
body>header nav{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
body>header nav a,body>header nav button{min-height:44px;padding:10px 14px;font-size:13px;font-weight:600;border-radius:8px;white-space:nowrap;text-decoration:none}
body>header nav a{color:var(--text-secondary)}
body>header nav a:hover,body>header nav a[aria-current]{background:var(--tcl-teal-light);color:var(--accent)}
.btn-primary,.btn-suggest{background:var(--accent);border:1px solid var(--accent);color:#fff;border-radius:8px;padding:11px 16px;min-height:44px;font-weight:600}
.btn-primary:hover,.btn-suggest:hover{background:var(--tcl-teal-dark)}
.btn-secondary{background:var(--tcl-sand);border:1px solid var(--border-subtle);border-radius:8px;padding:10px 14px;min-height:44px;font-weight:600}
body>header .btn-secondary{background:transparent;border-color:transparent}
.mission-banner{display:flex;align-items:center;justify-content:space-between;gap:12px 28px;padding:10px 32px;background:var(--bg-page);border-bottom:1px solid var(--border-subtle);flex:none}
.mission-banner p{font-size:13px;margin:0}
.mission-banner a{font-size:12px;white-space:nowrap;text-decoration:none;color:var(--text-secondary)}
.mission-banner a:hover{text-decoration:underline}
/* Map and directory have independent layouts and navigation. */
body.map-page{height:100dvh;min-height:360px;display:flex;flex-direction:column;overflow:hidden}
.map-layout{flex:1;min-height:0;position:relative}
#mapRegion{height:100%;position:relative;min-width:0;min-height:0;background:#e5eeea}
#map{position:absolute;inset:0}
body.directory-page{min-height:100dvh;display:block;overflow:auto}
.directory-layout{width:min(100%,1200px);margin:0 auto;padding:24px 32px 64px}
body.directory-page aside#directory{min-width:0;width:100%;min-height:calc(100dvh - 190px);overflow:visible;overscroll-behavior:auto;padding:20px 16px;background:transparent;border:0;scrollbar-gutter:auto}
body.directory-page .results{grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:18px}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);margin:0 0 12px}
aside h1{font-size:36px;margin:0 0 12px;line-height:1.12}
h1 em{font-style:normal;color:var(--accent)}
aside>p{font-size:14px;margin:0 0 18px;line-height:1.65}
p.status{font-size:12px;color:var(--text-muted);margin:0 0 20px}
label{display:block;font-size:12px;font-weight:600;margin-bottom:7px}
input:not([type=checkbox]),select{width:100%;min-height:46px;padding:11px 12px;border:1px solid #acbfbb;border-radius:8px;background:#fff;min-width:0;font-size:14px}
input:hover,select:hover{border-color:var(--accent)}
input:focus,select:focus{border-color:var(--accent)}
#search{margin-bottom:12px}
.filter-panel{border-bottom:1px solid var(--border-subtle);padding-bottom:8px}
summary{min-height:44px;padding:10px 0;font-size:13px;font-weight:600;color:var(--accent)}
#filterCount{font-variant-numeric:tabular-nums}
.filters{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0 12px}
.filters>div{min-width:0}
.filters>div:last-child{grid-column:1/-1}
.results-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;margin:14px 0;font-size:13px}
#reset{border:0;background:none;color:var(--accent);min-height:44px;padding:8px 0;font-size:12px;font-weight:600}
#reset:hover{text-decoration:underline}
.saved-toggle{min-height:40px;padding:8px 13px;border:1px solid var(--border-subtle);border-radius:999px;background:var(--bg-card);color:var(--text-primary);font-size:12px}
.saved-toggle[aria-pressed=true]{background:#e6f2f5;border-color:#419EBF;color:#051D23}
.results,.network-results{display:grid;gap:14px}
.entry{min-width:0;border:1px solid var(--border-card);border-radius:12px;background:#fff;padding:20px;overflow-wrap:anywhere}
.entry-top{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap;margin-bottom:10px}
.logo-fallback{width:32px;height:32px;flex:none;display:grid;place-items:center;background:var(--tcl-teal-light);color:var(--accent);border-radius:8px;font-size:11px;font-weight:700}
.name{flex:1;min-width:120px;font-size:17px;margin:3px 0 0;line-height:1.3}
.stage-badge{display:inline-block;font-size:11px;padding:4px 8px;background:#edf1f7;color:#395775;border-radius:5px;max-width:100%}
.meta{font-size:12px;color:var(--text-muted);margin:0 0 12px}
.desc{font-size:14px;line-height:1.65;margin:0 0 14px}
.tags,.popup-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.tag{background:var(--tcl-sand);border:1px solid transparent;border-radius:5px;color:var(--text-secondary);font-size:11px;padding:7px 9px;line-height:1.5}
button.tag:hover{background:var(--tcl-teal-light);color:var(--accent)}
.verification{font-size:11px;line-height:1.6;color:var(--text-muted);margin:12px 0}
.card-links,.popup-links{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;padding-top:10px;border-top:1px solid var(--border-subtle)}
.text-link,.map-link,.venture-contact{display:inline-flex;align-items:center;font-size:12px;font-weight:600;min-height:40px;text-decoration:none}
.map-link{border:0;background:none;padding:0;color:var(--accent)}
.text-link:hover,.map-link:hover,.venture-contact:hover{text-decoration:underline}
.venture-contact{margin-top:10px}
.portfolio-btn{background:var(--tcl-sand);border:1px solid var(--border-subtle);color:var(--text-primary);border-radius:6px;min-height:44px;padding:8px 12px;font-size:12px;margin-bottom:12px;max-width:100%}
footer{border-top:1px solid var(--border-subtle);margin-top:28px;padding:24px 0 8px}
footer h2{font-size:20px;margin:0 0 10px}footer p{font-size:13px;line-height:1.7}
/* Map overlays are compact and stay clear of zoom and attribution controls. */
.map-tools{position:absolute;top:16px;left:16px;z-index:3;display:flex;flex-wrap:wrap;gap:8px;max-width:calc(100% - 76px)}
.map-tools button{background:white;border:1px solid var(--border-subtle);border-radius:8px;padding:10px 12px;min-height:44px;font-size:12px;box-shadow:0 2px 8px #203a3d0d}
.map-tools button:hover:not(:disabled){background:var(--tcl-teal-light)}
.map-note{position:absolute;bottom:40px;left:16px;z-index:2;border-radius:8px;padding:10px 12px;font-size:11px;line-height:1.6;max-width:min(330px,calc(100% - 32px));background:#ffffffed;border:1px solid var(--border-subtle);color:var(--text-secondary);pointer-events:none}
.map-legend{position:absolute;bottom:135px;left:16px;z-index:3;background:#fffffff5;border:1px solid var(--border-subtle);border-radius:8px;padding:0 12px;max-width:230px;max-height:calc(100% - 230px);overflow:auto}
.map-legend summary{font-size:12px}
.legend-items{display:grid;gap:2px;padding-bottom:10px}
.legend-item{display:flex;align-items:center;gap:8px;text-align:left;border:0;border-radius:5px;padding:8px;min-height:40px;font-size:12px;background:transparent}
.legend-item:hover,.legend-item[aria-pressed=true]{background:var(--tcl-teal-light)}
.legend-dot{width:10px;height:10px;flex:none;border-radius:50%}
.dot-hospital{background:var(--pin-hospital)}.dot-startup,.dot-tcl{background:var(--pin-startup)}.dot-investor{background:var(--pin-investor)}.dot-hub{background:var(--pin-hub)}
.map-fallback{position:absolute;inset:0;display:grid;place-items:center;padding:80px 24px;text-align:center;background:#eaf1ed;color:var(--text-secondary)}
.map-pin{width:24px;height:24px;border:3px solid white;border-radius:50%;background:var(--pin-default);box-shadow:0 2px 6px #0003;padding:0;cursor:pointer}
.map-pin:hover{box-shadow:0 0 0 5px #ffffff80,0 2px 8px #0004}
.map-pin.type-hospital{background:var(--pin-hospital)}.map-pin.type-startup{background:var(--pin-startup)}.map-pin.type-investor{background:var(--pin-investor)}.map-pin.type-hub{background:var(--pin-hub)}
.map-pin.tcl-pin{width:32px;height:32px;background:var(--accent) url('child-lens-map-pin.png') center/75% auto no-repeat;box-shadow:0 0 0 2px var(--accent)}
.maplibregl-popup{z-index:20;max-width:min(340px,calc(100vw - 32px))!important}
.maplibregl-popup-content{border-radius:12px;padding:20px;font-family:var(--font-body);color:var(--text-primary);max-height:55dvh;overflow:auto}
.maplibregl-popup-close-button{font-size:22px;min-width:36px;min-height:36px}
.popup-card-body>header{display:flex;gap:10px;padding-right:22px;flex-wrap:wrap}
.popup-title{font-size:18px;margin:0}.popup-meta{font-size:12px}.popup-desc{font-size:13px;line-height:1.6}
/* Network shares the directory’s typography and controls. */
.network-shell{max-width:1040px;margin:auto;padding:48px 32px 64px}
.network-shell h1{font-size:clamp(34px,4vw,48px);margin:0 0 18px}
.network-shell>p{max-width:650px;font-size:15px;line-height:1.7}
.network-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:28px 0 24px;padding:5px;border:1px solid var(--border-subtle);border-radius:10px;background:#edf1eb;width:fit-content}
.network-tabs button{min-height:44px;border:0;border-radius:6px;padding:10px 16px;font-size:13px;font-weight:600;background:transparent;color:var(--text-secondary)}
.network-tabs button[aria-pressed=true]{background:white;color:var(--accent);box-shadow:0 1px 4px #203a3d15}
#networkSearch{max-width:650px;margin-bottom:16px}
.network-results{margin:24px 0;grid-template-columns:repeat(2,minmax(0,1fr))}
.network-results h2{font-size:21px;margin:0 0 16px}.network-results h3{font-size:14px}.network-results p,.network-results li{font-size:14px;line-height:1.7}
.network-cta{border-radius:12px;border:1px solid #c4d9d0;padding:28px;background:var(--tcl-teal-light);margin-top:36px}
.network-cta h2{font-size:26px;margin:0 0 12px}.network-cta p{max-width:640px;font-size:14px}
.empty-state{grid-column:1/-1;border:1px dashed #acbfbb;border-radius:10px;padding:24px;background:#fff}
/* Dialogs remain usable on small screens and when the keyboard is open. */
dialog.tcl-modal{width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--border-subtle);border-radius:14px;padding:28px;color:var(--text-primary);box-shadow:0 16px 60px #153b4033}
dialog::backdrop{background:#153b4077}
.modal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}.modal-header h2{font-size:24px;margin:4px 0}
.modal-close{border:0;background:var(--tcl-sand);border-radius:6px;min-width:44px;min-height:44px;font-size:24px}
.modal-sub{font-size:14px;line-height:1.65;margin:0 0 20px}
.form-group{margin-bottom:14px;min-width:0}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gdpr-box{padding:14px;background:var(--bg-page);border-radius:8px;margin:18px 0}.gdpr-checkbox-label{display:flex;gap:12px;font-size:12px;line-height:1.65}.gdpr-checkbox-label input{flex:none;width:20px;height:20px;margin:3px 0}
.form-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px}.form-msg{font-size:14px}
.label-short{display:none}
@media(max-width:1050px){body>header{gap:16px;padding:16px 20px}body>header nav a,body>header nav button{padding:10px;font-size:12px}.mission-banner{padding:10px 20px}.mission-banner p{max-width:450px}.brand-name{font-size:16px}}
@media(max-width:840px){
  .brand-name{font-size:17px}body>header nav{gap:4px;display:flex;justify-content:center}
  body>header nav a,body>header nav button{padding:10px 9px;font-size:12px}
  body>header nav .btn-suggest{margin-left:auto}
  .label-wide{display:none}.label-short{display:inline}
  .mission-banner{display:block;padding:10px 20px}.mission-banner p{font-size:12px;max-width:none}.mission-banner a{display:inline-block;margin-top:4px;font-size:11px}
  body.map-page .map-mission{display:none}
  body.map-page .map-tools{top:62px;left:12px;gap:6px}
  body.directory-page .directory-layout{padding:18px 16px 48px}
  body.directory-page aside#directory{padding:14px 2px}
  body.directory-page aside h1{font-size:clamp(2rem,8vw,2.5rem)}
  body.directory-page aside h1 br{display:none}
  body.directory-page aside h1 em::before{content:' '}
  body.directory-page .results{grid-template-columns:minmax(0,1fr)}
  input:not([type=checkbox]),select{font-size:16px}
  .map-tools button{font-size:11px;padding:9px}
  .map-note{left:12px;bottom:40px;max-width:min(330px,calc(100% - 24px));font-size:10px}
  .map-legend{left:12px;bottom:128px}
  .network-shell{padding:32px 20px 48px}.network-results{grid-template-columns:1fr}
  .network-tabs{width:100%}.network-tabs button{flex:1;padding:10px;font-size:12px}
  .network-cta{padding:24px}.tag{min-height:36px}.card-links a,.card-links button{min-height:44px}
}
@media(max-width:380px){body>header{padding:10px 8px}body>header nav{gap:0}body>header nav a,body>header nav button{font-size:10px;padding:9px 6px}.mission-banner{padding:10px 12px}.brand-name{font-size:16px}.filters{grid-template-columns:1fr}.form-row{grid-template-columns:1fr}.network-tabs button{padding:10px 6px}.entry{padding:16px}}
@media(max-height:500px) and (max-width:840px) and (orientation:landscape){body.map-page{min-height:300px}body>header{padding:6px 8px}.brand-name{font-size:13px}.brand-mark{display:none}.map-legend{bottom:100px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media(max-width:380px){body>header nav .btn-secondary,body>header nav .btn-suggest{padding:10px 6px}body>header nav{flex-wrap:nowrap}}

/* Mobile/navigation polish: keep controls reachable without horizontal clipping. */
@media(max-width:840px){
  body>header nav{min-width:0;flex-wrap:nowrap;white-space:nowrap}
  .map-legend{max-height:max(44px,calc(100% - 230px))}
  .legend-item,.maplibregl-popup-close-button{min-height:44px}
  .maplibregl-popup-close-button{min-width:44px}
  dialog.tcl-modal{overscroll-behavior:contain;padding:20px;overflow-wrap:anywhere}
  .form-row{grid-template-columns:1fr}
  .network-tabs{display:grid;grid-template-columns:1fr 1fr}
  .network-tabs button:last-child{grid-column:1/-1}
}
@media(max-height:500px) and (max-width:840px) and (orientation:landscape){
  .brand{display:none}
  body>header nav{justify-content:center}
  .map-tools{top:8px}
  .map-note{display:none}
  .map-legend{bottom:36px;max-height:calc(100% - 100px)}
}

/* Professional profiles and independent contact preferences. */
.profile-field { display: grid; gap: .4rem; margin: 1rem 0; font-weight: 600; }
.profile-field input, .profile-field textarea, .profile-field select { box-sizing: border-box; width: 100%; padding: .75rem; font: inherit; border: 1px solid #687f7d; border-radius: .4rem; background: #fff; color: #102b32; }
.profile-field textarea { min-height: 6rem; resize: vertical; }
.profile-choice { display: flex; align-items: flex-start; gap: .65rem; margin: .8rem 0; }
.profile-choice[hidden] { display: none; }
.profile-choice input { flex: 0 0 auto; margin-top: .25rem; }
.profile-provider { display: block; width: 100%; margin: .8rem 0; }
.profile-organisations { display: grid; gap: .4rem; }
#authModal { max-height: 85dvh; overflow-y: auto; }
#authModal fieldset { min-width: 0; margin: 1rem 0; padding: .8rem; border: 1px solid #687f7d; border-radius: .4rem; }
#authModal legend { font-weight: 700; }
#authModal .form-msg:not(:empty) { padding: .75rem; border: 1px solid currentColor; }

.profile-preview { margin: 1rem 0; padding: 1rem; border: 1px solid #687f7d; border-radius: .4rem; white-space: pre-wrap; }
.profile-preview a { display: block; margin: .6rem 0; }
#authModal button { min-height: 44px; }
#authModal input[type=checkbox] { width: 20px; height: 20px; }
#authModal .profile-choice { min-height: 44px; align-items: center; }

.account-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: .8rem 0; }
.account-actions .form-msg { flex-basis: 100%; margin: 0; }
.profile-affiliation { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: .6rem 0; }
.profile-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; display: block; margin: .8rem 0; }
.profile-avatar[hidden] { display: none; }
#authModal fieldset > button { margin: .3rem; }
#authModal .form-msg { scroll-margin-block: 1rem; }

/* Accepted Branding direction, applied to the live directory and account surfaces. */
:root{--bg-page:#f3f0ee;--bg-card:#fcfbfa;--tcl-sand:#eee9e4;--text-primary:#153b40;--border-subtle:#d8ded8;--border-card:#d8ded8}
h1,h2,h3,h4{font-weight:500;letter-spacing:-.02em}
.brand-name{font-weight:450}.brand-name strong{font-weight:500}
.brand-mark{width:38px;height:40px}
.brand-mark i{left:2px;top:2px;animation:brand-close-top 720ms cubic-bezier(.25,.1,.25,1)}
.brand-mark i:nth-child(2){left:22px;top:12px;animation-name:brand-close-right}
.brand-mark i:nth-child(3){left:2px;top:22px;animation-name:brand-close-bottom}
@keyframes brand-close-top{from{transform:translate(-3px,-3px)}to{transform:translate(0,0)}}
@keyframes brand-close-right{from{transform:translate(3px,0)}to{transform:translate(0,0)}}
@keyframes brand-close-bottom{from{transform:translate(-3px,3px)}to{transform:translate(0,0)}}
body>header nav a,body>header nav button,.btn-primary,.btn-secondary,.btn-suggest,.map-tools button,.portfolio-btn{border-radius:999px;font-weight:500}
.entry{background:var(--bg-card);border-radius:22px;box-shadow:0 3px 14px #153b4004}
.tcl-modal{background:var(--bg-card);border-radius:28px;border-color:var(--border-subtle)}
.modal-header{border-bottom:1px solid var(--border-subtle);padding-bottom:16px}
.profile-preview{background:var(--bg-page);border-radius:20px}
input:not([type=checkbox]),select,textarea{border-radius:12px}
@media(prefers-reduced-motion:reduce){.brand-mark i{animation:none}}
dialog.tcl-modal{border-radius:28px}

/* Suggestion details and the invitation remain readable in the scrolling dialog. */
#submissionForm textarea{display:block;width:100%;padding:12px;border:1px solid var(--border-subtle);font:inherit;resize:vertical;min-height:100px}
.field-help{font-size:12px;line-height:1.6;color:var(--text-secondary);margin:6px 0 0}
.map-involvement{margin:24px 0 0;padding-top:18px;border-top:1px solid var(--border-subtle);font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.suggestion-paused{margin:20px 0 4px;padding:20px;background:var(--bg-page);border:1px solid var(--border-subtle);border-radius:16px;line-height:1.65}
.suggestion-paused h3{margin:0 0 10px;font-size:18px}
.suggestion-paused p{font-size:14px}
.suggestion-paused .btn-primary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;text-decoration:none}
