@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600;700;800&display=swap');
:root{--ink:#203d37;--muted:#7c8984;--green:#245c49;--line:#e3e8e2;--bg:#f8faf7}*{box-sizing:border-box}body{margin:0;color:var(--ink);font:14px 'DM Sans',sans-serif;background:var(--bg)}button,input,select{font:inherit}button{cursor:pointer;background:white;border:1px solid var(--line);border-radius:7px;padding:10px 14px;color:var(--ink)}button:hover{background:#edf3ed}button:focus-visible,a:focus-visible{outline:3px solid #71a897}aside{width:236px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid var(--line);padding:30px 20px;display:flex;flex-direction:column}.brand{color:var(--ink);text-decoration:none;font-size:22px;font-weight:700;letter-spacing:-1px}.brand>span:last-child{font-weight:400}.mark{font-size:32px;vertical-align:middle;margin-right:8px}.workspace{display:flex;gap:12px;align-items:center;margin:38px 0 26px;background:#f6f7f3;padding:12px;border-radius:8px;font-weight:600}.workspace small{font-size:8px;letter-spacing:1.2px;margin-top:5px}small{display:block;color:var(--muted);font-weight:400}nav button{width:100%;display:flex;gap:14px;border:0;text-align:left;margin:5px 0;padding:13px}nav .active,.tabs .active{background:#eaf1e8;color:#285940;font-weight:600}nav b{margin-left:auto;font-size:10px}.navlabel{font-size:10px;letter-spacing:1.4px;color:#8b9690;margin:30px 12px 13px}#branches button{border:0;font-size:12px;text-align:left;width:100%;padding:12px 6px}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:9px}.sidebar-bottom{margin-top:auto;background:#f5f7ef;padding:18px 14px;border-radius:10px}.sidebar-bottom p{font-size:12px;line-height:1.6;color:var(--muted)}.sidebar-bottom small{font-size:9px;margin-top:10px}.pc-icon{font-size:24px;margin-bottom:8px}.sidebar-bottom button{width:100%;font-size:12px}.account{display:flex;gap:10px;align-items:center;padding-top:24px;font-size:12px}.account small{font-size:10px;margin-top:4px}main{margin-left:236px}header{height:74px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px;background:#fff;font-size:12px}header i{margin:0 15px;color:#bbb}header b{font-weight:500}header>div{display:flex;gap:24px;align-items:center}.private{color:#7b8880;font-size:11px}.heading{padding:38px 38px 27px}.eyebrow{font-size:10px;letter-spacing:2px;color:#718777;font-weight:700}.title-row{display:flex;justify-content:space-between;align-items:center}h1{font:800 32px Manrope,sans-serif;letter-spacing:-1.4px;margin:10px 0}p{color:var(--muted)}.title-row p{margin:8px 0 0}.primary{background:var(--green);color:#fff;border:0}.primary:hover{background:#193e32}.stats{display:flex;gap:32px;margin-top:28px;font-size:11px;color:var(--muted)}.stats b{font-size:18px;color:var(--ink);margin-right:6px}.map-area{margin:0 28px 28px;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.toolbar{padding:16px 20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.tabs{display:flex;background:#f5f7f2;padding:3px;border-radius:8px}.tabs button{border:0;background:transparent;font-size:12px}.tabs .active{background:white;box-shadow:0 2px 5px #203d3710}.search{display:flex;align-items:center;gap:8px;margin-left:auto;border:1px solid var(--line);border-radius:7px;padding:8px 11px;min-width:240px}.search input{border:0;outline:0;width:100%;font-size:11px}.search span{font-size:20px;line-height:16px}kbd{color:#9aa59c;background:#f8f9f6;padding:1px 5px}select{background:white;border:1px solid var(--line);border-radius:7px;color:var(--ink);padding:9px;font-size:11px}#breadcrumbs{padding:13px 22px;font-size:11px;display:flex;gap:6px;align-items:center;border-bottom:1px solid #eef1ec}#breadcrumbs button{border:0;padding:3px 6px;font-size:11px;color:#748579}#canvas{min-height:570px;padding:26px 28px 42px;background-image:radial-gradient(#dbe2d8 .8px,transparent .8px);background-size:18px 18px}.root-card{width:270px;margin:auto;background:white;border:1px solid #cddbcf;border-top:3px solid var(--green);border-radius:10px;padding:18px;box-shadow:0 5px 16px #27433409;position:relative}.person{display:flex;align-items:center;gap:12px}.avatar{width:42px;height:42px;border-radius:50%;display:inline-flex;justify-content:center;align-items:center;background:#e7eee1;color:#64775d;font-weight:700;flex-shrink:0;object-fit:cover}.tiny{width:32px;height:32px}.person strong{font-size:13px}.person small{font-size:10px;margin-top:5px}.root-card .badge{margin-top:13px}.badge{font-size:9px;color:#6c7d6d;display:flex;align-items:center;gap:6px}.badge:before{content:'';height:5px;width:5px;border-radius:50%;background:#779a6f}.branch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;position:relative;margin-top:42px}.branch-grid:before{content:'';position:absolute;top:-22px;left:16.67%;right:16.67%;height:1px;background:#cbd7c9}.root-card:after{content:'';height:22px;width:1px;background:#cbd7c9;position:absolute;bottom:-23px;left:50%}.branch{position:relative}.branch:before{content:'';position:absolute;top:-22px;height:22px;left:50%;width:1px;background:#cbd7c9}.branch-head{padding:16px;background:#fff;border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:10px 10px 0 0;min-height:164px}.branch-head h2{font:700 15px Manrope;margin:15px 0 7px;letter-spacing:-.4px}.branch-head p{font-size:10px;line-height:1.6;margin:0;min-height:32px}.branch-body{padding:10px;background:#f4f6f0b0;border:1px solid var(--line);border-top:0;border-radius:0 0 10px 10px}.ministry{display:flex;align-items:center;width:100%;text-align:left;padding:12px 10px;border-radius:7px;margin-bottom:7px;background:#fff;gap:9px;box-shadow:0 1px 2px #233c3203}.ministry:last-child{margin-bottom:0}.ministry strong{font-size:11px;font-weight:600}.ministry small{font-size:9px;margin-top:5px}.ministry .mini{width:26px;height:26px;border:1px dashed #c6d1c4;border-radius:50%;display:grid;place-items:center;color:#9caa98;font-size:15px}.ministry .arrow{margin-left:auto;color:#9da99a;font-size:16px}.branch-foot{display:flex;justify-content:space-between;padding:11px 4px 2px;font-size:9px;color:#8c9989}.branch-foot button{padding:0;border:0;background:none;font-size:10px}.green{background:#709b72}.empty{border:1px solid #98a294;background:transparent;margin-left:17px}footer{display:flex;justify-content:space-between;padding:15px 20px;font-size:9px;color:#8c978e;align-items:center;border-top:1px solid var(--line)}footer button{font-size:9px;padding:4px;border:0}.hint{margin-left:20px}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:16px;margin-top:25px}.seat-card{background:white;border:1px solid var(--line);border-radius:10px;padding:20px}.seat-card h3{font-size:14px;margin:14px 0 5px}.seat-card p{font-size:11px;line-height:1.6}.seat-actions{display:flex;gap:8px;margin-top:18px}.seat-actions button{font-size:10px;flex:1}.section-title{display:flex;align-items:center;justify-content:space-between}.section-title h2{font:700 22px Manrope}.section-title p{font-size:12px}.empty-state{text-align:center;padding:70px 20px;color:var(--muted)}dialog{border:1px solid var(--line);border-radius:16px;padding:30px;width:490px;max-width:95vw;color:var(--ink);box-shadow:0 20px 100px #16382b30}dialog::backdrop{background:#183b3040;backdrop-filter:blur(3px)}dialog h2{font:700 23px Manrope;margin:0 0 10px}dialog p{font-size:12px;line-height:1.7}dialog label{display:block;font-size:11px;margin:16px 0 6px}dialog input,dialog select{width:100%;padding:11px;border:1px solid var(--line);border-radius:7px}dialog .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}.close{float:right;border:0;padding:4px}.notice{padding:12px;background:#f5f7ef;border-radius:8px;font-size:11px;line-height:1.7;color:#6a7b62}.import-row{display:flex;justify-content:space-between;align-items:center;padding:10px;border-bottom:1px solid var(--line)}.import-row select{width:180px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#234b3c;color:white;padding:12px 22px;border-radius:8px;display:none;z-index:20}@media(min-width:1500px){#canvas{padding:30px 65px 45px}.heading{padding-top:45px}.branch-head{padding:22px}}@media(max-width:1100px){aside{width:195px;padding:25px 14px}main{margin-left:195px}.heading{padding:28px}.branch-grid{gap:12px}#canvas{padding:25px 15px}.search{min-width:180px}.hint{display:none}.branch-head{padding:13px}.person{gap:8px}.toolbar{flex-wrap:wrap}}@media(max-width:760px){aside{position:relative;width:100%;padding:15px;display:block}.workspace,.navlabel,#branches,.sidebar-bottom,.account{display:none}nav{display:flex;margin-top:10px}nav button{justify-content:center;padding:9px}main{margin:0}header{padding:0 18px;height:58px}.private{display:none}.heading{padding:26px 20px}h1{font-size:27px}.title-row{align-items:flex-start;gap:15px}.title-row>button{font-size:11px}.stats{gap:14px;font-size:9px}.map-area{margin:0 12px 20px}.toolbar{padding:12px;gap:8px}.search{order:3;width:100%}.branch-grid{grid-template-columns:1fr;margin-top:35px}.branch-grid:before,.branch:before,.root-card:after{display:none}.branch-head{min-height:0}.branch-head p{min-height:0}.branch-body{padding:12px}.branch-grid{gap:20px}footer{gap:10px;flex-wrap:wrap}.root-card{width:100%}.branch-head h2{font-size:17px}.ministry strong{font-size:12px}}
/* Garden family tokens */
:root{--ink:#17221B;--muted:#526156;--green:#176740;--line:#12100e33;--bg:#F3F0E5}body{font-family:Inter,'Helvetica Neue',sans-serif}aside,header,.map-area,button,.root-card,.branch-head,.ministry,.seat-card,dialog{background:#FCFBF6}h1,h2,h3,.branch-head h2,.section-title h2,dialog h2{font-family:'Neue Haas Grotesk Display','Helvetica Neue',Inter,sans-serif;letter-spacing:-.035em}h1{font-size:42px;line-height:1.03;font-weight:800;max-width:600px;letter-spacing:-.055em}.eyebrow,.navlabel,.badge,.stats,.private,footer,.branch-foot{font-family:'IBM Plex Mono',monospace}.eyebrow{color:#526156;font-size:10px;letter-spacing:.1em}.heading{padding-top:42px;padding-bottom:30px}.title-row p{font-size:14px;line-height:1.5}.brand{font-family:Inter,sans-serif;letter-spacing:-1px}.workspace,.sidebar-bottom,.tabs{background:#D9E2D3}.sidebar-bottom{border-radius:0}.sidebar-bottom strong{color:#0B3324}.primary{background:#176740;color:#FCFBF6}.primary:hover{background:#0B3324}button{border-radius:20px;min-height:38px;transition:background .2s}button:disabled{opacity:.5;cursor:not-allowed}nav button{border-radius:4px}nav .active{background:#D9E2D3;color:#0B3324}.branch-head{border-radius:4px 4px 0 0;border-top-color:#176740;min-height:180px}.branch:nth-child(2) .branch-head{border-top-color:#A9B79A}.branch:nth-child(3) .branch-head{border-top-color:#C89578}.branch-body{background:#f3f0e5;border-radius:0 0 4px 4px}.branch-head h2{font-size:17px;line-height:1.15}.branch-head p{font-size:11px}.ministry{box-shadow:none;border-radius:4px;min-height:64px}.ministry strong{font-size:12px}.ministry small{font-size:10px;color:#526156}.root-card{border-top:3px solid #176740;border-radius:4px;box-shadow:none;width:300px}.avatar{background:#D9E2D3;color:#0B3324}.avatar-stack{display:flex;flex-shrink:0}.avatar-stack .avatar+.avatar{margin-left:-20px;border:2px solid #FCFBF6}.person{align-items:flex-start}.person strong{line-height:1.5}.seat-card{border-radius:4px;box-shadow:none}.seat-card .seat-actions{flex-wrap:wrap}.seat-card a,.member a{color:#176740}.map-area{border-radius:4px}#canvas{background-image:none;background-color:#F3F0E5;padding-top:30px}#syncbar{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#D9E2D340;border-bottom:1px solid var(--line);font-size:11px}#syncbar strong{font-weight:500}#syncbar small{margin-top:6px;font-size:10px}#syncbar>div:last-child{display:flex;gap:8px;flex-shrink:0}#syncbar button{font-size:10px}.error-text{color:#B42318;font-size:12px;line-height:1.5;display:block;margin-top:8px}.error-text button{margin:8px}dialog{width:600px;max-height:90vh;overflow:auto;padding:32px;border-radius:16px}dialog input,dialog textarea,dialog select{font-size:16px;border-radius:4px;min-height:48px;background:#FCFBF6}dialog textarea{width:100%;border:1px solid var(--line);padding:12px;min-height:90px;font:inherit}dialog label{font-size:12px}.people-section{border-top:1px solid var(--line);margin-top:28px;padding-top:16px}.people-section h3{font-size:18px}.people-section h3 span{font-size:12px;color:var(--muted)}.people-section p{font-size:12px}.member{display:flex;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.member>div{flex:1;min-width:0}.member strong{font-size:13px}.member small,.member a{display:block;font-size:11px;line-height:1.7;margin-top:3px}.member button{font-size:11px;flex-shrink:0}.search-row{display:flex;gap:10px}.notice{background:#D9E2D3;color:#17221B;border-radius:4px}.tabs .active{box-shadow:none;background:#FCFBF6}.search{background:#FCFBF6;border-radius:4px}.search input{background:transparent}.stats b{font-family:Inter,sans-serif}.account small{color:#526156}.hint{font-size:9px}footer{font-size:9px}.title-row{gap:18px}@media(max-width:1100px){h1{font-size:36px}.branch-head{min-height:205px}.avatar-stack .avatar{width:34px;height:34px}.avatar-stack .avatar+.avatar{margin-left:-22px}.branch-head .person{flex-direction:column}#syncbar{flex-wrap:wrap}.toolbar .search{min-width:150px}}@media(max-width:760px){h1{font-size:34px}.branch-head{min-height:0}.branch-head .person{flex-direction:row}.root-card{width:100%}.heading{padding:28px 20px}.title-row{display:block}.title-row>button{margin-top:20px}#syncbar>div:last-child{width:100%;justify-content:space-between}.stats{flex-wrap:wrap;gap:14px 20px}.member{gap:8px}.member button{padding:7px 10px}.toolbar{padding:12px}.map-area{margin:0 20px 20px}.brand{font-size:24px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
#credentials-form{margin-top:24px}#credentials-form input{width:100%;font-family:Inter,sans-serif}.field-note,.connection-meta{font-size:11px!important;line-height:1.65!important;color:var(--muted)}.connection-meta{border-top:1px solid var(--line);padding-top:16px;margin-top:24px}.success-text{padding:14px;background:#D9E2D3;color:#0B3324;border-radius:4px;font-size:12px;line-height:1.6}#credential-result:empty{display:none}
.avatar-add{padding:0;min-height:0;flex-shrink:0;cursor:pointer;border:1px dashed #8b9b82;font-size:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.avatar-add:hover{background:#176740;color:#FCFBF6;border-color:#176740}.avatar-add:focus-visible{outline:3px solid #176740;outline-offset:3px}.person-summary{padding:0;border:0;background:transparent;text-align:left;min-height:0;border-radius:3px;line-height:inherit;color:inherit}.person-summary:hover{background:transparent;text-decoration:underline;text-underline-offset:3px}.ministry-main{display:flex;align-items:center;gap:9px;flex:1;min-width:0;align-self:stretch;text-align:left;padding:0;border:0;border-radius:0;background:transparent;min-height:0}.ministry-main:hover{background:transparent}.ministry .mini.avatar-add{width:28px;height:28px;padding:0;color:#526156}.ministry .mini.avatar-add:hover{color:#FCFBF6}.ministry-main .arrow{margin-left:auto}
/* Reporting relationships, at every level. */
#canvas{padding:25px 20px 32px;min-width:0}.hierarchy-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:24px}.hierarchy-heading h2{font:600 25px/1.12 'Helvetica Neue',Inter,sans-serif;letter-spacing:-.035em;margin:9px 0}.hierarchy-heading p{font-size:12px;line-height:1.6;max-width:550px;margin:8px 0}.hierarchy-controls{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.hierarchy-controls button{font-size:11px;white-space:nowrap}.chart-tools{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:10px;color:var(--muted);margin:10px 0 20px}.chart-tools>div{display:flex;align-items:center;gap:8px}.chart-tools button{min-height:28px;font-size:11px;padding:5px 10px}.chart-viewport{overflow:auto;max-height:900px;min-height:410px;padding:10px 5px 35px;background-image:radial-gradient(#a9b79a55 .75px,transparent .75px);background-size:18px 18px}.chart-scale{width:max-content;min-width:100%;padding:4px 12px}.chart-root,.chart-children{list-style:none;margin:0;padding:0;display:flex;justify-content:center}.chart-item{display:flex;flex-direction:column;align-items:center;position:relative;padding:0 12px;flex-shrink:0}.chart-children{padding-top:32px;position:relative}.chart-children:before{content:'';position:absolute;top:0;left:50%;height:16px;border-left:1px solid #8da284}.chart-children>.chart-item:before{content:'';position:absolute;top:-16px;width:100%;height:16px;border-top:1px solid #8da284}.chart-children>.chart-item:after{content:'';position:absolute;top:-16px;height:16px;border-left:1px solid #8da284}.chart-children>.chart-item:first-child:before{width:50%;left:50%}.chart-children>.chart-item:last-child:before{width:50%;right:50%}.chart-children>.chart-item:only-child:before{border-top:0}.org-node{width:235px;background:#FCFBF6;border:1px solid #b4c0ab;border-top:3px solid #A9B79A;border-radius:6px;padding:16px;text-align:left;flex-shrink:0}.org-node-focus{border-top-color:#176740;box-shadow:0 0 0 3px #1767400a}.node-label{font:9px 'IBM Plex Mono',monospace;letter-spacing:.07em;color:#526156;margin-bottom:9px}.node-title{font:600 17px/1.2 'Helvetica Neue',Inter,sans-serif;letter-spacing:-.025em;border:0;border-radius:3px;padding:0;min-height:0;text-align:left;background:transparent;margin-bottom:16px;width:100%}.node-title:hover{background:transparent;text-decoration:underline}.org-node .person{flex-direction:row;align-items:center;gap:10px;min-height:44px}.org-node .person strong{font-size:12px;line-height:1.4}.org-node .person small{font-size:10px}.org-node .avatar{width:34px;height:34px}.org-node .avatar-stack .avatar+.avatar{margin-left:-20px}.leader-empty{font-size:10px;margin:10px 0;color:#526156}.node-actions{display:flex;gap:6px;margin-top:16px}.node-actions button{font-size:10px;padding:7px 10px;min-height:31px;white-space:nowrap}.node-assign{background:#D9E2D3;border-color:#b3c0aa;flex:1}.node-bottom{border-top:1px solid #d6d9cf;margin-top:14px;padding-top:11px;display:flex;justify-content:space-between;align-items:center;gap:6px}.node-bottom button{padding:0 3px;min-height:24px;border:0;background:transparent;font-size:10px;color:#176740}.node-bottom span{font-size:9px;color:#526156}.outline-viewport{overflow:auto;max-height:900px;background:#FCFBF6;border:1px solid var(--line);border-radius:4px}.outline-root,.outline-children{list-style:none;padding:0;margin:0}.outline-root{min-width:750px}.outline-children{margin-left:28px;border-left:1px solid #b6c3ae}.outline-row{display:flex;align-items:center;gap:14px;padding:15px 16px;border-bottom:1px solid #e0e2d8;min-height:80px}.outline-row:hover{background:#f3f0e590}.disclosure{width:30px;height:30px;min-height:30px;border:0;padding:0;font-size:23px;border-radius:4px;background:#D9E2D3;flex-shrink:0}.disclosure.leaf{display:grid;place-items:center;background:transparent;color:#89997e}.outline-seat{width:220px;flex:0 0 220px}.outline-title{border:0;padding:0;min-height:0;background:transparent;font-size:13px;font-weight:600;border-radius:3px;text-align:left}.outline-title:hover{background:transparent;text-decoration:underline}.outline-seat>small{font-size:10px;margin-top:5px}.outline-people{flex:1;min-width:170px}.outline-people .person{align-items:center}.outline-people .avatar{width:30px;height:30px}.outline-people .person small{display:none}.outline-people .person strong{font-size:11px}.outline-actions{display:flex;gap:6px;margin-left:auto}.outline-actions button{font-size:10px;min-height:31px;padding:6px 10px;white-space:nowrap}.outline-actions button:first-child{background:#D9E2D3}.assigned-in-search{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:20px 0;padding:10px 0}.assigned-in-search h3{font-size:13px;margin:8px 0}.assigned-in-search .member:last-child{border-bottom:0}.tabs button{white-space:nowrap}.search{min-width:170px}.cards .node-actions{margin-bottom:10px}@media(max-width:1100px){.toolbar{gap:8px}.tabs button{font-size:11px;padding:8px 10px}.search{min-width:160px}.hierarchy-heading{flex-direction:column;gap:10px}.hierarchy-controls{justify-content:flex-start}.org-node .person{flex-direction:row}.outline-row{gap:10px}.outline-seat{width:190px;flex-basis:190px}.outline-actions button{padding:5px 8px}}@media(max-width:760px){#canvas{padding:22px 12px}.hierarchy-heading h2{font-size:23px}.chart-tools{align-items:flex-start;flex-direction:column}.chart-viewport{max-height:75vh}.outline-viewport{max-height:75vh}.outline-root{min-width:780px}.hierarchy-controls{width:100%}.hierarchy-controls button{flex:1}.org-node{width:220px}aside nav{flex-wrap:wrap}aside nav button{width:calc(50% - 4px)}.tabs{width:100%}.tabs button{flex:1}}
.chart-children[hidden],.outline-children[hidden]{display:none}

/* Horizontal leadership, compact downward branches at every deeper level. */
.chart-root>.chart-item>.chart-children>.chart-item{align-items:flex-start;width:300px;padding:0 12px}
.chart-root>.chart-item>.chart-children>.chart-item>.org-node{width:276px}
.chart-root>.chart-item>.chart-children>.chart-item:after{left:50%}
.chart-children .chart-children{display:block;margin:0 0 0 16px;padding:16px 0 0 16px;border-left:1px solid #8da284;width:calc(100% - 16px)}
.chart-children .chart-children:before{display:none}
.chart-children .chart-children>.chart-item{display:flex;align-items:stretch;width:100%;padding:0 0 12px;min-width:200px}
.chart-children .chart-children>.chart-item:before,.chart-children .chart-children>.chart-item:first-child:before,.chart-children .chart-children>.chart-item:last-child:before{left:-16px;right:auto;top:26px;width:16px;height:0;border-top:1px solid #8da284}
.chart-children .chart-children>.chart-item:only-child:before{border-top:1px solid #8da284}
.chart-children .chart-children>.chart-item:after{display:none}
.chart-children .chart-children .org-node{width:100%;padding:12px;border-top-width:1px}
.chart-children .chart-children .node-label,.chart-children .chart-children .leader-empty{display:none}
.chart-children .chart-children .node-title{font-size:14px;margin-bottom:10px}
.chart-children .chart-children .node-actions{margin-top:10px}
.chart-children .chart-children .node-bottom{margin-top:10px;padding-top:7px}
.node-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.node-chevron{display:inline-grid;place-items:center;flex-shrink:0;width:24px;height:24px;border-radius:4px;background:#D9E2D3;color:#176740;font-size:21px}
.org-node-focus{outline:2px solid #176740;outline-offset:2px}
.chart-children[hidden]{display:none!important}
.chart-root>.chart-item>.chart-children>.chart-item{width:auto;min-width:300px}
.chart-children .chart-children{width:auto}
.chart-children .chart-children>.chart-item{width:auto;min-width:244px}
.chart-children .chart-children .org-node{width:244px}
.seat-contact{display:flex;align-items:center;gap:5px;margin-left:auto;flex-shrink:0}.seat-contact a{width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--line);border-radius:7px;color:var(--green);background:#fff;transition:background .15s,color .15s}.seat-contact a:hover{background:#eaf1e8;color:#173f2d}.seat-contact svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.person-summary{min-width:0;}

/* The team lead and its leadership band form one visual unit. */
.leadership-layer {
  color: #254536;
  background: #ebf2e8;
  border: 1px solid #adbeaa;
  border-left: 3px solid #547853;
  border-radius: 0 0 6px 6px;
  box-sizing: border-box;
  text-align: left;
}
.chart-item:has(> .leadership-layer) > .org-node { border-bottom: 0; border-radius: 6px 6px 0 0; }
.chart-item > .leadership-layer { width: 244px; }
.chart-root > .chart-item > .chart-children > .chart-item > .leadership-layer { width: 276px; }
.outline-item > .leadership-layer { margin: 0 16px 10px 60px; max-width: 520px; }
.layer-toggle {
  width: 100%; display: flex; align-items: center; gap: 7px;
  min-height: 37px; padding: 6px 10px; border: 0; background: transparent;
  color: #254536; text-align: left; border-radius: 0 0 5px 3px;
}
.layer-toggle:hover { background: #dfeadf; }
.layer-toggle svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }
.layer-toggle strong { font-size: 12px; }
.layer-toggle small { margin-left: auto; color: #49604e; font-size: 10px; white-space: nowrap; }
.layer-toggle:focus-visible, .layer-role-name:focus-visible { outline: 2px solid #176740; outline-offset: -2px; }
.layer-roles { list-style: none; margin: 0; padding: 0 10px 5px; }
.layer-roles[hidden] { display: none; }
.layer-role { padding: 8px 2px; border-top: 1px solid #cad9c6; }
.layer-role-name, .layer-role-branch { min-height: 24px; padding: 0; font-size: 12px; font-weight: 650; color: #254536; border: 0; background: transparent; text-align: left; }
.layer-role .person { gap: 7px; align-items: center; min-height: 32px; flex-direction: row; }
.layer-role .avatar { width: 25px; height: 25px; font-size: 10px; }
.layer-role .person-summary { flex: 1; }
.layer-role .person-summary strong { font-size: 11px; font-weight: 500; }
.layer-role .person-summary small:first-of-type { display: none; }
.layer-role .seat-contact > * { min-width: 24px; width: 24px; height: 24px; min-height: 24px; padding: 3px; }
.layer-role .seat-contact button:disabled { opacity: .55; }
.layer-role-branch { font-size: 10px; font-weight: 500; }

/* Put the name on its own line when a card cannot fit all three controls. */
.org-node, .seat-card, .outline-people, .layer-role { container-type: inline-size; }
.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "avatars summary contact";
  align-items: center;
}
.person .avatar-stack { grid-area: avatars; }
.person-summary { grid-area: summary; width: 100%; }
.person-summary strong, .node-title-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.person-summary small { overflow-wrap: break-word; }
.seat-contact { grid-area: contact; justify-self: end; }
.seat-contact > :is(a, button) {
  width: 30px; height: 30px; min-height: 0; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 7px; color: var(--green);
}
@container (max-width: 330px) {
  .person {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "avatars contact" "summary summary";
    row-gap: 6px;
  }
}

/* Draw every disclosure inside a symmetric square rather than on a text baseline. */
.toggle-chevron {
  display: block; flex: none; width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
button[aria-expanded="true"] .toggle-chevron { transform: rotate(90deg); }
.disclosure, .node-chevron { display: inline-grid; place-items: center; padding: 0; line-height: 1; }
.node-bottom [data-chart-toggle], .layer-role-branch { display: inline-flex; align-items: center; gap: 4px; }

/* Ministry navigation uses the same disclosure shape as the chart. */
aside { overflow-y: auto; }
.ministry-navigation { min-width: 0; }
#mobile-areas { display: none; }
#branches ul { list-style: none; padding: 0; margin: 0; }
#branches li > ul { border-left: 1px solid #c8d4c3; margin: 0 0 5px 10px; padding-left: 8px; }
#branches button { padding: 6px; min-height: 32px; border-radius: 4px; line-height: 1.35; }
#branches .area-toggle { display: flex; align-items: center; gap: 5px; font-weight: 600; }
#branches .dot { flex: none; margin: 0 2px 0 0; }
#branches .toggle-chevron { margin-left: auto; width: 14px; height: 14px; }
#branches button[aria-current="location"] { color: #0b3324; background: #e2eadf; }
#search-help { margin-top: 6px; font-size: 12px; }
#people-results { margin-top: 12px; }
#toast { max-width: min(440px, calc(100% - 24px)); width: max-content; line-height: 1.45; }
#toast[data-kind="success"]::before { content: '✓'; margin-right: 8px; font-weight: 700; }
@media (max-width: 760px) {
  #mobile-areas { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 6px 0; padding: 8px 10px; border-radius: 4px; }
  #mobile-areas[aria-expanded="true"] + #branches { display: block; max-height: 42vh; overflow-y: auto; }
}

.generate-layer {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px;
  color: #254536; background: #f2f6ee; border: 1px dashed #aebeaa; border-radius: 5px;
  padding: 6px 10px; min-height: 31px; text-align: left; font-size: 11px;
}
.generate-layer:hover { background: #e0ebdc; }
.chart-item > .generate-layer, .seat-card > .generate-layer { margin-top: 6px; }
.outline-item > .generate-layer { margin: 3px 16px 10px 60px; }
.layer-item > .generate-layer, .leadership-layer > .generate-layer { margin: 2px 8px 8px; }
#placement-help { font-size: 11px; margin: 6px 0 12px; }

.seat-delete-control { margin-right: auto; }
.seat-delete-control small { margin-top: 4px; }
#seat-form .danger { color: #8e3327; border-color: #cfaba4; }
#seat-form .danger:hover:enabled { background: #f6e9e4; }
#seat-form .actions[hidden], #delete-review[hidden] { display: none; }
#delete-review { border: 1px solid #cfaba4; border-radius: 6px; padding: 12px 16px; margin-top: 16px; }
#delete-review h3 { margin: 0 0 6px; }

.view-options { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:12px 20px; border-bottom:1px solid var(--line); }
.view-options label { display:grid; gap:5px; font-size:11px; color:var(--muted); }
.view-options select { max-width:300px; }
.view-option-actions { display:flex; flex-wrap:wrap; gap:6px; margin-left:auto; }
.view-option-actions button { font-size:11px; }
#layout-label[hidden] { display:none; }

/* Traditional organization chart: peers sit beside one another at every depth. */
.layout-horizontal .chart-children {
  display:flex; justify-content:center; width:auto; margin:0; padding:32px 0 0;
  border-left:0;
}
.layout-horizontal .chart-children:before { display:block; }
.layout-horizontal .chart-children > .chart-item {
  width:auto; min-width:276px; padding:0 12px; align-items:center;
}
.layout-horizontal .chart-children .org-node { width:252px; padding:14px; border-top-width:3px; }
.layout-horizontal .chart-children > .chart-item:before {
  left:0; right:auto; top:-16px; width:100%; height:16px; border-top:1px solid #8da284;
}
.layout-horizontal .chart-children > .chart-item:first-child:before { width:50%;left:50%; }
.layout-horizontal .chart-children > .chart-item:last-child:before { width:50%;left:auto;right:50%; }
.layout-horizontal .chart-children > .chart-item:only-child:before { border-top:0; }
.layout-horizontal .chart-children > .chart-item:after {
  display:block; left:50%;top:-16px;height:16px;border-left:1px solid #8da284;
}
.layout-horizontal .chart-item > .leadership-layer { width:252px; }
.pdf-frame { position:fixed;left:-20000px;top:0;width:1540px;height:1100px;border:0; }
.pdf-document { margin:0;padding:0;background:white; }
.pdf-document h1 { font-size:24px;max-width:none;margin:0 0 4px; }
.pdf-caption { margin:0 0 16px;font-size:11px; }
.pdf-view { width:max-content; }
.pdf-content { width:max-content; min-width:0;padding:4px;background:white; }
.pdf-content .chart-viewport, .pdf-content .outline-viewport { overflow:visible;max-height:none;min-height:0;padding:4px;border:0; }
.pdf-content .chart-scale { zoom:1!important;min-width:0; }
.pdf-content .outline-root { min-width:750px; }
.pdf-content .node-title,.pdf-content .outline-title,.pdf-content .layer-role-name { text-decoration:none; }
.pdf-content .cards { width:1120px;grid-template-columns:repeat(4,minmax(0,1fr)); }
@page { size:A3 landscape; margin:10mm; }
@media print {
  .pdf-document { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .pdf-document .pdf-view { break-inside:avoid; }
}
@media(max-width:760px) {
  .view-options { padding:12px;gap:10px; }
  .view-options label { flex:1;min-width:130px; }
  .view-options select { width:100%;max-width:100%; }
  .view-option-actions { width:100%;margin:0; }
}
.edit-link { display:inline-flex;align-items:center;background:var(--green);color:white;padding:10px 18px;border-radius:20px;text-decoration:none; }
body:not(.view-only) #enable-editing { display:none; }
.view-only #end-editing,.view-only #add,.view-only #export,.view-only #backup,
.view-only #syncbar,.view-only .sidebar-bottom,.view-only .node-actions,
.view-only .node-bottom [data-add-child],.view-only .outline-actions,
.view-only .generate-layer,.view-only .avatar-add,.view-only [data-add-child],
.view-only .hierarchy-controls [data-assign],.view-only #create-top-seat { display:none; }
.view-only .person-summary { cursor:pointer; }

.view-only #end-editing { display:none!important; }

/* The chart is the workspace: compact controls stay within reach. */
[hidden] { display:none!important; }
.sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }
body { --sidebar-width:236px; }
aside { width:var(--sidebar-width);padding:20px 16px;z-index:30; }
main { margin-left:var(--sidebar-width); }
.brand-row { display:flex;align-items:center;gap:8px;min-height:38px; }
.brand { display:flex;align-items:center;gap:4px;white-space:nowrap; }
.brand-name>span { font-weight:400; }
#sidebar-toggle { margin-left:auto;flex-shrink:0;width:30px;min-height:30px;padding:0;font-size:23px; }
#sidebar-content { display:flex;flex:1;flex-direction:column; }
.workspace { margin:24px 0 12px;padding:10px; }
.sidebar-bottom { padding:10px;margin-top:28px;border-radius:4px; }
.account { padding-top:16px; }
.nav-icon { display:inline-grid;place-items:center;width:24px;flex:none;font-size:20px; }
header { height:68px;padding:10px 24px;gap:12px; }
.page-identity { display:block;min-width:0; }
.page-identity h1 { margin:3px 0 0;font-size:23px;line-height:1.1;letter-spacing:-.035em; }
.page-identity .eyebrow { font-size:9px; }
header .header-actions { gap:10px; }
#end-editing { margin:0; }
.header-actions button,.header-actions .edit-link { font-size:12px;padding:9px 14px;white-space:nowrap; }
.map-area { margin:0;border:0;border-radius:0;overflow:visible; }
.workspace-controls { position:sticky;top:0;z-index:20;background:#FCFBF6;border-bottom:1px solid var(--line);box-shadow:0 3px 8px #17221b08; }
.toolbar { gap:10px;padding:10px 20px;flex-wrap:wrap; }
.search { flex:1;margin:0;min-width:220px;padding:6px 10px; }
.search input { font-size:13px;min-width:0;min-height:28px; }
#clear-search { border:0;padding:0 4px;min-height:28px;font-size:20px; }
.team-filter { display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted); }
.team-filter select { max-width:230px;min-height:38px; }
.view-options { padding:6px 20px;gap:8px;border-bottom:0;align-items:center; }
.view-options select { min-height:34px;padding:7px 9px; }
.view-option-actions { margin:0; }
.view-option-actions button { min-height:34px;padding:7px 12px; }
.chart-tools { margin:0 0 0 auto;display:flex;flex-direction:row;align-items:center;gap:5px; }
.chart-tools button { min-height:34px;padding:5px 10px; }
#zoom-label { min-width:36px;text-align:center; }
#zoom-fit { color:var(--green);font-weight:600; }
#breadcrumbs { padding:6px 18px;border:0;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;min-height:34px; }
#canvas { padding:16px 12px;min-height:360px; }
.chart-viewport,.outline-viewport { height:calc(100dvh - 236px);max-height:none;min-height:340px;overscroll-behavior:contain; }
.chart-scale { min-width:100%;padding:10px 12px; }
.chart-scale.measuring-chart { min-width:0!important; }
.node-title-text,.person-summary strong { white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere; }
.person-card .person-roles { margin:14px 0 5px;font-weight:500;color:var(--ink); }
.person-card .person-summary small { display:none; }
.section-title { padding:4px 8px; }
.section-title h2 { font-size:20px;margin:4px 0; }
.section-title p { margin:5px 0; }
.cards { margin-top:12px; }
#syncbar { padding:10px 20px; }
.export-menu { position:relative;margin-left:auto; }
.export-menu summary { display:flex;gap:10px;align-items:center;cursor:pointer;padding:9px 14px;border:1px solid var(--line);border-radius:20px;font-size:12px;list-style:none; }
.export-menu summary::-webkit-details-marker { display:none; }
.export-options { position:absolute;right:0;top:calc(100% + 6px);width:240px;padding:6px;background:#FCFBF6;border:1px solid var(--line);box-shadow:0 8px 30px #17221b20;border-radius:8px;z-index:40; }
.export-options button { display:block;width:100%;text-align:left;border:0;border-radius:4px; }
.export-options small { font-size:11px;margin-top:4px; }
.search-pagination { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;position:sticky;bottom:-32px;padding:12px 0;background:#FCFBF6;border-top:1px solid var(--line); }
.search-pagination button { width:auto;margin:0;border:1px solid var(--line);font-size:12px; }
.search-pagination span { font-size:12px;white-space:nowrap; }
.match-suggestion { color:#805015; }
#discard-dialog { width:440px; }
#discard-changes { color:#8e3327; }
@media(min-width:761px) {
  .sidebar-collapsed { --sidebar-width:74px; }
  .sidebar-collapsed aside { padding:16px 10px; }
  .sidebar-collapsed .brand-row { flex-direction:column;gap:2px; }
  .sidebar-collapsed .brand { padding:0; }
  .sidebar-collapsed .mark { margin:0; }
  .sidebar-collapsed #sidebar-toggle { margin:0;width:38px; }
  .sidebar-collapsed .brand-name,.sidebar-collapsed .workspace,.sidebar-collapsed nav button>span:not(.nav-icon),.sidebar-collapsed nav b,.sidebar-collapsed .ministry-navigation,.sidebar-collapsed .sidebar-bottom,.sidebar-collapsed .account { display:none; }
  .sidebar-collapsed nav { margin-top:20px; }
  .sidebar-collapsed nav button { justify-content:center;padding:12px 8px; }
}
@media(max-width:1050px) and (min-width:761px) {
  body { --sidebar-width:205px; }
  .brand { font-size:19px; }
  .team-filter select { max-width:170px; }
  .toolbar { gap:7px; }
}
@media(max-width:760px) {
  body { --sidebar-width:0px; }
  aside { position:relative;width:100%;padding:10px 12px 4px;z-index:25; }
  .brand-row { min-height:32px; }
  .brand { font-size:19px; }
  .mark { font-size:27px; }
  #sidebar-toggle,.workspace,.sidebar-bottom,.account { display:none; }
  aside nav { display:flex;flex-wrap:nowrap;gap:3px;margin:4px 0; }
  aside nav button { width:25%;margin:0;flex-direction:column;gap:2px;align-items:center;justify-content:center;padding:4px 2px;min-height:42px;font-size:10px;text-align:center; }
  aside nav b { display:none; }
  .nav-icon { font-size:17px;height:19px; }
  #mobile-areas { position:absolute;right:12px;top:12px;width:auto;max-width:150px;padding:4px 6px;min-height:30px;margin:0;font-size:10px; }
  header { padding:6px 12px;height:48px; }
  .page-identity h1 { font-size:19px; }
  .page-identity .eyebrow { display:none; }
  header .header-actions { gap:6px; }
  .header-actions button,.header-actions .edit-link { font-size:11px;padding:7px 10px;min-height:34px; }
  .toolbar { display:grid;grid-template-columns:minmax(0,1fr) auto;padding:6px 10px;gap:6px; }
  .search { grid-row:1;grid-column:1;min-width:0;width:100%;padding:4px 8px; }
  .search input { font-size:12px; }
  .search kbd { display:none; }
  .team-filter { grid-row:2;grid-column:1;min-width:0; }
  .team-filter select { width:100%;max-width:none;min-width:0; }
  .toolbar:has(#filter[hidden]) .team-filter { grid-column:1 / -1; }
  #filter { grid-row:2;grid-column:2;width:100%;max-width:120px; }
  .export-menu { grid-row:1;grid-column:2;margin:0; }
  .export-menu summary { padding:8px 10px; }
  .view-options { padding:4px 10px 6px;gap:6px; }
  .view-options label { min-width:0;flex:1; }
  .view-options select { width:100%;max-width:180px;font-size:10px; }
  .view-option-actions { width:auto;gap:4px; }
  .view-option-actions button { font-size:10px;padding:5px 8px; }
  .chart-tools { flex-direction:row;width:100%;justify-content:flex-end;gap:5px; }
  .chart-tools button { min-height:36px; }
  #breadcrumbs { padding:2px 8px;min-height:26px;font-size:10px; }
  #canvas { padding:10px 6px; }
  .chart-viewport,.outline-viewport { height:calc(100dvh - 230px);min-height:330px;max-height:none; }
  .cards { padding:0 6px;grid-template-columns:1fr; }
  .search-pagination { bottom:-32px; }
}
